Using :has selector with Tailwind adds empty :has() at the end

Discussão em 'Angular' iniciado por Chrillewoodz, Fevereiro 4, 2025.

  1. Chrillewoodz

    Chrillewoodz Guest

    I'm using this Tailwind selector:

    [&:has:)focus-visible)]:before:tw-content-['']


    to apply a before pseudo element to an element with any children that are focused. However, I'm not sure this is actually correctly defined, as I'm getting this error when building the code in Angular:


    1 rules skipped due to selector errors:
    .[&:has:)focus-visible)]:before:tw-content-['']:has() -> Empty sub-selector
    ​

    I don't quite understand what's going on here, why is a :has() being added to the end? Am I missing some type of escape, or am I using incorrect Tailwind syntax?

    Note that tw is a prefix I've configured in my Tailwind config.

    Continue reading...

Compartilhe esta Página