Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is-layout-flow gets applied contextually in site editor, causing layout shift #45590

Closed
jasmussen opened this issue Nov 7, 2022 · 3 comments
Closed
Labels
[Block] Columns Affects the Columns Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Bug An existing feature does not function as intended

Comments

@jasmussen
Copy link
Contributor

In the site editor, using a layout involving 3 columns of latest posts, when you click between these three columns, the layout shifts:

shift when selecting column

This appears to be caused by a margin that is added to inner items between deselected and selected. When inspecting. it becomes clear that a selected column has a is-layout-flow CSS class applied to the column li item:

layout-flow

The class is-layout-flow applies some margin to place the inner contents:

margin

If this margin is appropriate for the column, it should be applied to all columns, not just the selected one. So far I've been able to reproduce it using only the Columns block, and it may be limited to just that block.

@jasmussen jasmussen added [Type] Bug An existing feature does not function as intended [Block] Columns Affects the Columns Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Nov 7, 2022
@jasmussen
Copy link
Contributor Author

@tellthemachines can you reproduce this? I recall you working on flow layout before, any input you have would be great, thank you.

@tellthemachines
Copy link
Contributor

Hmm I can't reproduce that on trunk. The is-layout-flow classname is applied on the ul, but not on any of its li whether they are selected or not. The li aren't blocks in themselves, so they shouldn't ever have that class unless it's being applied independently of the layout support.

Could you share some more info on your environment, theme, plugins etc. that might help isolate the cause?

@jasmussen
Copy link
Contributor Author

Thank you for looking. Indeed retracing my steps now, I'm unable to reproduce. The is-layout-flow is no longer applied to the individual post columns. Closing as fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants