about summary refs log tree commit diff stats
path: root/src/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-12-27 18:06:48 +0100
committerbptato <nincsnevem662@gmail.com>2021-12-27 18:31:44 +0100
commitb7f19942e3d0a4cf25981c1686ffdb200ec4fd6f (patch)
tree3943638c430021e9dd421780166e845e6534724e /src/layout
parent2b1dac71b2886ede9950f4ef91e7a0eb7b3e5ed5 (diff)
downloadchawan-b7f19942e3d0a4cf25981c1686ffdb200ec4fd6f.tar.gz
Implement basic media query support
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/box.nim20
-rw-r--r--src/layout/engine.nim8
2 files changed, 14 insertions, 14 deletions
diff --git a/src/layout/box.nim b/src/layout/box.nim
index 556ad88d..a165c729 100644
--- a/src/layout/box.nim
+++ b/src/layout/box.nim
@@ -46,16 +46,16 @@ type
     rows*: seq[CSSRowBox]
     thisrow*: seq[CSSRowBox]
 
-    dimensions*: Rectangle
-    content*: seq[CSSInlineRow]
-    rcontent*: CSSInlineRow
-    color*: CSSColor
-    fontstyle*: CSSFontStyle
-    fontweight*: int
-    textdecoration*: CSSTextDecoration
-    nodes*: seq[Node]
-
-    maxwidth*: int
+    #dimensions*: Rectangle
+    #content*: seq[CSSInlineRow]
+    #rcontent*: CSSInlineRow
+    #color*: CSSColor
+    #fontstyle*: CSSFontStyle
+    #fontweight*: int
+    #textdecoration*: CSSTextDecoration
+    #nodes*: seq[Node]
+
+    #maxwidth*: int
 
   BlockContext* = ref object
     fromy*: int
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index bea3371d..97c24d01 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -497,7 +497,7 @@ proc alignBoxes*(document: Document, term: TermAttributes): CSSBox =
   state.processElemChildren(rootbox, document.root)
   return rootbox
 
-proc alignBoxes2*(document: Document, term: TermAttributes): CSSBlockBox =
-  result = CSSBlockBox()
-  result.bcontext = BlockContext()
-  result.bcontext.content.add(CSSInlineBox())
+#proc alignBoxes2*(document: Document, term: TermAttributes): CSSBlockBox =
+#  result = CSSBlockBox()
+#  result.bcontext = BlockContext()
+#  result.bcontext.content.add(CSSInlineBox())