25

I would like to modify Chrome's user agent stylesheet. I am not looking for how to override them with CSS. I want to modify the default values and add some new rules that would help me speed up my workflow and enhance my browsing experience.

Please also I am not looking for an extension that would do this job for me.

Ahmad Alfy
  • 361
  • 1
  • 3
  • 6

1 Answers1

26

For Chrome v32 and below:

  1. In Google Chrome, go to URL about:version and take note of the "profile path".
  2. Browse to the profile path in your file browser. Inside your profile folder, open the User StyleSheets folder. Inside "User StyleSheets", there should be a file called Custom.css, empty by default.
  3. Just add your styles in Custom.css.
Michael
  • 103
  • 2
pietrodn
  • 555
  • 4
  • 5
  • 2
    @Ahmad, you said `I would like to modify Chrome's user agent stylesheet. I am not looking for how to override them with CSS. I want to modify the default values` but you accepted an answer that does exactly what you didn’t want: override the default values with CSS. If that *is* what you want(ed), then you should edit your question (and remember to add [`!important`](http://www.w3.org/TR/CSS21/cascade.html#cascading-order) to your user styles).     (If you actually want to modify the program’s user agent styles, you’d have to download the Chromium source, modify it, and compile your own copy.) – Synetech May 13 '13 at 03:53
  • 2
    @Synetech By saying `I am not looking for how to override them with CSS` I meant that I don't want to write overrides on the CSS files I develop. I want it to be inherited in Chrome and by applied on whatever page I visit. This solution did exactly what I meant. This part was added to avoid getting answers like `Just write your own CSS and it will override the browser's agent`. Do I make any sense? – Ahmad Alfy May 13 '13 at 11:50
  • 1
    `This part was added to avoid getting answers like  “Just write your own CSS and it will override the browser's agent.”  Do I make any sense?`   @AhmadAlfy, not really. The custom user stylesheet does exactly what you just repeated you wanted to avoid: writing your own stylesheet to override the brower’s styles. `o.O`  So while I understand what you seem to want to do, I don’t understand what you want to avoid. – Synetech May 13 '13 at 19:17
  • 1
    @Synetech say for example you wanted all

    tags to display red on any page you visit? This is the way to do it. What he's probably trying to avoid is it being overwritten by the developer's stylesheet.

    – Steven Liekens Nov 07 '13 at 07:45
  • 2
    @StevenLiekens, yes that’s the only thing that makes sense: that by `not looking to override with CSS`, he meant *per page*. That’s why I suggested he edit the question for clarity if that’s what he meant since the user style-sheet *is CSS*. – Synetech Nov 07 '13 at 07:52
  • 19
    Unfortunately, this doesn't seem to work any more, as of Chrome 32: http://stackoverflow.com/questions/21207474/custom-css-stop-to-work-in-32-0-1700-76-m-google-chrome-update – Magnus Hoff Mar 02 '14 at 14:11
  • 13
    Yup, Google decided to drop user stylesheets altogether even though they have been an essential part of web-browsers since practically the dawn of time (I started using it in IE4 or 5). Their excuse is that few people use it, so dropping it will improve performance, which is [utter BS](http://www.google.com/search?q=chrome+user+stylesheets) on all three counts). I kept ignoring it’s ever increasing problems by saying that it was still worth it because it was better than other browsers, but that’s just not true anymore. I’m “outie”! It was good 138 weeks. Good Chrome: Sep.2008 - Apr.2011. RIP. – Synetech Mar 27 '14 at 05:01
  • 1
    @Synetech So what browser do you now use? – Rehan Khan Nov 04 '17 at 04:56
  • 2
    Unfortunately Brave doesn't have "User StyleSheets" at `AppData\Local\BraveSoftware\Brave-Browser\User Data\Default` either. – Ryan Nov 19 '20 at 14:16
  • 1
    user stylesheet is not equivalent to user agent stylesheet. – rosshjb Sep 24 '21 at 11:55