From b7f19942e3d0a4cf25981c1686ffdb200ec4fd6f Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 27 Dec 2021 18:06:48 +0100 Subject: Implement basic media query support --- src/layout/box.nim | 20 ++++++++++---------- src/layout/engine.nim | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/layout') 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()) -- cgit 1.4.1-2-gfad0