diff options
author | bptato <nincsnevem662@gmail.com> | 2024-07-09 22:02:54 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-07-09 22:05:26 +0200 |
commit | 5e78cf0100e762593168bb94e2438d1cead53e45 (patch) | |
tree | 77bf6763efd550aa882d1a22f5a5ce0852478dd9 /src/css/stylednode.nim | |
parent | 2bc57a09aeccd70c27501e67cb5078e2dc7e7ad4 (diff) | |
download | chawan-5e78cf0100e762593168bb94e2438d1cead53e45.tar.gz |
cascade: fix style caching
the invalid flag must be toggled after styling
Diffstat (limited to 'src/css/stylednode.nim')
-rw-r--r-- | src/css/stylednode.nim | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/css/stylednode.nim b/src/css/stylednode.nim index dc90856d..1b3a645b 100644 --- a/src/css/stylednode.nim +++ b/src/css/stylednode.nim @@ -107,9 +107,7 @@ func parentElement*(node: StyledNode): StyledNode {.inline.} = node.parent proc isValid*(styledNode: StyledNode; toReset: var seq[Element]): bool = - if styledNode.t == stText: - return true - if styledNode.t == stReplacement: + if styledNode.t in {stText, stReplacement}: return true if styledNode.node != nil: let element = Element(styledNode.node) |