about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-12-03 19:34:34 +0100
committerbptato <nincsnevem662@gmail.com>2024-12-03 19:43:19 +0100
commit05b97c934468ef23cf83f11083b1b9aef883dfb0 (patch)
tree898e67cc997d1f01c7e6dc8511df3c62982351f1 /src
parent541828e3014f47730a49cd95cbd15f340cf8be07 (diff)
downloadchawan-05b97c934468ef23cf83f11083b1b9aef883dfb0.tar.gz
cascade: add cellspacing
Diffstat (limited to 'src')
-rw-r--r--src/css/cascade.nim7
-rw-r--r--src/html/catom.nim1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/css/cascade.nim b/src/css/cascade.nim
index baccf8cd..035573a0 100644
--- a/src/css/cascade.nim
+++ b/src/css/cascade.nim
@@ -177,12 +177,19 @@ func calcPresHints(element: Element): seq[CSSComputedEntry] =
     var val = CSSComputedValueBit()
     val.bgcolorIsCanvas = true
     result.add(makeEntry(cptBgcolorIsCanvas, val))
+  template map_cellspacing =
+    let s = element.attrul(satCellspacing)
+    if s.isSome:
+      set_cv cptBorderSpacing, length2, CSSLength2(
+        a: CSSLength(num: float64(s.get), u: cuPx)
+      )
 
   case element.tagType
   of TAG_TABLE:
     map_height_nozero
     map_width_nozero
     map_bgcolor
+    map_cellspacing
   of TAG_TD, TAG_TH:
     map_height_nozero
     map_width_nozero
diff --git a/src/html/catom.nim b/src/html/catom.nim
index 0c866b71..9b3041b7 100644
--- a/src/html/catom.nim
+++ b/src/html/catom.nim
@@ -26,6 +26,7 @@ macro makeStaticAtom =
       satAutofocus = "autofocus"
       satBgcolor = "bgcolor"
       satBlocking = "blocking"
+      satCellspacing = "cellspacing"
       satCharset = "charset"
       satChecked = "checked"
       satClass = "class"