-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 block: CSS Grid for Grid View option #32443
Comments
I want to support the solution to use CSS grid instead of flexbox for the Grid view option. If this is not an option, maybe we could implement a way for themers to choose if they want to use Grid of flexbox. This way it matched other elements of a theme. I think the wording 'Grid view' also suggests CSS grid will be used. |
Actually there had been discussions about that during the implementation and there were issues for IE support. Now that the support has been dropped, it can be revisited. Also there has been discussions for adding such support through the |
@ntsekouras Thank you for your reply, that sounds promising. Since IE11 support was dropped it would even make more sense now to hopefully switch to grid instead. I quickly researched |
This sounds like a good idea, but I think any changes to the grid view need to be accompanied by additional options for responsive columns and user defined breakpoints. 3+ columns until 600px is often not great from a readability POV. I suggest at the very least incorporating the option to have three user defined column states (e.g., high res, medium res, mobile) instead of just defining the one state and defaulting to one column on mobile. |
It's worth noting that, with IE out of the picture, a Support for flex itself is almost 100% nowadays, so all the users whose browsers do flex but don't do gap-in-flex are seeing a crammed-together layout without margins today. That's something like 7% - 10%, possibly much higher depending on site visitor demographics. By contrast, there's a much smaller set of browsers that support grid without gap-in-grid. If you also set the older Browsers entirely lacking grid support — a larger group — could fall back cleanly to the default single-column layout. That's perfect progressive enhancement. |
This is definitely being considered! The issue we're using to track that work is #44557; we're looking to implement the grid as a Layout type. |
Closing this one in favour of #44557 which has more detailed tracking info. |
I am wondering if there are any plans to use CSS Grid instead of Flexbox?
What problem does this address?
At the moment, the Query block uses
flexbox
for the query container when the Grid View option is selected. Below are the styles that the Query block currently uses (WP 5.8-alpha-51064).Default styles:
3 columns layout styles:
What is your proposed solution?
I believe that by using CSS Grid, we could reduce CSS styles used for this block.
Default styles:
3 columns layout styles:
The text was updated successfully, but these errors were encountered: