RE: @import -- allow at any place in stylesheet.

That frameworks allow it is a good data point. I still would rather enable it based on the use-cases that demonstrate
the value of the capability vs. just doing it because others are doing it. While it’s cool they do so in that it could allow
us to see what it’s used for and assess whether the benefits are worth the cost, server-side preprocessing can’t be
view-sourced…

From: Pete Boere [mailto:pete@the-echoplex.net]
Sent: Wednesday, January 18, 2012 1:46 AM
To: www-style@w3.org
Subject: Re: @import -- allow at any place in stylesheet.

Most preprocessors allow @import statements throughout a stylesheet. IMHO it looks little odd aesthetically so I can see some merit in the current restriction.

In practice I often use a seed file which contains only @import statements. This manages complexity and works  with existing standards.

On 18 January 2012 03:11, Boris Zbarsky <bzbarsky@mit.edu<mailto:bzbarsky@mit.edu>> wrote:
On 1/17/12 9:06 PM, Ambrose LI wrote:
2012/1/17 Sylvain Galineau<sylvaing@microsoft.com<mailto:sylvaing@microsoft.com>>:
So what's the fix? How do you make the failure non-silent?

That’s would, I suppose, not be a CSS problem per se, but purely a
browser-specific implementation issue. Perhaps what we need is just
making it non-silent if developer tools are running.

Gecko already reports a misplaced @import rule:

 Unrecognized at-rule or error parsing at-rule '@import'. @ data:text/html,<style>foo%20{}%20@import%20url(bar);%20</style>:1

You just have to actually look in the error console or web console or Firebug console or whatever console you want.

-Boris



--
Pete Boere
Web Developer

Received on Wednesday, 18 January 2012 18:07:07 UTC