Update cosmetic filtering to be able to override page elements with `!important` styles
See original GitHub issueOriginally found on https://www.foodnetwork.com/recipes/food-network-kitchen/classic-shrimp-scampi-8849846, where #dfp_bigbox_recipe_top
and a few other banner ad spaces are not being collapsed. Corresponding filter rules are present in Easylist as generic class/id cosmetic filters.
Minimal example:
<html>
<head></head>
<body>
<div id="dfp_bigbox_recipe_top" style="padding: 100px; background: #ccc; display: block!important"></div>
</body>
</html>
The gray box should not be shown with Shields in aggressive mode. uBlock Origin is able to handle this correctly.
Of note is that Brave Shields creates a constructed stylesheet
rule, which gets overridden by the inline display: block!important
style on the element. uBlock Origin creates an injected stylesheet
rule, which has higher precedence.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Re-allow cosmetic filtering to override in-page !important ...
Unfortunately, the new method used to inject those CSS rules involved creating a new stylesheet for each rule, rather than the previous method ......
Read more >I'm going to be downvoted for saying this but... ublock origin ...
Doesn't this mean that web pages can easily override injected cosmetic filters since these are not injected as user styles?
Read more >OutNumbered3-1.com Ezoic Ads - Brave Community
Update cosmetic filtering to be able to override page elements with `! important` styles. Originally found on https://www.foodnetwork.com/ ...
Read more >How to create your own ad filters - AdGuard Knowledgebase
Blocking rules with $important modifier can override exceptions. Unblocking everything on a website. This rule unblocks. It disables all cosmetic rules on ...
Read more >CSS: Workaround to backdrop-filter? - Stack Overflow
1 · 1 · 1 · use another div to set background and the effect you need and use position and size same...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve confirmed that this works:
I’m not sure how to best integrate with the
hide1pContent
setting, but replacing the below:with
Solves the issue.
Verified using Beta
1.37.98, Chromium 99.0.4844.74
onSamsung GS 21
runningAndroid 12
,Samsung Galaxy Tab S7
runningAndroid 11
Tablet: