Remove unused line height style for mce-content-body#13867
Conversation
jasmussen
left a comment
There was a problem hiding this comment.
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-bodyis 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-bodystyle to theeditor-styles-wrapperwas causing some theme style issues like #10067, so it's good to have it removed. (More discussion here) 🙂