Re: [CSS22] [Section 6.4.2 !important rules] How an user style sheet rule can override an author inline style with !important

Le 2016-11-14 23:25, Xidorn Quan a écrit :
> On Tue, Nov 15, 2016, at 02:20 PM, Gérard Talbot wrote:
>> but again, my understanding is specificity should not matter since 
>> user
>> style sheet for that h1 element has !important. What am I missing 
>> here?
>> 
>> For convenience, people can use one of these extensions for that test:
>> 
>> The "Text sample 2" is red in Firefox 49.0.2, Firefox 53.0a1, Chrome
>> 54.0.2840.100 when I use one of those extensions.
> 
> Your understanding is correct that important rules in user style sheet
> should override important rules in author style sheet no matter what
> specificity they have.
> 
> I tested in Firefox, and it seems if the style is put in 
> userContent.css
> [1], the testcase works as expected. (userContent.css currently doesn't
> work with multi-process Firefox, though, which is a known bug [2] we 
> are
> working on.)
> 
> The issue here is that, those extensions are not really using user 
> style
> sheet. I believe they are implemented by inserting the rules into the
> page somehow, so they are actually author style sheet from perspective
> of browsers' style system. This is not necessarily something we should
> blame the extensions, though, because it could be due to lack of
> extension API support from browsers.
> 
> [1] http://kb.mozillazine.org/UserContent.css
> [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1046166
> 
> - Xidorn

Xidorn,

Thank you for your complete and detailed answer. I appreciate this.

Gérard

Received on Wednesday, 16 November 2016 20:15:09 UTC