Re:User stylesheet support removed in Chrome 33
by leobelle on Sunday March 02, 2014 @01:46PM
(#7330181)
! isn't as simple as that. CSS is cascading. If there are conflicting ! then rule specificity would be taken into account. If the rules have similar specificity the last one evaluated wins. I imagine user extensions are loaded at the end so in that case they would win.
[ Parent
| on HN ]
Re:User stylesheet support removed in Chrome 33
by pcwalton on Sunday March 02, 2014 @01:54PM
(#7330220)
No. !important supplied by the user is always higher than !important supplied by the author (and the opposite is true for non-!important), regardless of specificity. Specificity only comes into play when considering two rules supplied by the user or two rules supplied by the author.
If user agent style sheets are removed from the engine, then extensions will have to start considering specificity when adding style sheets to the end of the list, because they'll all be considered "author" rules. But user style sheets shouldn't have to worry about specificity, per the spec.
Re:User stylesheet support removed in Chrome 33
by leobelle on Sunday March 02, 2014 @02:13PM
(#7330308)
That would break how CSS works. I don't like it.
Re:User stylesheet support removed in Chrome 33
by mpyne on Sunday March 02, 2014 @02:25PM
(#7330361)
He is describing how CSS is spec'ed to work right to you. The proposed Chrome change would be breaking how CSS works.
Re:User stylesheet support removed in Chrome 33
by leobelle on Sunday March 02, 2014 @03:00PM
(#7330517)
Yes I understand, but I wouldn't want that in a chrome extension personally. It could make styling harder. When you nuke rules without considering specificity it can cause unintended consequences. If everything just followed regular CSS rules as if all CSS was applied by the author there would be less of a chance of changing something you hadn't intended to change.
Re:User stylesheet support removed in Chrome 33
by officemonkey on Sunday March 02, 2014 @04:54PM
(#7330934)
The people who use user style sheets (especially !important rules) in CSS aren't particularly interested in your styling. They're interested in the content in a style that works for them.
This is an important accessibility feature of CSS and I'm disturbed at any reduction in support for this feature.