diff options
author | bptato <nincsnevem662@gmail.com> | 2024-01-29 15:33:34 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-01-29 15:58:58 +0100 |
commit | 69ab68942e73458a1b0105d16bc5cb1210895f29 (patch) | |
tree | ffff7084502156a60f814967b038786dd9ef7dfe /src/layout/box.nim | |
parent | 9318ad33229d3c2f96dd766b38b8748f77487c5a (diff) | |
download | chawan-69ab68942e73458a1b0105d16bc5cb1210895f29.tar.gz |
layout: consider inline positioning for absolute blocks
When an absolute block is a descendant of an inline box, its positioned ancestor must be set to that box.
Diffstat (limited to 'src/layout/box.nim')
-rw-r--r-- | src/layout/box.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/layout/box.nim b/src/layout/box.nim index 6763846a..b4b4e030 100644 --- a/src/layout/box.nim +++ b/src/layout/box.nim @@ -43,6 +43,9 @@ type xminwidth*: LayoutUnit size*: Size + SplitType* = enum + stSplitStart, stSplitEnd + InlineFragment* = ref object # Say we have the following inline box: # abcd @@ -64,6 +67,7 @@ type atoms*: seq[InlineAtom] computed*: CSSComputedValues node*: StyledNode + splitType*: set[SplitType] RelativeRect* = object top*: LayoutUnit @@ -79,9 +83,6 @@ type offset*: Offset size*: Size # padding size margin*: RelativeRect #TODO get rid of this? - positioned*: bool - x_positioned*: bool - y_positioned*: bool # very bad name. basically the minimum content width after the contents # have been positioned (usually the width of the shortest word.) used # in table cells. |