about summary refs log tree commit diff stats
path: root/src/css/cascade.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-01-22 18:53:03 +0100
committerbptato <nincsnevem662@gmail.com>2022-01-22 18:53:03 +0100
commit9e04a6cca10fe934ae6ad101c2f35d18a7d712b2 (patch)
tree3eafce3a25f80e2a5f83e860e1b8310b8d6bc658 /src/css/cascade.nim
parent7b06c22d8f24de727ce5b62b4d7fd8cd4007123d (diff)
downloadchawan-9e04a6cca10fe934ae6ad101c2f35d18a7d712b2.tar.gz
Fix media query bug, do not refresh page without css change (wip)
Diffstat (limited to 'src/css/cascade.nim')
-rw-r--r--src/css/cascade.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/css/cascade.nim b/src/css/cascade.nim
index fcec96d6..84d0a89d 100644
--- a/src/css/cascade.nim
+++ b/src/css/cascade.nim
@@ -27,11 +27,11 @@ proc applyProperty(elem: Element, d: CSSDeclaration, pseudo: PseudoElem) =
 
   case pseudo
   of PSEUDO_NONE:
-    elem.css.applyValue(parent, d)
+    elem.rendered = not elem.css.applyValue(parent, d)
   of PSEUDO_BEFORE, PSEUDO_AFTER:
     if elem.pseudo[pseudo] == nil:
       elem.pseudo[pseudo] = elem.css.inheritProperties()
-    elem.pseudo[pseudo].applyValue(parent, d)
+    elem.rendered = not elem.pseudo[pseudo].applyValue(parent, d)
 
   elem.cssapplied = true
   elem.rendered = false