Where in csswg-drafts does it mention and
no longer joins nested media queries?
#1605
-
I'm mostly curious, I just read through the csswg nesting spec and it has an example where nested media queries are joined with and. But the postcss-nesting docs say that in the latest version at rules are not combined with the and keyword. Is there a csswg-drafts issue where this was decided? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That only refers to an implementation detail. This is done because browsers have long supported nested at rules. For example: @media (width) or (color) {
@media (min-width: 400) {}
} Concatting with |
Beta Was this translation helpful? Give feedback.
That only refers to an implementation detail.
Instead of naively doing a string concat with
and
and thereby breaking some cases, we leave nested at rules as they appear in your source code.This is done because browsers have long supported nested at rules.
For example:
Concatting with
and
is obviously wrong here:(width) or (color) and (min-width: 400)