about summary refs log tree commit diff stats
path: root/src/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-05-18 19:37:14 +0200
committerbptato <nincsnevem662@gmail.com>2024-05-18 19:37:14 +0200
commit47d08bff7e4f82fb622e30eee770c74904dac93c (patch)
tree49957b66d6657a11f49c4ca5647197d69c2dab40 /src/layout
parent1fc146069f0a66f82f236e65f1fd12fc50b92ce2 (diff)
downloadchawan-47d08bff7e4f82fb622e30eee770c74904dac93c.tar.gz
css: stub overflow
The renderer cannot handle it yet, but at least this fixes pages that
expect overflow: hidden (etc.) to establish a new BFC.
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/engine.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index ca3c9c5e..712ba511 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -1383,8 +1383,9 @@ func establishesBFC(computed: CSSComputedValues): bool =
   return computed{"float"} != FloatNone or
     computed{"position"} == PositionAbsolute or
     computed{"display"} in {DisplayInlineBlock, DisplayFlowRoot} +
-      InternalTableBox + {DisplayFlex, DisplayInlineFlex}
-    #TODO overflow, contain, grid, multicol, column-span
+      InternalTableBox + {DisplayFlex, DisplayInlineFlex} or
+    computed{"overflow"} notin {OverflowVisible, OverflowClip}
+    #TODO contain, grid, multicol, column-span
 
 proc layoutFlow(bctx: var BlockContext; box: BlockBox; builder: BlockBoxBuilder;
     sizes: ResolvedSizes) =