W3C home > Mailing lists > Public > www-style@w3.org > December 2013

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 11 Dec 2013 14:12:18 +1100
Message-ID: <CAAWBYDCPzGO7CgB4BPET1NSEZq3N1-25W3wVyd_d0LvU06OXCA@mail.gmail.com>
To: James Craig <jcraig@apple.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, public-indie-ui-comments@w3.org, "www-style@w3.org list" <www-style@w3.org>
On Wed, Dec 11, 2013 at 12:40 PM, James Craig <jcraig@apple.com> wrote:
> 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.

Yes, please avoid using 0/1 for booleans; instead use none/anything
else.  (grid) is the only boolean MQ still using 0/1 because we
couldn't think of better words, and also don't really care about it.

~TJ
Received on Wednesday, 11 December 2013 03:13:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:17 UTC