W3C home > Mailing lists > Public > www-style@w3.org > May 2011

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 17 May 2011 10:48:49 -0400
Message-ID: <4DD28AD1.9050007@mit.edu>
To: "Jens O. Meiert" <jens@meiert.com>, www-style list <www-style@w3.org>
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.

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

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