Update: Current proposal is for an @when and @else rule, and is located at https://tabatkins.github.io/specs/css-when-else/
From @frivoal:
During the face to face, we talked about the fact setting default styles outside of a media query, then undoing then in the media query before applying new ones is painful, and that authors often want to do something like if/else.
I suggest we go with this syntax:
@media (something) {
...
...
...
@else {
}
}
@supports (foo:bar) {
...
...
...
@else {
}
}
I think putting the else inside the conditional rather than following it, is more consistent with how things work in CSS, since we don't currently have a concept of associating two separate @rules.
The transition phase isn't too nice, as this isn't really usable until all browsers support it, but I think this is going to be the case for any syntax we can pick for this feature.
Thoughts?
Update: Current proposal is for an
@whenand@elserule, and is located at https://tabatkins.github.io/specs/css-when-else/From @frivoal: