I am currently using the @import browser hack for IE that i first read
about here:
http://annevankesteren.nl/2005/10/ie-import-hack

I have grown so fond of this technique that i have thought of extending
both it and @media in a new direction. If browsers were seen as a
type of media you could legally write fixes for any CSS issue in a
given browser. The technique would only be applied to future browsers as
no current browser sees itself as a media type. THis gives CSS authors a
way of applying fixes for inaccuracies or disparate CSS interpretations
in the future.

A main CSS file for on of my sites currently looks like this
[Quote]
@import url("layout.css");
@import url("colour.css");
@import url("fonts.css");
@import url(.css) all;
[/Quote]

In the future it could look like this:
[Quote]
@import url("layout.css");
@import url("colour.css");
@import url("fonts.css");
@import url("ie9hacks.css") ie9;
@import url("ff4hacks.css") ff4;
@import url("safari4hacks.css") safari4;
@import url("opera10hacks.css") opera10;
[/Quote]
Only the relevant media files for a site would need to be included.

I am asking for opinions on this idea. It looks like a good idea to me
because i already use the technique, so other opinions are vital before
i try to give the idea some steam with w3c or browser manufactureres.

Some may say that i should be targeting layout engines direct,
or versions of Gecko, Trident, Presto or Webkit. That may be the right
way to go, but Chrome uses Webkit with proprietary hacks, hence i went
by browser name.

With regards to multiple http requests, don't forget GZip which should
already be under consideration on large sites anyway:
http://forumdeli.com/2-how-to-serve-pre-compressed-css-js-and-other-web-content/

With Microsoft making a serious attempt to conform to CSS standards
(now), the need is reduced but there are still CSS bugs in browsers as
well as diferent interpretations within the specs themselves among
browser manufacturers. Also different browsers can conform to different
versions of the spec.

This would also allow SVG to be fed to compliant browsers as background
images without programmed or .htaccess hacks.


-- 
Michael

All shall be well, and all shall be well, and all manner of things shall
be well

 - Julian of Norwich 1342 - 1416
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to