Closed adamalfredsson closed 2 years ago
We doesn’t do @media
joining since it is hard. I think it better to do in CSS minifier.
Does this CSS is invalid? Looks like valid for me:
@media screen {
html {
background-color: blue;
}
@media (min-width: 640px) {
html {
background-color: red;
}
}
}
Yes, however it is unfortunately not supported with IE11
It is another reason to make media
joining in minificator or in postcss-preset-env
(compatibility with old browsers).
Thanks, I'll look into that!
Do you think it would be helpful to add to documentation that it does not unwrap @media
at-rules?
Do we really need to care about IE 11 for mainstream development?
Probably this issue will suffice as documentation, I suppose.
Given this input:
The output is unchanged. I would like to unwrap the media rules, like so:
I've also tried without success to explicitly add media to the unwrap options, resulting in the following
.postcssrc
configuration:I know that nested media queries is valid css, but I'm struggling with IE11 which doesn't support it.
Using: