
User stylesheet support removed in Chrome 33 - hk__2
https://src.chromium.org/viewvc/chrome?revision=234007&view=revision
======
pcwalton
CSS 2.1 defines a specific order in which user-supplied style sheets'
declarations must be honored [1]. This ordering makes a lot of sense to me:
author normal overrides user normal, but user !important overrides author
!important. Can extensions easily replicate this behavior if the spec-
compliant code is purged from the selector matching engine?

[1]: [http://www.w3.org/TR/CSS2/cascade.html#cascading-
order](http://www.w3.org/TR/CSS2/cascade.html#cascading-order)

~~~
magicalist
No, not easily.

You can see that this is already the case in Firefox for Android, for
instance, where you can't supply a user style sheet (the firefox profile is
inaccessible to a user without root anyways). If you do want to provide user
styles, Stylish is the featured (and almost universally recommended) extension
for adding them. As you can see in the docs[1], though, anytime your
!important rule comes up against an author's !important rule and you lose, the
only workaround is to get more specific.

(it should be noted, though, that while CSS 2.1 does specify the cascade order
with a "must", the user being able to specify styles in the first place is a
"may", so Firefox for Android and Chrome for Android (which still doesn't
support extensions) are spec compliant, they just make overriding styles more
work and more fragile in the face of author changes)

[1] [https://github.com/JasonBarnabe/stylish/wiki/Overwriting-
pag...](https://github.com/JasonBarnabe/stylish/wiki/Overwriting-page-
styles#wiki-recommendations)

~~~
pcwalton
Yeah, I guess what I'd like is an API for extensions like Stylish to use to
add real user-level style sheets, in both Firefox and Chrome.

------
leobelle
It's trivial to write your own stylesheet. Create a directory, put a
manifest.json with a content_scripts and a css attribute plus a matching
attribute and then your css file. Like this:

[https://gist.github.com/anonymous/9311394](https://gist.github.com/anonymous/9311394)

Then turn on developer mode in extensions and load the directory. I made this
while writing this comment, that's how easy it is.

~~~
hoohoo
This is why developers need to REALLY understand they are not like other
people when building product \-----

1)Create a directory [fair enough] 2)put a manifest.json 2a) Add
content_scripts 2b) css attribute 2b __) plus a matching attribute and 3)css
file. 4)Turn on developer mode 5) Load directory

~~~
haberman
Do you really think non-developers are creating user stylesheets to begin
with?

As the commit message notes, the current setup already requires putting a .css
file in the right location inside the user-data-dir.

~~~
ubernostrum
I have had to walk people through the process of downloading a user stylesheet
and setting it up for use, typically for accessibility purposes.

I don't want to imagine that process getting even more complex than it already
is.

~~~
haberman
An extension like Stylish makes it much _easier_ to install a custom
stylesheet than the standard "user stylesheet" feature. Not harder.

------
DanBC
Is this hostile to users who need custom CSS for accessibility? Or do those
users do something else entirely?

I sometimes wish Google would release numbers when they make changes. Finding
out how many people used the plus operator (and how many of those used it
correctly) made Google's removal of it slightly easier.

Edit: the + operator for searching, apologies for not being clear.

~~~
dragonwriter
> Is this hostile to users who need custom CSS for accessibility?

Its just plain hostile to users. Accessibility is just one of the many ways it
is hostile to users. (Generally, the designer-centric app-ification of the web
which has been going on for since commercial interests other than those whose
interest was in selling access to the internet first discovered the value of
the internet to reach the public is user hostile, and this is just part of
it.)

~~~
nfoz
It always makes me really glad to know I'm not the only one who sees it this
way.

------
dchuk
Here's something that has seemed to change in the newest Chrome: When I click
the "+" (New Style Rule) in the inspector to add a new style to an element
(let's say the element has a class of ".my-element"), in previous versions of
Chrome, it would create an empty style like .my-element {}.

Now, when I do that, it creates "body > center > table > tbody > tr:nth-
child(3) > td > table:nth-child(4) > tbody > tr:nth-child(1) > td > table >
tbody > tr > td.default > span > font > p > a"

What happened here? Does that have anything to do with this User Stylesheet
stuff? Because this new functionality is infuriating and I don't even really
know what to search for to fix this change.

~~~
paulirish
Can you file a ticket at [http://crbug.com](http://crbug.com) ? I can help
restore the previous behavior.

~~~
dchuk
Will do that right now, thanks!

------
johnchristopher
> -The user-stylesheet feature requires the user to put a CSS stylesheet in
> the right location in their user-data-dir. Extensions are a much better way
> of doing this.

Uh ? Why remove that feature ? It's not buggy, unmaintainable or resource
hungry.

~~~
gnu8
At root this is a part of the push to make the web less participatory and more
like television. Users need to be gulping content and crapping cash, and they
don't need to be distracted by trivia such as altering a web site's layout for
personal usability or accessibility.

~~~
woah
I doubt it's part of some huge conspiracy. I think they removed it to clean up
some code after looking at the numbers of how many people actually used it.

~~~
nitrogen
There is a difference between "emergent behavior that looks remarkably like a
huge conspiracy but really isn't", and "huge conspiracy." Either way, the
trend is real.

------
ams6110
From the commit log message: "Extensions are a much better way of doing this."

~~~
makomk
Except that Chrome users aren't allowed to install extensions from outside the
official Chrome extension store anymore (and the ones inside the Chrome app
store aren't exactly trustworthy due to auto-update and creators transferring
ownership to adware companies - especially small single-site extensions that
sell cheaply).

~~~
Karunamon
Developer mode. Pretty sure anyone that's going to be involved in custom CSS
styles knows their way around the plugin system.

~~~
chr1
But in developer mode it always shows annoying popup, asking to disable
developer mode.

~~~
jrockway
Are you sure? I have developer enabled on all my Chromes (currently
34.0.1847.14 beta) and I have never seen this popup.

This is not to be confused with developer mode on Chromebooks, which does make
each boot very annoying.

~~~
chr1
I don't have it on chromium nightly, but on current chrome version
33.0.1750.146 it opens on every start. see
[https://productforums.google.com/forum/#!msg/chrome/6mmohdZd...](https://productforums.google.com/forum/#!msg/chrome/6mmohdZd2Xw/VYXrpc9cYj8J)
[https://code.google.com/p/chromium/issues/detail?id=337734](https://code.google.com/p/chromium/issues/detail?id=337734)

------
jccalhoun
Maybe Opera can maintain some relevance by keeping the chrome features that
google has removed.

~~~
couchand
Chances are they invented those features, anyway.

------
jamesaguilar
There are plenty of extensions to satisfy this use-case. The only question is:
how can I trust one?

~~~
hk__2
Not really. With user stylesheet (Custom.css), it was a local file you could
edit with your favorite editor, and changes were live when you saved the file.
I tried multiple extensions, and for all of them you need to paste your CSS in
a box, click on a button to save it and reload the page to see any effects,
which is quite painful compared to just typing :w<cr> in Vim.

~~~
pritambaral
You can continue to use vim, if you can paste from a file directly in a
terminal. Mac OS X comes with pbcopy and Linux has xclip and xsel.

~~~
pyre
I'm thinking that the point is that this:

    
    
      Editor <=> File
    

is simpler than:

    
    
      Editor <=> Copy/Paste Text Box/Save Button <=> File
    

It's a more cumbersome feedback loop while making changes.

------
fufufufufufu
Extensions DO NOT FIX THIS PROBLEM.

Especially not Stylish. For example, I have a custom user style sheet which
modifies the scrollbar so that it's high contrast. The current scrollbar
contrasts very poorly and hard to see so it's a necessity.

When using the exact same CSS in Stylish, it breaks when going back/forward
between pages all the time, rendering the default scrollbar instead. It's the
same for every extension. I even wrote my own, it doesn't work.

Whoever decided to offload this capability onto extensions made a TERRIBLE
decision.

------
jebblue
You could download the Stylizr Extension. I just did and it works, puts a nice
Wizard Wand on your Chrome Bar or whatever it's called:

[https://developer.chrome.com/extensions/samples](https://developer.chrome.com/extensions/samples)

------
barrkel
My own custom stylesheet:

    
    
        * { cursor:auto !important }
        a { cursor:pointer !important }
        a * { cursor:pointer !important }
    

Another reason not to use Chrome beyond tree-style tabs.

------
josteink
Yet another reason to prefer Firefox.

------
dalek2point3
and this has nothing to do with Adblock? I feel like it must ...

------
fiendsan
google givet, google take it away...

------
ezequiel-garzon
Somewhat related, I've noticed not just Chrome, but most mobile browsers apply
some sort of font boosting, inflation or some such... Isn't this breaking
standards flagrantly? I know all these clever developers mean well [1], but
still...

[1] Though I can't help feeling total arbitrariness when skipping from one
first-level HN comment to the next.

~~~
ezequiel-garzon
Could any of the downvoters expand a little bit? Do you not know what I'm
referring to? Why isn't arbitrary choice of font size a violation of CSS?

