about summary refs log tree commit diff stats
path: root/src/css/style.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-12-14 23:10:22 +0100
committerbptato <nincsnevem662@gmail.com>2021-12-14 23:10:22 +0100
commit7707d87c9a35a5915e59cfcbd21cd7c33f575a07 (patch)
tree97fc83ff66c673aeea2115761e4b811084547ea9 /src/css/style.nim
parent148d6ce5154c2e8c6126509f39ae0cd2f019a0c0 (diff)
downloadchawan-7707d87c9a35a5915e59cfcbd21cd7c33f575a07.tar.gz
DL support and BR fixes
Diffstat (limited to 'src/css/style.nim')
-rw-r--r--src/css/style.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/css/style.nim b/src/css/style.nim
index e5b8414d..1b73fe71 100644
--- a/src/css/style.nim
+++ b/src/css/style.nim
@@ -41,6 +41,7 @@ func pseudoSelectorMatches(elem: Element, sel: Selector): bool =
   case sel.pseudo
   of "first-child": return elem.parentNode.firstElementChild == elem
   of "last-child": return elem.parentNode.lastElementChild == elem
+  of "only-child": return elem.parentNode.firstElementChild == elem and elem.parentNode.lastElementChild == elem
   of "hover": return elem.hover
   of "root": return elem == elem.ownerDocument.root
   else: return false