How do I turn on user styles (custom.css) support in Brave?

Description of the issue:
I use user defined styling from time to time to alter unwanted factors on a few web sites. I have found the custom.css file for Brave but it isn’t changing a web site that I’m targeting. (The equivalent action is working in another browser.) I suspect that I need to switch on support for user style definitions. I’ve looked in both settings and brave://flags and can’t see the setting I need to make.

I’ve seen extensions that do this sort of thing but prefer the approach of custom.css. (An extension called Stylish did this sort of thing, but fell into the hands of enemies of humanity, and exposed people to a lot of surveillance.)

How do I enable custom.css?

Steps to Reproduce (add as many as necessary): 1. 2. 3.

Actual Result (gifs and screenshots are welcome!):

Expected result:

Reproduces how often:

Operating System and Brave Version(See the About Brave page in the main menu):
I’m on Win 10, 64 bit, pro. Currently using Version 1.36.116

Additional Information:

1 Like

I know nothing about this topic but would like to know more! So, I’m putting what little I know that I think is related, just to bump the topic. Maybe someone with more knowledge will drop in and help!

brave://adblock → Custom Filters
Main Menu → More Tools → Developer tools (Ctrl-Shift-I)

1 Like

Just ran across another related topic which probably answers your problem. Just posting moderator reply and links.

Per comments in the GitHub issue report, the fix is on Nightly and should be in the Release version soon.

1 Like

This is not about blocking adverts.

It’s not directly about developer tools either, though I may use the developer console to identify which CSS selectors to alter. Those tools do a good job.

This is instead about altering page styling, like colours, to replace what I find to be poor choices.

1 Like

Thanks for the info. This just raises more questions for me. As stated before, I know nothing about this topic, just trying to learn a little bit about the issue. Please feel free to ignore my questions! And again, hopefully someone with more knowledge about your issue will pop in and help.

Questions:

  1. How would you normally change this if not routinely using dev tools?
  2. Are you usually allowed in other browsers (esp Chrome) to use “user defined styling” by having “found the custom.css” file and making changes directly to that file?
  3. Per an older GitHub issue, “the UI is not HTML/CSS/JS anymore- it’s all C++ using Chromium views. It’s quite a bit harder to edit, but definitely doable”, does this have anything to do with your issue?
1 Like

I don’t keep up to date with all details of how browsers change, which may have happened here.

Traditionally in browsers you could pick specific fonts etc. for styling where not otherwise defined.
On top of that there’s a mechanism using a CSS sheet. In some cases a universal change in others you can do it domain by domain, if you wish.

The names of the sheets vary a bit. userContent.css and Custom.css spring to mind.

I’ve used them for years.

The dev tools have no direct impact, they’re useful for checking the CSS selectors that apply to a feature on a web page.

My observation is that some browser makers are hostile to users taking charge and making their systems work the way they want. (Not how somebody who they’ve never met and who might be their enemy wants.) I wouldn’t be surprised if this were another case of that. (I’m not suggesting Brave is the enemy here, they do a better job than most others. I’m wondering whether the underlying Chromium “browser” has changed in this way.)

2 Likes

I wrongly expected developers to read this post. I pretty sure now that doesn’t happen. So to close this out I did some more research.

This is not definitive, but I assume that this capability, that was there before, has now been removed. How it was removed, I don’t know.

Some notes:

  1. Brave used to have a mechanism that half did this job. Not the part I need unfortunately. It removed some elements entirely. This seems to have been removed. The mechanism I want seems to have also been present as illustrated by the presence of a custom.css file in Brave configuration directories.
  2. I’d forgotten, I raised this issue in 2019, when it was preventing me from using Brave. Then, too, I got no technical reply. Centralized CSS / Element Blocking Management
  3. I found some discussions, going on for years, about this issue. One person was determined enough to came up with a Chrome Extension to fix it. I haven’t check his work. https:[slash][slash]github[dot]com[slash]Eltee-Taiwo[slash]ChromePageStyler[slash]blob[slash]master[slash]scripts[slash]ActiveStyleLoader[dot]js
  4. Don’t use Stylish, it fell into the hands of people who have tricked many into being surveilled.

My conclusion. Not worth more of my time. I fixed it (for now) with something called Stylus that alters CSS. (Not ideal: I now need to maintain another mechanism and this mechanism is, I’m sure, slower than my first choice.) Matter closed.

Hope that saves somebody else some time.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.