From 9efd1bac720212dcbf7b02b1e6039f6784f52b8b Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Fri, 17 Mar 2023 12:35:12 +1300 Subject: [PATCH] Fix inlines getting prematurely cut off. --- Graphics/Layout/CSS.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Graphics/Layout/CSS.hs b/Graphics/Layout/CSS.hs index 9e6414b..22c4e16 100644 --- a/Graphics/Layout/CSS.hs +++ b/Graphics/Layout/CSS.hs @@ -202,10 +202,12 @@ finalizeChilds root parent (StyleTree { style = CSSBox { display = None } }:chil finalizeChilds root parent childs@(child:childs') | isInlineTree childs, Just self <- finalizeParagraph (flattenTree childs) parent = -- FIXME propagate display properties, how to handle the hierarchy. + -- NOTE: Playing around in firefox, it appears the CSS borders should cover + -- their entire span, doubling up on borders where needed. [LayoutInline temp parent self (repeat temp)] | (inlines@(_:_), blocks) <- spanInlines childs, Just self <- finalizeParagraph (flattenTree inlines) parent = - LayoutInline temp parent self [] : finalizeChilds root parent blocks + LayoutInline temp parent self (repeat temp) : finalizeChilds root parent blocks | (StyleTree { style = CSSBox { display = Inline } }:childs') <- childs = finalizeChilds root parent childs' -- Inline's all whitespace... | otherwise = finalizeCSS root parent child : finalizeChilds root parent childs' -- 2.30.2