Tweaking website styles with uBlock Origin filters

Published on in Miscellaneous

Use the :style() operator in a uBlock Origin filter to apply CSS styles to the targeted elements.

Here's how I use the :style() operator:

Here are the filters (under the "My filters" tab in the uBlock Origin dashboard):

! underline links
bazqux.com##.post .mtext a:style(text-decoration: underline !important)

! hide points
hckrnews.com##.entry.row a:first-child span:style(opacity: 0)

! highlight visited comment links
hckrnews.com##.entry.row a:first-child:style(outline: 20px solid white; outline-offset: -20px)
hckrnews.com##.entry.row a:first-child:visited:style(outline-color: #eee)

I know there's also e.g. Stylus extension for Firefox, but the fewer extensions I need, the better.