diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-10-28 19:21:29 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-10-28 19:21:29 +0100 |
| commit | 78658133f2baf8e4af241592fa7da21948cd62b1 (patch) | |
| tree | cbe53ea8647c119a116ac66140fb2317f7654b21 /src/layout/renderdocument.nim | |
| parent | 64504d633d55074f902eda041b7c720d305d5338 (diff) | |
| download | chawan-78658133f2baf8e4af241592fa7da21948cd62b1.tar.gz | |
layout: implement position: fixed
just a special case of position: absolute
Diffstat (limited to 'src/layout/renderdocument.nim')
| -rw-r--r-- | src/layout/renderdocument.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/renderdocument.nim b/src/layout/renderdocument.nim index 0dafc25c..dcd1d114 100644 --- a/src/layout/renderdocument.nim +++ b/src/layout/renderdocument.nim @@ -390,7 +390,7 @@ proc renderBlockBox(grid: var FlexibleGrid; state: var RenderState; if box == nil: # positioned marker discard state.absolutePos.pop() continue - if box.computed{"position"} == PositionAbsolute: + if box.computed{"position"} in {PositionAbsolute, PositionFixed}: if not box.computed{"left"}.auto: offset.x = state.absolutePos[^1].offset.x elif not box.computed{"right"}.auto: |