Skip to content
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

Extended CSS rules with ':has(:contains())' do not work in Chrome 105 #149

Closed
AdamWr opened this issue Aug 17, 2022 · 1 comment
Closed

Comments

@AdamWr
Copy link
Member

AdamWr commented Aug 17, 2022

Steps to reproduce

  1. Install Chrome Beta version 105
  2. Add this rule to user rules:
example.org#?#div:has(h1:contains(Example))
  1. Go to - https://example.org/

Website should be blank.

Screenshot (Left Chrome 105, right Chrome 104)

image

@krystian3w
Copy link

krystian3w commented Aug 23, 2022

I reproduced on Chrome 106 and 107 with uBo dev.

In uBo workaround can be translate has to -abp-has (or deprecated :if()) - so Chrome implemented has as native CSS (sic!)... without flag "Experimental Web Platform features"?

https://caniuse.com/css-has

But in uBo real fix may need wait to publish 105 as stable with glitched nesting (embedment) instructions or will be marked as no worth work due no possible rewrite addon to manifest v3 to January 2023 (most lack of API).

In Firefox this is still to manually enable: layout.css.has-selector.enabled (generate same or similar breakage).

Safari 15.4 to 16 also have native support.



Latest ABP and AdBlock with -abp- prefixes is bug free. Alias :has( no enforce native CSS (or correct disable) - Fyi @peace2000 @ryanbr

adguard pushed a commit that referenced this issue Sep 15, 2022
Squashed commit of the following:

commit e4c6e805b7f625cf9d5fe14928a8756285e46ce9
Author: Slava Leleka <v.leleka@adguard.com>
Date:   Thu Sep 15 17:48:13 2022 +0300

    add increment script for specs

commit 6fcb565363992e61f441006f94fddff9aacc6f0e
Merge: 3117cc4 b8d6938
Author: Slava Leleka <v.leleka@adguard.com>
Date:   Thu Sep 15 17:40:27 2022 +0300

    Merge branch 'master' into fix/AG-16001

commit 3117cc4380c5448f648b44dd41380a8c219d53d8
Author: Slava Leleka <v.leleka@adguard.com>
Date:   Thu Sep 15 16:13:07 2022 +0300

    fix indexOf condition

commit 4e55a0c55ffac182e66fc2c4096769dc5f96ee0d
Author: Slava Leleka <v.leleka@adguard.com>
Date:   Thu Sep 15 16:08:49 2022 +0300

    fix condition only for has

commit 7486df4563c8ec5386f502763f97837b01b48cc7
Author: Slava Leleka <v.leleka@adguard.com>
Date:   Thu Sep 15 15:53:31 2022 +0300

    handle has pseudo-class by the lib
@adguard-bot adguard-bot changed the title Extended CSS rules with :has() + :contains() do not work in Chrome 105 Extended CSS rules with ':has(:contains())' do not work in Chrome 105 Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants