:style()
action operator doesn't work great with some ::-webkit-*
pseudo-classes, if other pseudo classes are used/need in the same rule.
#326
Labels
uBO-parity
pending features that are already available in uBO
Seems like Brave adblocker style operator, doesn't work correctly with some pseudo classes that are 'chained' to further polish the CSS style injection.
I don't know if it is exclusive to
::-webkit-*
pseudo classes, or others could be also affected, I tested some and it seems that the issue was only in the webkit ones.The problem is that some rules need other pseudo classes to further modify their look and behavior and polish the rule, but they are not parsing in the adblocker .
This means that it will only work with the basic
::-webtki-*:style()
but not when you need anything else like::-webtki-scrollbar*:pseudoclass:style()
or longer, it doesn't workI got to examples:
::-webkit-slider-thumb
Add:
go to https://a11ysupport.io/tests/html/html/inputs.html
And you will see how the
:hover
doesn't work, but if you remove the:hover
it will work fine.::-webkit-scrollbar#css_scrollbar_selectors
This is a more complicated and depth pseudo class and while not a standard CSS it would be nice if it would completely work with the style action operator.
The webkit - styling-scrollbars page shows the many pseudo classes that can be page, shows how many pseudo classes can be applied to it:
Also it mentions these other ones that can be seen as more useful when styling the scrollbars:
None of them work.
Add to the adblocker:
Now, compare it to the same but 'real' CSS:
You will notice how most rulees didn't work, only 4 of the 14 rules worked fine, and only these ones will work:
I don't know if more pseudo classes are affected, I tested some like
::placeholder
and ::first-letter with:hover
and they seemed to work okay? so might be just the webkit having issues or something, so I just included them in this post since I can 'prove' they are incompatible with Brave adblocker at the moment.Hope it can be fixed, might not be seen as something too important, but any fix and issue should be resolved so it works if anyone needs it, at least the scrollbar can be useful, even if Chromium is adding in 121, support for CSS Scrollbars: scrollbar-color, scrollbar-width, it still won't do anything like the
::-webkit-scrollbar
can do.Thank you.
The text was updated successfully, but these errors were encountered: