Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix small lineheight issue in editor style #10345
In the editor, the line-height for text is 1.8. This is assigned on the Rich Text component directly.
But when you apply a text style manipulation, then reset it, this lineheight disappears, for some reason I'm not fully understanding.
This PR fixes that by simply assigning the lineheight to the p in the editor style.
To your incoming question: why doesn't the P inherit the lineheight from the body? Well, because WordPress itself applies a 1.5 lineheight to the p tag directly, which our editor inherits
GIF of the bug:
GIF of the fix:
Okay good feedback.
The editing canvas is subject to CSS bleed from WordPress. This is a little frustrating for folks styling the editor, they may have to override the lineheight for every element... at least the p element is styled by WordPress itself.
In 1a136e2, though, I moved the rule up a level, which solves the issue.
Specifically, the lineheight rule was previously assigned to
So maybe the bug that caused this is that