W3C home > Mailing lists > Public > www-style@w3.org > June 2016

Re: @else in Media Queries

From: Sebastian Zartner <sebastianzartner@gmail.com>
Date: Sat, 11 Jun 2016 09:34:55 +0200
Message-ID: <CAERejNYshjcCRODdwbmAW7tx5j7VFfXG49AqJ2cOGsEezsfzeQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, W3C www-style mailing list <www-style@w3.org>
On 9 June 2016 at 22:58, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Thu, Jun 9, 2016 at 3:34 AM, Daniel Glazman
> <daniel.glazman@disruptive-innovations.com> wrote:
>> If @else if added, it adds another major layer of complexity:
>> we can only negate a whole MQ right now and not a single component
>> inside a MQ so expressing the "compound" MQ relevant to an arbitrary
>> style rule could be very painful is not impossible. In short it means
>> that copy/paste of a given element with its stylistic information
>> between two different documents could lead to MQ of that form:
>>
>>   @media ...a media query... {
>>     /* nothing here */
>>     @else {
>>       p { color: red }
>>     )
>>   }
>>
>> Sorry, but that's ugly and that clearly sucks. From a UI perspective,
>> wow.
>
> I don't know what you're trying to say here. Can you flesh out the
> example with more detail?

Coming back to this option, why is nesting the @else rule that bad? Sure, in
other languages you have it outside of the first block, but it clearly
connects both visually and avoids the problems of a dangling @else
block.

Sebastian
Received on Saturday, 11 June 2016 07:35:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:47 UTC