about summary refs log tree commit diff stats
path: root/src/css/selectorparser.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-07-17 22:31:04 +0200
committerbptato <nincsnevem662@gmail.com>2022-07-17 22:31:04 +0200
commit24fc8e940a935f0579cf7bc03bf01e27e5853b80 (patch)
tree8590acda7c4bd8f856e2869ed35a804116926f0d /src/css/selectorparser.nim
parent7cdb8c1b679431b1be52c9fbb19b67445a0bb588 (diff)
downloadchawan-24fc8e940a935f0579cf7bc03bf01e27e5853b80.tar.gz
Implement select element display
You can't actually use them yet. But at least they don't flood the
screen with options now.
Diffstat (limited to 'src/css/selectorparser.nim')
-rw-r--r--src/css/selectorparser.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/css/selectorparser.nim b/src/css/selectorparser.nim
index d6302c24..7c4834e6 100644
--- a/src/css/selectorparser.nim
+++ b/src/css/selectorparser.nim
@@ -21,7 +21,7 @@ type
 
   PseudoClass* = enum
     PSEUDO_FIRST_CHILD, PSEUDO_LAST_CHILD, PSEUDO_ONLY_CHILD, PSEUDO_HOVER,
-    PSEUDO_ROOT, PSEUDO_NTH_CHILD
+    PSEUDO_ROOT, PSEUDO_NTH_CHILD, PSEUDO_CHECKED
 
   CombinatorType* = enum
     DESCENDANT_COMBINATOR, CHILD_COMBINATOR, NEXT_SIBLING_COMBINATOR,
@@ -210,6 +210,8 @@ proc parseSelectorToken(state: var SelectorParser, csstoken: CSSToken) =
         state.addSelector(Selector(t: PSEUDO_SELECTOR, pseudo: PSEUDO_HOVER))
       of "root":
         state.addSelector(Selector(t: PSEUDO_SELECTOR, pseudo: PSEUDO_ROOT))
+      of "checked":
+        state.addSelector(Selector(t: PSEUDO_SELECTOR, pseudo: PSEUDO_CHECKED))
     of QUERY_PSELEM:
       case $csstoken.value
       of "before":