Skip to content

Conversation

tellthemachines
Copy link
Contributor

What?

Tries to convert the flex layout styles into presets.

This is very much a WIP. It only addresses server rendered blocks for now, and it ignores properties for which arbitrary values can be set (e.g. gap).

Why?

Inspired by #36944 and #39374, mainly because I was wondering what a default approach would look like for layout.

How?

  • Flattens out the styles needed for flex layout so they fit neatly into classname -> property pairs.
  • Uses readable, verbose classnames for each property, because Classnames are Poetry (or something).

Testing Instructions

  1. Pick a server rendered block with flex layout that is NOT the Navigation block (because that one has custom logic for its styles). Query Pagination seems to be the only core one available.
  2. Check that changing its layout works as expected on the front end.

Screenshots or screencast

Screen Shot 2022-03-24 at 3 32 49 pm

@tellthemachines
Copy link
Contributor Author

Closing this now that we've landed #40875 🎉

@johnbillion johnbillion deleted the try/flex-layout-as-preset branch April 22, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant