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

Query loop block (4 column grid) - CSS width calc issue (Firefox) #50153

Open
james-s-k opened this issue Apr 27, 2023 · 1 comment
Open

Query loop block (4 column grid) - CSS width calc issue (Firefox) #50153

james-s-k opened this issue Apr 27, 2023 · 1 comment
Labels
[Block] Post Template Affects the Post Template Block [Block] Query Loop Affects the Query Loop Block [Type] Bug An existing feature does not function as intended

Comments

@james-s-k
Copy link

Description

When I have 4 columns in the query loop block, at certain screen sizes the last column breaks down onto the next line.

This only happens on Firefox as far as I know (works on Chrome).

I think it has something to do with this CSS:

@media (min-width: 600px) {
.wp-block-post-template.is-flex-container.is-flex-container.columns-4 > li {
width: calc(25% - .9375em);
}
}

Changing it to this fixes the issue:

@media (min-width: 600px) {
.wp-block-post-template.is-flex-container.is-flex-container.columns-4 > li {
width: calc(24.99% - .9375em);
}
}

Step-by-step reproduction instructions

Using version 6.2. Not using Gutenberg plugin. Firefox.

See screenshots for everything you should need to replicate the layout.

Screenshots, screen recording, code snippet

query-loop-block-4-col-bug-front-end
query-loop-block-4-col-bug-backend

Environment info

WordPress 6.2
Firefox
Mac

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@andrewserong andrewserong added [Block] Query Loop Affects the Query Loop Block [Block] Post Template Affects the Post Template Block [Type] Bug An existing feature does not function as intended labels Apr 28, 2023
@andrewserong
Copy link
Contributor

Thanks for opening the issue! There's a WIP PR from @tellthemachines over in #49050 which could be a potential fix for this, as it's exploring swapping the flex rules for grid for the post template block, which shouldn't require the same width calculations to factor in the block spacing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Template Affects the Post Template Block [Block] Query Loop Affects the Query Loop Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants