~alcinnz/haskell-stylist

ref: 9503b788ebd61a6fdf6b5213a3abd8df7c7f2dcb haskell-stylist/ISSUES/psuedoclass-lowering.md -rw-r--r-- 839 bytes
9503b788 — Adrian Cochrane Moved to personal git homeserver, copy ISSUES over from NZOSS. 4 years ago
                                                                                
9503b788 Adrian Cochrane
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Provide API to lower non-functional psuedoclasses
It may be simpler, though less featureful[1], to implement interactive
psuedoclasses as if they were psuedoelements. That way when the style
tree has been interacted, we can retrieve the altered styles rather than
reapply the full stylesheet.

Many other psuedoclasses are equivalent to other selectors, especially if the
caller doesn't implement certain interactions.

As such there should be a StyleSheet decorator that can be configure to perform
these tasks.

## Notes
1. Rewriting psuedoclasses to psuedoelements would not allow a browser to support
selectors like ":hover li" that are popularly used to create offline-interactive
pages without JavaScript.

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