Re: [css-syntax]The emperor isn't naked, but he's wearing his underpants on his head

Le 2016-11-05 19:03, Felix Miata a écrit :
> Gérard Talbot composed on 2016-11-05 17:47 (UTC-0400):
> 
>> An inline style is (should be!) for an unique element.
>> Therefore, an inline style should be more specific than a class.
> 
> That only works if the only styles are author, or if users aren't
> supposed to have ultimate control.

Yes. If media (origin) is the same and if importance (user, author, user 
agent with !important or not) is the same, then inline style is more 
specific than a class attribute.

https://www.w3.org/TR/CSS21/cascade.html#cascading-order

> AFAICT, inline styles are
> hopelessly immune to user overrides,

Hm... no. An author inline style can be (will be and should be) 
overriden by an user !important class attribute. Untangling specificity 
only comes after untangling importance. And I believe the CSS 2.1 test 
suite has not tested this... can not find it in

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/chapter-6.htm#s6.4

[
I think we need to test this... Something like:

  <body>
         <p id="cascade">PREREQUISITE: The <a 
href="support/cascade.css">"cascade.css"</a> file is enabled as the user 
agent's user style sheet.</p>
         <p>Test passes if "Text sample" is green.</p>
         <h1 class="cascadegreenimportant" style="color: red;">Text 
sample</h1>
  </body>

where the user style sheet is:

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/support/cascade.css

]

> thus shouldn't be in the spec at
> all. Users shouldn't have to disable styles entirely in order to make
> one specific element usable.

I agree. Users shouldn't have to disable author styles entirely in order 
to make one specific element usable.

Gérard

Received on Sunday, 6 November 2016 00:01:48 UTC