-
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
Remove unused line height style for mce-content-body #13867
Conversation
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.
Nice one. This should be a trivial code cleanup since that style isn't used at all anymore.
However, can you go one step further now that you're at it, and also remove this line?
I tried removing it, and the "line-height: inherit" makes sure that the correct line height is inherited from the editor styles wrapper. Which is superior. So might as well kill both while we're at it, right?
Looks good to me:
@jasmussen This second line also applies to lists, quotes... I wonder if it has an impact there. |
Thanks for testing @jasmussen 👍 |
Looks good to me! Just also dropping here that |
This line height can be inherited with no negative effects. Removing this allows for less specific rules, making editor styles a bit easier.
Thanks, everyone!
Yep! I removed this in eafac98 and haven't noticed any issues either. I'll go ahead and merge once the tests are finished up. 👍 |
* Remove unused line height style for mce-content-body * Remove unnecessary line-height property for .editor-rich-text-editable This line height can be inherited with no negative effects. Removing this allows for less specific rules, making editor styles a bit easier.
* Remove unused line height style for mce-content-body * Remove unnecessary line-height property for .editor-rich-text-editable This line height can be inherited with no negative effects. Removing this allows for less specific rules, making editor styles a bit easier.
mce-content-body
is no longer applied to editable rich text elements. (I think that changed with #13697). As a result, this style is no longer picked up.Since this style is unused, there should be no visual difference in removing it. But here are screenshots to show where it used to show up back when it was active:
Before (WordPress 5.0.3)
Current (in
master
, and in this PR)As a sidenote, applying that
mce-content-body
style to theeditor-styles-wrapper
was causing some theme style issues like #10067, so it's good to have it removed. (More discussion here) 🙂