-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try: Add line height rule to the post title #23656
Conversation
Size Change: -2 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a theme sets its own line height, it'll be overridden here anyway.
Can you expand a little on this? I believe I may have been responsible for the initial change.
In the end, I don't have a strong opinion on this, and I frankly defer to you on the theme details as you're far more versed than me.
The intent, definitely, was for the post title to have line-height similar to that of other headings, but if that isn't the case, we might as well find a good balance in the interim, until such a time as the post title finally transforms into a butterfly block.
Ah, I'm just saying that if a theme supplies a line height for the
Yep, that's right. After this PR, the post title has the same line height as the |
I think we should leave as it was, now the theme devs must update their CSS styling rules... |
@alexvornoffice can you point me to a theme where this caused an issue? I tested across a handful of themes as described above, and didn't see any negative effects. |
When using Gutenberg's default editor styles, the line height of the post title seems really tall to me. The post title mimics the font size of the
h1
block, but it does not set its own line height. This PR tries syncing up the line height with theh1
block.The post title did have a
line-height
rule, but it was set toinherit
, under aInherit the styles set by the theme.
comment. If a theme sets its own line height, it'll be overridden here anyway. If a theme does not set its own line height, it's quite likely that at this font size, a line height of 1.4 will be more appropriate than whatever thebody
line height is set to anyway. I tried with a number of themes (Twenty Nineteen, Twenty Twenty, Go, etc), and this seemed to work just fine.Before
After