adblock remove css rule/class without blocking it

Anything that has something to do with a computer is welcome here.
User avatar
Posts: 2519
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary

adblock remove css rule/class without blocking it

Unread post 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> }$#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$#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 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 !important)$#body.modal-open{ overflow:scroll !important; }
I chose to use the second one, actually.

Posts: 110
Joined: Wed Jan 21, 2009 12:46 pm

Re: adblock remove css rule/class without blocking it

Unread post by BugMeNot »

This is a guest account intended for use by people who wish to remain anonymous or hate registering.
(Please don't forget to sign your posts with your name if you want us to know who you are.)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest