W3C home > Mailing lists > Public > www-style@w3.org > April 2014

RE: [css-variables] Another use case for "cascade"

From: François REMY <francois.remy.dev@outlook.com>
Date: Thu, 17 Apr 2014 22:00:25 +0200
Message-ID: <DUB404-EAS295DAE82D0F2945B9F6DC90A5520@phx.gbl>
To: <liam@w3.org>
CC: "'CSS WG'" <www-style@w3.org>
± >     :hover {
± >         background: var(--hover-background, cascade) !important;
± >         color: var(--hover-color, cascade) !important;
± >     }
± 
± by using !important you are overriding my user stylesheet.... 

If so, this is a bug in your user stylesheet. I also have user stylesheets and always use "!important" on my declarations if they are meant to override the author's rules.

[[
   User agent style sheets may also contain ‘!important’ declarations. 
   These override all author and user declarations.
   
   http://www.w3.org/TR/css-cascade-3/#importance
]]


_________________________

± You are setting the text colour and not the background colour and
± so I will see black text on a black background. 

This is also wrong. I'm respecting the WAI principles by setting both the background and the color at the same time, making sure they always end up being contrastful enough. Look at the code.


_________________________

Now, if anyone still has some more comments to make about "!important", may I ask you to start a new thread, and leave the "cascade" use case thread focused on "cascade". 

Kind regards, 
François.
Received on Thursday, 17 April 2014 20:00:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:21 UTC