-
-
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 #1048
Comments
cc @yepninja |
@Dan503 We can fix it by adding a media query to each selector with |
I've used media query merging software before, they do far more harm than good :( Is it not possible to save them into an array then output them at the end into one media query block? I don't really like the idea of each one getting wrapped in a separate media query :( |
It's possible too. To my mind, we have 3 solutions for this case:
|
Creates way too much extra junk in the css file.
That is the option I think works best. I think that this is what I requested in the issue isn't it?
Too much risk of specificity breaking due to drastic changes in the source order. |
I think, if we want insert media after the last area, the third solution would be the best. |
.... maybe. There is a bit of risk in that the media query is going to be holding more than just grid styles in it. Moving site styles away from where the author wrote them is a bit dangerous. Moving an extra media query that was generated through autoprefixer that only holds IE prefixes is a lot less risky in my mind. |
Yeah it's not as neat and tidy but shifting an authors styles around scares me a bit. |
Agreed with you. It's not right to change authors styles. |
@yepninja this is a high priority issue that should get fixed before the article is published. |
@yepninja do you need help with it from Cult of Martians? |
@ai Let's try |
@yepninja I will create a task tomorrow. Can you write on Russian current plan? |
Yep, I'll write plan today |
|
@yepninja а что именно сделать надо? |
Нужно поменять логику переопределения областей для |
Released in 8.6.1 |
postcss/autoprefixer#1048 broke the article build with [1] TypeError: Cannot read property 'type' of undefined [1] at /home/ubuntu/next-article/node_modules/@financial-times/n-ui/node_modules/autoprefixer/lib/hacks/grid-utils.js:348:25
postcss/autoprefixer#1048 broke the article build with [1] TypeError: Cannot read property 'type' of undefined [1] at /home/ubuntu/next-article/node_modules/@financial-times/n-ui/node_modules/autoprefixer/lib/hacks/grid-utils.js:348:25
Currently if I write this:
auto-prefixer outputs this:
The issue is that the media query code is being overwritten by the default styles so the media query ends up having no effect in IE.
You can write the input code like this instead which fixes the issue:
However it means you have to write half of your
.grid
styles at the top of the scss file and write the other half of the styles at the bottom. It is much nicer having them all centralised in one location.I'd prefer to have the autoprefixer output for the first example to be this:
The text was updated successfully, but these errors were encountered: