What’s this new frontend CSS ouptut in 6.5?
-
Can anyone explain reasoning behind the new frontend CSS that gets dumped internally into the <head> after updating to 6.5? Specifically stuff like below, which is newly breaking my custom theme layouts. I’m probably being an old confused prude here, but personally I think it’s gross that WP core would print any CSS (other than variables) directly onto the page at all, but these !important flags take it to a new level of pain.
body .is-layout-constrained > .aligncenter { margin-left: auto !important; margin-right: auto !important; } body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { max-width: var(--wp--style--global--content-size); margin-left: auto !important; margin-right: auto !important; }
I guess I don’t understand the logic of demanding that anything not explicitly aligned left, right, or full, MUST have margin: auto. It’s one thing thing to specify that, but why make it !important?
In my case, I use a lot of group blocks, often nested, to simply function as barebones containers. By default WP appears to give every group block the .is-layout-constrained class. Didn’t cause a problem before, but now in 6.5 everywhere I’ve used a group as a simple container, my desired margin css is overridden with auto !important.
- The topic ‘What’s this new frontend CSS ouptut in 6.5?’ is closed to new replies.