nx_layout_block_test.nx
buildroot/runtime/nx_layout_block_test.nx
about
nx_layout_block_test.nx -- smoke for the Phase-3 block-layout
primitive. Builds a 2-box tree (root + child) with explicit cascade
declarations on the child (width 100px, height 50px, margin-top 20px,
padding-top 10px), runs the normal-flow layout pass, asserts each
box's (x, y, w, h).
Layout math (Phase 3 content-box subset):
root: x=0, y=0, w=viewport(800), h=80
(no own padding; content_h = children_h = child's outer_h)
child: x=0 (parent's content x), y=20 (margin-top),
w=100 (explicit), h=60 (padding-top 10 + content 50)
child outer_h = mt(20) + h(60) + mb(0) = 80
dependencies 9 imports · 0 importers
imports: nx_syscalls.nxnx_css_tokenize.nxnx_css_parse.nxnx_css_selector_match.nxnx_css_apply.nxnx_css_number_parse.nxnx_css_dimension_to_px.nxnx_layout_box.nxnx_layout_block.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 24 | func _put_byte(buf: *u8, i: i64, v: i64) -> i64 called by 1: main |
| 29 | func main() -> i64 |