CSS selector
The :has selector is not working by default? Can I force it in any way so clients using Firefox will see the correct content. Pe. https://mbsmotards.nl/2/ The card with the ribbon should show a purple border and shadow, and when clicking the checkbox, background should get dark.
Tất cả các câu trả lời (5)
No, it doesn't work yet by default. It's being tested in Nightly with layout.css.has-selector.enabled = true.
Any time soon?
Hi!
Currently CSS Level 4 Selectors are not supported in Firefox. They can be toggled on with an about:config key, but it's disabled for a reason, as it is still buggy. This is the metabug about this by the way: https://bugzilla.mozilla.org/show_bug.cgi?id=693083
And I don't really have a suggestion for you, AFAIK this type of logic is not possible with Level 3 Selectors (or older). I think you will need extra classes.
Regards, Balázs
Yes, I know: https://www.w3.org/TR/selectors-4/#relational
But it is really a helpfull pseudo-class, espacially in my SCSS...
Thank you for the quick reply!
Screenshot with "Depends on" info.
(please do not comment in bug reports
https://bugzilla.mozilla.org/page.cgi?id=etiquette.html)
Được chỉnh sửa bởi cor-el vào