~alcinnz/haskell-stylist

e8442cdfb21a746bfb3b5503c637a6fe8895bead — Adrian Cochrane 4 years ago 5e3bd08
ISSUES: Plan psuedoclass lowering.
1 files changed, 40 insertions(+), 0 deletions(-)

M ISSUES/psuedoclass-lowering.md
M ISSUES/psuedoclass-lowering.md => ISSUES/psuedoclass-lowering.md +40 -0
@@ 17,3 17,43 @@ pages without JavaScript.

However it is probably wise to discourage such patterns, as they do not
communicate necessary state to accessibility tools.

## Lowering Rules
`:active` -> interactive
`:any-link`, `:link` -> `:where([href], [src])`
`:blank` -> `:where(input[value=""])`
`:checked` -> `[checked]`
`:default` -> UNSUPPORTED (forms)
`:defined` -> UNSUPPORTED (custom elements)
`:dir(_)` -> `:where([dir=_], [dir=_] *)`
`:disabled` -> `[disabled]`
`:empty` -> would need to be handled by XML Conduit Stylist.
`:enabled` -> `:not([disabled])`
`:first-child` -> `:nth-child(1)`
`:first-of-type` -> `:nth-of-type(1)`
`:fullscreen` -> Handled elsewhere.
`:focus`, `:focus-visible` -> interactive
`:focus-within` -> interactive
`:host` -> UNSUPPORTED (custom elements)
`:host()` -> UNSUPPORTED (custom elements)
`:host-context()` -> UNSUPPORTED (custom elements)
`:hover` -> interactive
`:indeterminate` -> `[indeterminate]`
`:in-range` -> UNSUPPORTED (forms)
`:invalid` -> UNSUPPORTED (forms)
`:lang(_)` -> `:where([lang|=_], [lang|=_] *)`
`:last-child` -> `:nth-last-child(1)`, PROBABLY UNSUPPORTED
`:last-of-type` -> `:nth-last-of-type(1)`, PROBABLY UNSUPPORTED
`:only-child` -> `:nth-child(1):nth-last-child(1)`, PROBABLY UNSUPPORTED
`:only-of-type` -> `:nth-of-type(1):nth-last-of-type(1)`, PROBABLY UNSUPPORTED
`:optional` -> `:not([required])`
`:out-of-range` -> UNSUPPORTED (forms)
`:placeholder-shown` -> `:where(:not([value]), [value=""])`
`:readonly` -> `[readonly]`
`:read-write` -> `:not([readonly])`
`:required` -> `[required]`
`:root`, `:scope` -> `html`, or applied by XML Conduit stylist for more leniency.
`:state()` -> UNSUPPORTED (custom elements), may want an alternative.
`:target` -> `#_`, selected ID sourced from outside data.
`:valid` -> UNSUPPORTED (forms)
`:visited` -> requires special handling, with outside data.