W3C home > Mailing lists > Public > www-style@w3.org > April 2015

Re: [mediaqueries] Use custom media queries in custom media query definitions?

From: Glen Huang <curvedmark@gmail.com>
Date: Wed, 15 Apr 2015 19:33:36 +0800
Cc: www-style list <www-style@w3.org>
Message-Id: <267D24C1-22C5-4EBA-A427-00FFE648D0F4@gmail.com>
To: Florian Rivoal <florian@rivoal.net>
Thank you.

Am I correct this is the difference between a false one and an undefined one?

@custom-media --true true;
@custom-media --false false;
@custom-media --circular (--circular);

@media (--false) or (--true) /* match */
@media (--circular) or (--true) /* won't match */

> On Apr 15, 2015, at 12:21 AM, Florian Rivoal <florian@rivoal.net> wrote:
> 
>> 
>> On 13 Apr 2015, at 04:14, Glen Huang <curvedmark@gmail.com> wrote:
>> 
>> The spec didn't say if this is possible:
>> 
>> @custom-media --foo (width < 10em);
>> @custom-media --bar (--foo);
>> 
>> And what happens when there are circular references:
>> 
>> @custom-media --foo (--foo);
>> @custom-media --bar (--baz);
>> @custom-media --baz (--bar);
>> 
>> I hope reusing custom media queries is possible, and circular references evaluate to false.
> 
> I agree with you that the spec isn't very clear about this.
> 
> I almost agree with you. Rather than false, I think custom MQs
> with circular references should not be defined at all. I've updated
> the spec accordingly.
> 
> - Florian
Received on Wednesday, 15 April 2015 11:34:14 UTC

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