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

Re: calc() in Media Queries (Was: [CSSWG] Minutes Telecon 2013-05-15)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 17 May 2013 12:40:08 -0700
Message-ID: <CAAWBYDAM5ZDMNZccK03Zj4q9EbjoVBkmzvjFz7fCbvn2tj4maQ@mail.gmail.com>
To: Florian Rivoal <florian@rivoal.net>
Cc: www-style list <www-style@w3.org>
On Fri, May 17, 2013 at 12:15 PM, Florian Rivoal <florian@rivoal.net> wrote:
>> calc()
>> ------
>>    <glazou> https://www.w3.org/Style/CSS/Tracker/issues/327
>>    glazou: where is calc() allowed?
>>    glazou: in particular, whether it can be used in a MQ?
>>    glenn: wouldn't be easier to define where it can't be used?
>>    fantasai: we should think about all the places where it can be used and
>>              consider examples
>>    glazou: who will do this review? when?
>>    fantasai: we can talk about media queries now
>>    dbaron: media queries can't take percentages for width so this limits
>>            its value
>>    dbaron: but I do not object allowing calc with different units
>>    glazou: are there use-cases for this? do authors ask for it?
>>    fantasai: yes I think some people asked for it
>>    glazou: I never needed it when I used MQ; I can't think of a
>> use-case...
>>    <stearns>  @media screen and (min-width: calc(20em + 6px))
>>    <stearns> from
>> http://lists.w3.org/Archives/Public/www-style/2007Nov/0227.html
>>    glazou: objection to allow calc?
>>    RESOLVED: calc() can be used inside media queries
> Should this be specified in the MQ spec, or can it be done in the
> Values and Unitsspec only? Since V&U introduces it by saying:
>   "It can be used wherever <length>, <frequency>, <angle>, <time>,
>   <number>, or <integer> values are allowed."
> I suppose it just needs a clarification there, and no change is needed
> in the MQ spec. Do we agree on that?

Nothing needs to be changed anywhere - this resolution is just in line
with what the specs already say.  MQ's token-based syntax just defers
to "expr", which covers calc(), and the individual MQs use property
grammar productions like <length>, which include the appropriate

Received on Friday, 17 May 2013 19:40:58 UTC

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