Custom Checkboxes Failing on Firefox

You can enable custom styles for checkbox specifically for mozilla browser by adding this property and it worked for me.

-moz-appearance:initial


I managed to fix it as much as seems possible (I'd still love a better solution, if one exists). I switched all of the selectors from

input[type=checkbox]::after

to

input[type=checkbox] + label::after

Downside:

  • requires a label

But:

  • HTML requires input elements to have a label

Conclusion:

  • only bad for invalid HTML