Add layout and block spacing to details block#53282
Conversation
Yeah there's some dead code that will need to be removed. I added the feature first to see how well it worked, and will address the rest of the points in the issue now. |
andrewserong
left a comment
There was a problem hiding this comment.
This is testing quite nicely for me, too! No styling issues between trunk and this PR, so it appears to be backwards compatible 👍
One subtle thing, since the hard-coded styling rules haven't been removed, is that the block's CSS overrides the root layout styles:
This isn't an issue at the post level, as block spacing set at the individual block level does override it:
However, it does seem to be an issue for styles set within global styles, though. To reproduce, go to adjust the Details block's block spacing within global styles, then save, and view the block on the site frontend. It looks like the block's styling rules are overriding the block-level-in-global-styles rules:
Other than that, though, this is working very well!
|
Updated to remove custom margins from the block CSS. |
|
Size Change: -52 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
|
Re-tested after CSS removal. 🚀 |


What?
Fixes #53252.
Adds flow layout and block spacing to the Details block
Quick draft to check all works as expected; some items in the issue such as hardcoded style removal haven't been addressed yet.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast