-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
[css-grid] move media query cell placements to come after cell styles #1057
Conversation
Oh 😅 I prefer to duplicate medias. It is more stable for the cases (like 2-3 different media). |
Here we decided to implement the solution without duplications. |
Since people afraid of Autoprefixer’s Grids, I think using safest way with a few extra media will be better to promotion. They will be compressed by gzip and we need max safety. cc @Dan503 |
We agreed to do a half/half approach remember? We don't want to shift author styles around in the declaration order. The goal is to create a single duplicate media query that holds all of the autoprefixer generated area code in it that is placed after the last grid area reference. See my original example in the issue to see what I mean. Creating a duplicate query for each area reference creates far too much code bloat and moving the full original media query is extremely dangerous. |
Option 2 is the method I'm talking about. That is the one we agreed to. |
@Dan503 but creating a single media for every area seems dangerous for me as well. Code bloat will be fixed by gzip. Are you sure that it is a good reason to not use the safest way? |
It's not every single one. Take a good look at the example code I posted in the issue. Notice that there is only one duplicate media query. There is not a duplicate for each declaration. There is basically a duplicate query per media query per grid. It is not a duplicate query per query per area. |
Yeap I got it. And I am afraid that combining different areas (which could be in different place of CSS file) into a that second media query is not safe, since we move areas declaration to a different position. |
Yes I know, Autoprefixer can't handle grids sharing the same area names. It has that restriction hard boiled into it's area code which is why I opened issue #1038 I point this restriction out in the article and explain why it is the case so you won't need to worry about community backlash |
Released in 8.6.1 |
I'll do the article updates tomorrow. Thanks for getting this over the line :D |
Third solution without duplication media queries.
Now we have solutions for all 3 decisions that we discussed 😄