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

[css3-cascade] Stylesheets imported in multiple places (was: Editorial issues)

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Wed, 19 Dec 2012 14:09:22 +0100
Message-ID: <50D1BC82.2030902@kozea.fr>
To: "L. David Baron" <dbaron@dbaron.org>
CC: fantasai <fantasai.lists@inkedblade.net>, www-style@w3.org
CSS 2.1 has a sentence that I can’t find in css3-cascade but should be 
there, probably in section 2:

> When the same style sheet is imported or linked to a document in
> multiple places, user agents must process (or act as though they do)
> each link as though the link were to a separate style sheet.

In my understanding, this also applies to CSSOM:

* Given two CSSImportRule objects with the same href, their styleSheet 
attributes are not the same object.
* Changing one (eg. through .insertRule()) does not affect the other.

Is this correct? Either way it should be specified somewhere, but it’s 

Le 18/12/2012 23:11, L. David Baron a écrit :
> I suspect it might help to define things slightly more formally, in
> terms of a tree structure (with ordered siblings) and some
> terminology.  (Doing so requires care to exclude any attempts by a
> style sheet to import itself or one of its ancestors.)

I agree, if only to define how exactly cycles are broken (or make it 
explicitly undefined.) For example, what is the "same" stylesheet? 
"same" should at least compare URLs after making them absolute, but 
there could be more or less normalization. Anne suggests comparing the 
serializations of parsed objects [per http://url.spec.whatwg.org/] 
without fragment identifiers.

Simon Sapin
Received on Wednesday, 19 December 2012 13:10:26 UTC

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