about summary refs log tree commit diff stats
path: root/src/css
diff options
context:
space:
mode:
Diffstat (limited to 'src/css')
-rw-r--r--src/css/selectorparser.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/css/selectorparser.nim b/src/css/selectorparser.nim
index 6a07c277..2a79ecb2 100644
--- a/src/css/selectorparser.nim
+++ b/src/css/selectorparser.nim
@@ -318,6 +318,9 @@ proc parseSelectorToken(state: var SelectorParser, csstoken: CSSToken) =
   of CSS_HASH_TOKEN:
     state.addSelector(Selector(t: ID_SELECTOR, id: csstoken.value))
   of CSS_COMMA_TOKEN:
+    if state.combinator != nil:
+      state.selectors[^1].add(state.combinator)
+      state.combinator = nil
     if state.selectors[^1].len > 0:
       state.addComplexSelector()
   of CSS_WHITESPACE_TOKEN: