W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: Proposal: @-rule for containing exclusive @media rules

From: Sebastian Zartner <sebastianzartner@gmail.com>
Date: Mon, 22 Oct 2012 10:32:10 +0200
Message-ID: <CAERejNZ-dsmp0RwGMikdvgSenyx-wRUF87NSwqpFkGBncVWhjQ@mail.gmail.com>
To: Pete Boere <pete@the-echoplex.net>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Fran├žois REMY <fremycompany_pub@yahoo.fr>, www-style list <www-style@w3.org>
>
> @switch import {
>>        "desktop.css" (min-width: 1000px);
>>        "phone.css" (min-width: 480px);
>>        "small-phone.css" all;
>>    }
>
>
> Doesn't this already work with current specs and less fuss?
>
>  @import "desktop.css" screen (min-width: 1000px);
>  @import "phone.css" screen (min-width: 480px);
>  @import "small-phone.css";
>

Wrong. In the case the width is e.g. 1100 all three files will be loaded
while the @switch solution would just load one of them.

Sebastian
Received on Monday, 22 October 2012 08:32:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT