Skip to content

Describe changes to element hiding rules in CoreLibs 1.18 #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ngorskikh
Copy link
Member

Subj.

For example:

```adblock
example.org##body { background-color: green; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest mentioning remove rules here, such as example.com##h1 { remove: true; }.
Another important point is that in the free version, only remove rules work — as far as I understand, other types of CSS injections (like coloring) are part of the premium ABP subscription.
ABP refers to these rules collectively as “Inline CSS” rules btw.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, if that's the case, can we limit the support to remove: true and just not support their premium functionality? It makes little sense since the rules for that are a part of their premium bundle and it cannot be shared&used in other ad blockers.


```adblock
example.org#@#body
example.org#@#body { background-color: green; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, both options work in ABP, but what’s important is that ABP only checks the selector during allowlisting, while ADG checks the entire rule. We’ll probably need to resolve this inconsistency at some point.
cc @ameshkov

For example:

```adblock
example.org##body { background-color: green; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, if that's the case, can we limit the support to remove: true and just not support their premium functionality? It makes little sense since the rules for that are a part of their premium bundle and it cannot be shared&used in other ad blockers.

```

This usage is discouraged in favor of using [CSS rules](#cosmetic-css-rules) and is only supported for compatibility with filter lists written for Adblock Plus.

Element hiding exceptions (`#@#`) can match such a rule both by its selector part and by the full rule text.
For example, the rule `example.org##body { background-color: green; }` can be disabled by any of the following exception rules:
Element hiding exceptions (`#@#`) are matched by the selector part only, ignoring the declarations block part.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Element hiding exceptions (`#@#`) are matched by the selector part only, ignoring the declarations block part.
Element hiding exceptions (`#@#`) are matched by the selector part only, ignoring the declaration part.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ remove: true; } is the declarations block, I'm refering to the part of the rule that is the declarations block :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see
ignore my suggestion then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants