Re: [mediaqueries] Should inverted-colors be <mq-boolean>?

> On 18 Oct 2014, at 10:53 am, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> On Fri, Oct 17, 2014 at 4:46 PM, Dean Jackson <dino@apple.com> wrote:
>> http://dev.w3.org/csswg/mediaqueries-4/#inverted
>> 
>> The output values are listed as none | inverted, but the example is
>> 
>> @media (inverted-colors) {
>> 
>> }
>> 
>> Maybe this should be a <mq-boolean>? Although I guess there could be some intermediate states of inversion added in the future (e.g. "only-text"). If so, even though it is obvious, it should probably be explicit stated that (inverted-colors) is the same as (inverted-colors: inverted).
> 
> MQ4 explicitly states that "none" is a falsey value when evaluated in
> a boolean context.  <mq-boolean> shouldn't be used for anything in the
> future, for the same reason that we don't use boolean values for CSS
> properties - we have a long history of extending previously-boolean
> things to be multi-value.

Great! I missed the bit about "none" being falsey. Thanks.

Dean

Received on Friday, 17 October 2014 23:55:19 UTC