-
Notifications
You must be signed in to change notification settings - Fork 181
Implement "root" layout mode #530
Copy link
Copy link
Open
Description
What problem does this solve or what need does it fill?
There are some styles that can only or are best applied by the parent of a node. These include:
position(notablyposition: absolute)top/bottom/left/rightmargin
And perhaps:
- Perhaps
width/height/max_width/max_height/min_width/min_height aspect_ratio
Currently these are either not applied to root nodes, or are applied in a duplicated manner within the node's algorithm itself.
What solution would you like?
Much like we have a dedicated simple algorithm for leaf nodes, we ought to create one for root nodes which is applied to the top-level node in any call to compute_layout.
Additional context
- I've tested this on web, and browsers allow the root
<html>node to have styles likeposition/top/left/margin, etc applied. And it seems like a useful thing to allow, so I think we ought to the same. - This layout mode could probably be reused for layout of
position: fixednodes which layout in a very similar way to the root node.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels