Re: @else in Media Queries
Mark Brown <[email protected]>
| Newsgroups | gmane.comp.web.css.general |
|---|---|
| Message-ID | <CAM4AczBwcLJ6tuoosyL5ax9-kAcUkZQ7zR_Gogu0Y937xg4TLg@mail.gmail.com> |
On Sat, Jun 11, 2016 at 4:34 PM, Daniel Glazman <[email protected]> wrote: > On 10/06/2016 22:12, Tab Atkins Jr. wrote: >> What new constraints are needed? Are you talking about just in >> editors? The OM doesn't need to do anything special; it can handle >> stray @else just fine. > > Two consecutive rules in a valid sheet's OM: a @media followed by a > @else. Through OM, @media is removed, stylesheet is now invalid because > a standalone @else... Why do you say the stylesheet is invalid? If an at-rule is invalid it is discarded, but I don't see where it says that it makes the stylesheet invalid. >>> - can't always express the @else case by a MQ >> >> Why is this a con? > > Turn a standalone @else in a valid @media. Why does it have to be @media? It's much easier to turn it into a @when, isn't it? Mark