Page 1 of 1

adblock remove css rule/class without blocking it

Posted: Mon Nov 05, 2018 8:16 am
by 3ICE
I'm fighting body class="modal-open" which kills scrolling by applying overflow:hidden to the whole page.

Adblock styling filters are written like so:

Code: Select all

<domain.tld> + #$# + <CSS selector> + { <CSS style> }
3ice.hu#$#a{color:red}
I found this on StackOverflow wrote:Just avoid putting a space between the selector and the opening brace. Because it can give you some trouble.
Here is an example of a CSS rule that changes Twitter background:

Code: Select all

twitter.com#$#body.logged-in{ background-color: #ffcc00 !important; }
If that's not working for you, here is another way to change an element's style:

Code: Select all

example.com##h1:style(background-color: blue !important)
Make sure not to use curly brackets.
I use uBlock Origin, and both answers work for me.

Here are two examples of the two potential style fixers I can use on the bad website:

Code: Select all

penny.hu##body:style(overflow:auto !important)
penny.hu#$#body.modal-open{ overflow:scroll !important; }
I chose to use the second one, actually.

Re: adblock remove css rule/class without blocking it

Posted: Thu Mar 28, 2019 10:20 am
by BugMeNot