The expected behavior can be enabled for Firefox browsers by using the following on the input[type=checkbox]
:
input[type=checkbox] {
-moz-appearance:initial // Hack for Firefox Browsers
}
This option allows you to use :before
pseudo-elements on the input-element, just like it works out of the box for Safari and Chrome and Opera Browsers:
input[type=checkbox]::before {
...
}
The moz-appearance
is currently experimental technology. More information along with an overview of Browser compatibility can be obtained here: MDN web docs – appearance.