CSS :has() not working to select pseudo-class :link
I can see that the :has() selector in CSS can work with pseudo-clases, as exhibited with the :hover pseudo-class:
Code:
<!DOCTYPE html> Code:
<!DOCTYPE html> While the document with :hover allows for the background to change for the parent div when a child anchor is hovered over, the same cannot be said for document with the div with child anchors pointing to unvisited links. The div with visited and unvisted links are getting treated the same by CSS. I would have expected the background to change for the div with the unvisited links. Is this a flaw in both Chromium and Firefox? Or have I misunderstood how to use :has() in CSS? Code:
$ apt-cache policy firefox | head -n 2 |
I did not know, pseudo classes could be part of selectors in :has().
On the other hand, I have never used :has(). It may be relatively new and not (yet) supported by all browsers. Edit: Where I need to select elements by such filigree detail, I would most probably replace CSS by XSL ( div[selectors] or other kind of match in a dedicated template). Can you point me at a doc where pseudo-classes are explicitly said to be allowed selectors ? Thank you in advance. Michael |
Quote:
https://developer.mozilla.org/en-US/docs/Web/CSS/:has |
Quote:
Read here: https://developer.mozilla.org/en-US/..._selector_list Quote:
|
All times are GMT -5. The time now is 07:11 AM. |