Re: [css3-cascade] Browser extension style sheets and the cascade

On 5/16/11 10:54 PM, Jens O. Meiert wrote:
> not overly familiar with how exactly each user agent handles
> extensions, at least Chrome allows authors of extensions to apply
> style sheets to documents [1].
>
> The CSS specs, however, don’t seem to be clear—please correct me if
> I’m wrong—about what origin such style sheets are considered to have,
> or where these style sheets have to be seen when it comes to order of
> appearance.

Isn't that up to the browser and/or extension?

Gecko allows extensions to add UA and user stylesheets by registering 
them with the stylesheet service, and of course extensions can always 
add author-level sheets by changing the DOM.

> Personally I could see arguments for a
> different origin (“user agent extension”) but also for regarding such
> style sheets as user style sheets when, order-wise, coming before any
> “real” user style sheets so that “user important” style sheets still
> trump.

What's a "real" user style sheet?  Actual users don't write stylesheets; 
they don't even know what CSS is.  If an extension wants to apply CSS to 
pages, it should, imo, be free to put it in the right cascade level 
depending on what that CSS is doing.

As a simple example, ad-blocking CSS probably belongs in the user level. 
  But CSS for implementing a subset of MathML functionality in a browser 
with no native MathML support belongs in the UA level.  Both seem like 
things extensions might want to do.

-Boris

Received on Tuesday, 17 May 2011 15:21:45 UTC