Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

CSS selector

  • 5 replies
  • 0 have this problem
  • 29 views
  • Last reply by cor-el

more options

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.

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.

All Replies (5)

more options

No, it doesn't work yet by default. It's being tested in Nightly with layout.css.has-selector.enabled = true.

more options

Any time soon?

more options

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

more options

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!

more options

Screenshot with "Depends on" info.

(please do not comment in bug reports
https://bugzilla.mozilla.org/page.cgi?id=etiquette.html
)

Modified by cor-el