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

Re: [mediaqueries] Add "<" and ">" syntax?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 13 Nov 2013 20:16:32 -0800
Message-ID: <CAAWBYDDTHKyyrUee9ZWfFnF5iDBCAENNKVd1QbS724MLH+L24g@mail.gmail.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, "www-style@w3.org" <www-style@w3.org>
On Wed, Nov 13, 2013 at 2:06 PM, Andrew Fedoniouk
<news@terrainformatica.com> wrote:
> While we are on this page what about adding support of basic math
> there - the same set of rules/syntax used by the calc():
>
> (width < 800px + 40px)
> (width < 800px * 2 + 40px)
> (width < 800px * 3 + 40px)
>
> So calc() and media queries will use same expression syntax (reduced
> in calc case). So UAs can implement this using the same expression
> evaluation code.

Just use calc():

(width < calc(800px + 40px))

~TJ
Received on Thursday, 14 November 2013 04:17:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:36 UTC