[wp-trac] [WordPress Trac] #48526: TwentyNineteen: Update margins in editor styles to address upcoming block editor margin changes

WordPress Trac noreply at wordpress.org
Fri Feb 7 07:45:26 UTC 2020

#48526: TwentyNineteen: Update margins in editor styles to address upcoming block
editor margin changes
 Reporter:  Joen           |       Owner:  (none)
     Type:  defect (bug)   |      Status:  assigned
 Priority:  normal         |   Milestone:  5.4
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:

Comment (by Joen):

 Thank you so much for taking this on, Kjell. My day is complex and my
 environment is acting up, but I'll try and apply the patch later today to
 verify it. In the mean time:

 > Full-width Group blocks still add a little horizontal scrolling on
 mobile. I couldn't nail down why this was happening, but eliminating ~10px
 of the width seemed to solve it? This requires some more sleuthing.

 I would not spend too much effort on this:

 - It's an edgecase that should not block the other improvements from
 - It's possible that the issue will disappear as the block editor itself
 improves. Ella has been doing amazing work reducing the dom, simplifying
 the CSS and reducing specificity, including

 > The previous Group rules targeted direct children of the .wp-block-group
 class, to ensure that the styles were correctly inherited when there are
 Group blocks inside of a Group block. I was unable to do that in this
 case, since sometimes there was an extra is-block-content div in there
 somewhere. I wasn't sure what that does, or why it showed up some times
 but not others. @Joen do you know more about that? We can work around it
 either way, but it'll result in some messier CSS.

 This is a new one that I believe is related to floats primarily:
 /block-editor/src/components/block-list/block.js#L284 — the exact nuance
 is a little hard to explain and I don't recall all the details. If I'm not
 mistaken though, that wrapping div should ONLY wrap floats. Can you
 elaborate how you targetted the direct descendants? I think that should
 probably still be the correct thing to do.

 > (Sidenote: The fact that the theme has to rely on so many super-specific
 Group block selectors is very unsustainable! There's got to be a better

 Yep. I think we need to revisit exact assumptions around how the group
 block works, and look for ways to make it generic. Some thoughts in

 > I'd fixed that new left padding in the last patch, but it sounds like
 that's a Gutenberg bug, not a theme bug. I've removed that part from the
 patch in 48526.2.diff​.

 Nice, yeah we need to fix that in the editor. Thank you Kjell!

Ticket URL: <https://core.trac.wordpress.org/ticket/48526#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list