-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend matches-css() to support any pseudo-element
This commit deprecates matches-css-before() and matches-css-after(): these should no longer be used once 1.45.0 is published and widespread. The deprecated syntax will eventually be removed in some future. The syntax of procedural operator matches-css() has been extended to also be able to target pesudo elements. Examples: Same as before: example.com##p:matches-css(opacity: 0.5) This is the new way to target an `::after` pseudo-element: example.com##p:matches-css(after, content: Ads) This is the new way to target a `::before` pseudo-element: example.com##p:matches-css(before, content: Ads) The new syntax also means any valid pseudo-element can now be used as a target: example.com##p:matches-css(first-letter, opacity: 0.5) If the first argument does not match the pattern "property name: value", then it will be deemed a pseudo-element to target, and the second argument will be the "property name: value". Related issue: - AdguardTeam/ExtendedCss#150
- Loading branch information
Showing
2 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters