Add `hf` prefixed classes for all pseudo-classes
Boldewyn opened this issue · comments
-
:valid
(.hf-valid
) -
:invalid
(.hf-invalid
) -
:dirty
(via.hf-validated
, see https://lists.w3.org/Archives/Public/www-style/2014Feb/0511.html) -
:in-range
(.hf-in-range
) -
:out-of-range
(.hf-out-of-range
) -
:required
(can be simulated with[required]
) -
:optional
(can be simulated with:not([required])
with same specificity) -
:user-invalid
(.hf-user-invalid
) -
:user-valid
(.hf-user-valid
)
Relevant spec:
https://drafts.csswg.org/selectors/#user-pseudos
:dirty
is not completely equivalent to .hf-validated
. The first should match all value!=defaultValue
elements. The second matches every element, that was validated at least once.
:optional
is not the same as :not([required])
. The former matches only form elements, the latter any element (including <body>
and <html>
) without an attribute required
.