about summary refs log tree commit diff stats
path: root/src/css
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-10-19 11:51:06 +0200
committerbptato <nincsnevem662@gmail.com>2022-10-19 11:51:06 +0200
commitec82803b87aee94be1e44204bf62426df39f3087 (patch)
tree113ef554f5ebce44563c5406af6be2d5cfe7da32 /src/css
parent7fbedc1f0d7e58fbbce3bdb469f81e9b7c411c15 (diff)
downloadchawan-ec82803b87aee94be1e44204bf62426df39f3087.tar.gz
Re-enable media queries
Diffstat (limited to 'src/css')
-rw-r--r--src/css/cascade.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/css/cascade.nim b/src/css/cascade.nim
index 0606a31c..73ec093b 100644
--- a/src/css/cascade.nim
+++ b/src/css/cascade.nim
@@ -126,7 +126,7 @@ proc applyRules(document: Document, ua, user: CSSStylesheet, cachedTree: StyledN
 
   if document.head != nil:
     for sheet in document.head.sheets:
-      author.add(sheet)
+      author.add(sheet.applyMediaQuery())
 
   var lenstack = newSeqOfCap[int](256)
   var styledStack: seq[(StyledNode, Node, PseudoElem, StyledNode)]
@@ -246,7 +246,8 @@ proc applyRules(document: Document, ua, user: CSSStylesheet, cachedTree: StyledN
       # stylesheets
       let sheets = elem.sheets()
       if sheets.len > 0:
-        author.add(sheets)
+	for sheet in sheets:
+          author.add(sheet.applyMediaQuery())
         lenstack.add(sheets.len)
         styledStack.add((nil, nil, PSEUDO_NONE, nil))