Remove padding inheritance on lists in editor-styles #23080
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently
<ul>
and<ol>
elements displayed in the editor inherit their padding from their parent elements for a (to me) unknown reason. @jasmussen can you recall why it was set?The issue is that if a theme sets a padding on the inner container of eg. Media & Text, Cover or Group, on the editor side that same padding gets applied to child lists as well. Something that's becoming more apparent now with the lighter block DOM I guess.
Overall I'm not confident if it can be unset and someone else should probably have a look at this too.
The one thing it does change is that first level lists and lists within Media & text blocks no longer have a padding-right inherited but I dont see the purpose of this. Eg. paragraphs do not have this padding.
How has this been tested?
I tested by enabling twentytwenty and toggling the removal of the attribute after creating a list block as a direct child of the post as well as within a Media & Text block, a Cover Block and a Group block.
Types of changes
Bug fix
Checklist: