RE: Same source multiple times with @import

> 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);
-->
<STYLE>
@import url(c.css);
@import url(a.css);
</STYLE>

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

-Chris

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