about summary refs log tree commit diff stats
path: root/src/css/match.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/css/match.nim')
-rw-r--r--src/css/match.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/css/match.nim b/src/css/match.nim
index 2d69943b..b17c690d 100644
--- a/src/css/match.nim
+++ b/src/css/match.nim
@@ -100,6 +100,10 @@ func pseudoSelectorMatches[T: Element|StyledNode](elem: T, sel: Selector, felem:
     return selem.selectorsMatch(sel.pseudo.fsels, felem)
   of PSEUDO_LANG:
     return sel.pseudo.s == "en" #TODO languages?
+  of PSEUDO_LINK:
+    return elem.tagType in {TAG_A, TAG_AREA} and elem.attrb("href")
+  of PSEUDO_VISITED:
+    return false
 
 func combinatorSelectorMatches[T: Element|StyledNode](elem: T, sel: Selector, felem: T): bool =
   let selem = elem