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

RE: Same source multiple times with @import

From: Chris Wilson <cwilso@MICROSOFT.com>
Date: Mon, 5 Jan 1998 14:26:37 -0800
Message-ID: <C35556591D34D111BB5600805F1961B90229E7B6@red-msg-47.dns.microsoft.com>
To: "'neil@bigpic.com'" <neil@bigpic.com>
Cc: www-style@w3.org
> Neil St.Laurent [SMTP:neil@bigpic.com] wrote:
><example deleted>
>It isn't clear where to stop importing and which sheet to use.  I 
>know the algorithm is fairly simple and doesn't waste much memory, 
>but its unclear as to what actually happens with multiple inclusions 
>if they are cyclic, include their parent,or otherwise.

If they're cyclic, they include their parent (or themselves) and vice-versa.
I would propose the CSS2 spec declare that

"Treating stylesheets as a tree of stylesheet nodes (the document being the
root) if an imported stylesheet has the same URI as one of its direct
ancestors, that import should be ignored."

>And the fact 
>that they are actually "imports" and not inclusions would seem to 
>imply importing more than once is useless and possibly ignored.

Not true.  The designer may wish to control the cascading of external
stylesheets that are imported into site-wide stylesheets as well.  E.g.,

<LINK REL="stylesheet" type="text/css" HREF="/x.css">
<!-- where /x.css contains:
	@import url(a.css);
	@import url(b.css);
@import url(c.css);
@import url(a.css);

I believe only the cyclic problem should be addressed - multiple importing
may have some uses.

Received on Monday, 5 January 1998 17:27:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:46 UTC