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

Re: @else in Media Queries

From: Brad Kemper <brad.kemper@gmail.com>
Date: Sat, 11 Jun 2016 11:44:22 -0700
Cc: Florian Rivoal <florian@rivoal.net>, www-style list <www-style@w3.org>
Message-Id: <C60D5350-41BE-4DFF-8198-0A3885E99DDD@gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>


> On Jun 11, 2016, at 12:38 AM, Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote:
> 
> I don't
> want standalone @else rules to appear because an OM-based app or webapp
> hasn't been updated to deal with @else.

Isn't that mostly no worse than an un-updated editor leaving behind or ignoring any new @rule? In some ways it would be better, because a dangling @else would just match nothing. 

> We would break 20+ years of
> "deletion of a valid rule does not change validity of a sheet".

It shouldn't change the validity of the entire sheet its in. It should just be skipped for matching no conditions. 

In the case where an older @else-unaware editor is deleting the @media and causing the @else to be mismatched to the wrong @media: well, the editor probably isn't rendering the page correctly anyway, because it is ignoring the @else.

Though, this is probably a good argument for using @when instead of matching @else to existing @media and @supports blocks. That way, the editor (and browsers) would ignore both together. Better graceful degradation. 
Received on Saturday, 11 June 2016 18:44:51 UTC

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