W3C home > Mailing lists > Public > www-style@w3.org > January 2008

RE: [CSS 2.1] @charset, @import, and error recovery

From: Justin Rogers <justrog@microsoft.com>
Date: Sat, 26 Jan 2008 16:58:21 -0800
To: "L. David Baron" <dbaron@dbaron.org>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <00BD06E707F60B4F9D6A3E75C712209D49A94E5DDF@NA-EXMSG-C104.redmond.corp.microsoft.com>

> > Browsers are inconsistent here.

> How?


I've given an example below. I've messed up two charset rules supplied a bogus page and media, given a valid import (a.css which is DIV { color: purple }), followed by an invalid one, followed by another valid one (c.css which is DIV { color: green; })...

Opera: black
Safari: black
FireFox 3 Beta 2: green

Now, if you remove the top 4 items (both charsets and the page/media)

Opera: purple
Safari: green
FireFox 3 Beta 2: green

Justin [MSFT]
(sample below)

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<style>
@charset "utf-8" foo bar baz;
@charset "utf-8" foo bar baz;
@page { }
@media { }
@import url(a.css);
@import url(b.css) foo bar;
@import url(c.css);
</style>

<div>Hello</div>
Received on Sunday, 27 January 2008 00:58:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:00 GMT