RE: @else in Media Queries

Jonathan Neal <[email protected]>
Newsgroups gmane.comp.web.css.general
Message-ID <[email protected]>
For those who like to explore ideas by fiddling with them.

http://jonathantneal.github.io/postcss-at-else/
Cheers,Jonathan

> From: [email protected]
> Date: Mon, 13 Jun 2016 10:50:34 +1000
> To: [email protected]
> Subject: Re: @else in Media Queries
> 
> On Sat, Jun 11, 2016 at 7:24 PM, Daniel Glazman
> <[email protected]> wrote:
> > On 11/06/2016 09:54, Mark Brown wrote:
> >
> >> Has anyone considered something like
> >>
> >>   @switch {
> >>       @case C1 { ... }
> >>       @case C2 { ... }
> >>       @default { ... }      /* optional */
> >>   }
> >
> > /me faints.
> 
> I'm not in a position to judge whether the problem with chained rules
> that you have raised is serious enough to preclude their use. The
> example just illustrates that that wouldn't prevent some other form of
> multi-way branch being added.
> 
> Hopefully your objection isn't just to the choice of names. It could
> just as easily be:
> 
>   @first-of {   /* use the first non-discarded rule */
>       @when C1 { ... }
>       @when C2 { ... }
>       ...
>       @otherwise { ... }    /* optional */
>   }
> 
> Mark
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.