Re: Proposal: Allow Support for Multiple External Style Sheets with Limited Scope

> I propose “markup support” for a new styling property that would allow
> embedded and inline style attributes the ability to call upon an
> external style sheet that’s scope is the same as if the styling
> properties were embedded or inlined in the markup.
>
> For example, if I imagined this property, it would be called
> "stylelink" and it would work like this:
>
> <div style="stylelink:url(http://www.LonnieBest.com/style.css)">
>
> <p>I want all elements inside this div tag to be influenced by the
> external style sheet specified in the stylelink property above, but I
> don't want any other elements outside this div tag to be influenced at
> all by that external style sheet specified in the stylelink property.
>
> </p>
>
> </div>
>

Hi,

I don't know how active the www-style mailing list is, but since you are
proposing a CSS property, that's where this should really go.

Second, is there any particular part about this that cannot be solved by
the use of a class attribute?

<div class="completelyforeign">
<p>Inside the tag.</p>
</div>

And in your "external stylesheet", you simply prefix every selector with
.completelyforeign. This will cause these selectors to apply to the tags
inside the div with increased specifity, while the tags outside are
completely unharmed.
Then you could group all these styles in a single sheet, thus reducing
the number of separate HTTP requests.

Sebastian Redl

Received on Thursday, 7 July 2005 16:11:08 UTC