diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/css/cascade.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/css/cascade.nim b/src/css/cascade.nim index 19cf1dd1..c69b821f 100644 --- a/src/css/cascade.nim +++ b/src/css/cascade.nim @@ -360,9 +360,8 @@ proc applyRulesFrameInvalid(frame: CascadeFrame; ua, user: CSSStylesheet; of peBefore, peAfter: let declmap = frame.parentDeclMap let styledPseudo = pseudo.applyDeclarations(styledParent, declmap) - if styledPseudo != nil: - let contents = styledPseudo.computed{"content"} - for content in contents: + if styledPseudo != nil and styledPseudo.computed{"content"}.len > 0: + for content in styledPseudo.computed{"content"}: styledPseudo.children.add(styledPseudo.newStyledReplacement(content)) styledParent.children.add(styledPseudo) of peInputText: |