Re: [indie-ui-context] boolean media queries should probably use 1/0 values, not on/off

It was also recommended to switch the false value to “none” instead of “off” and that anything else was “truthy” which would allow the shorthand syntax. 

Is there a preference for 0 over none? As Tab mentioned, boolean media queries have a way of not remaining boolean.


On Dec 10, 2013, at 5:36 PM, L. David Baron <dbaron@dbaron.org> wrote:

> https://dvcs.w3.org/hg/IndieUI/raw-file/default/src/indie-ui-context.html#userMediaSettings
> sections 2.3 (User Media Settings) and 2.4 (Screen Reader Settings)
> define a number of media features with on | off values.
> 
> I tend to think these should probably have 1 | 0 values instead,
> to match the other boolean-like media features in
> http://www.w3.org/TR/css3-mediaqueries/ such as color, monochrome,
> and grid.  Using <integer> values 1 or 0 allows authors to use more
> boolean-like syntax:
>  (screenreader)
> rather than having to write:
>  (screenreader: on)
> since the media queries spec treats zero values as a special case in
> http://www.w3.org/TR/css3-mediaqueries/#media1 .
> 
> -David
> 
> -- 
> 𝄞   L. David Baron                         http://dbaron.org/   𝄂
> 𝄢   Mozilla                          https://www.mozilla.org/   𝄂
>             Before I built a wall I'd ask to know
>             What I was walling in or walling out,
>             And to whom I was like to give offense.
>               - Robert Frost, Mending Wall (1914)

Received on Wednesday, 11 December 2013 01:40:52 UTC