render: position inset boxes against CSS containers

Reparent inset-positioned absolute boxes to the nearest non-static ancestor
and fixed boxes to the initial containing block. Keep auto-axis boxes on the
existing static-position path, distinguish fixed from absolute, and blockify
positioned inline boxes and floats.
This commit is contained in:
SGavrl committed 2026-07-23 11:34:23 +00:00
1 parent d36809058f
commit 6ea1739121
4 files changed
+134 -2

No files matched your search

+3
View File
@@ -301,6 +301,9 @@ pub struct LayoutStyle {
// Positioning. `position: absolute|fixed` takes the box out of normal flow.
pub position: Option<taffy::Position>,
/// Distinguishes `fixed` from `absolute`; both map to taffy's absolute
/// layout mode, but fixed boxes use the initial containing block.
pub position_fixed: bool,
pub inset: [Option<Dimension>; 4], // top, right, bottom, left
/// `overflow`/-x/-y other than `visible`: clips this element's descendants