Ceisteanna leis an gclib seo á dtaispeáint: Taispeáin gach ceist

Differences between implementation of :has between FF and Chrome.

FF bug (?) (my own tests), Chrome works as expected, was also gemini ai discussed.: Why for the following css rule (new FF): header:has(~ noscript) ~ * div[class*="-s… (tuilleadh eolais)

FF bug (?) (my own tests), Chrome works as expected, was also gemini ai discussed.:

 Why for the following css rule (new FF):
 header:has(~ noscript) ~ * div[class*="-slider"] {width: calc(var(--number-of-slides) * 100%);}
 the --number-of-slides is defined and visible:
 header:has(~ noscript) ~ * div[class*="-slider"] {--number-of-slides: 1}
 but this one isn't at all:
 header:has(~ noscript:has([value="1"])) ~ * div[class*="-slider"] {--number-of-slides: 1}
 And all remembering that in the noscript there is direct descendant having value="1"

As mentioned it works as expected (so average person naturally may think it sould) well for Chrome - noscript is visible, js disabled, controls are visible. Sophisticated use case of :has() but it sort of "has right" to happen.

Asked by Sławomir Cwojdziński 10 n-uaire ó shin

Last reply by Sławomir Cwojdziński 9 n-uaire ó shin