Repository navigation
Commit 2aae927
committed
Row/column spacing skips children hidden at runtime
CodelesslyFlex puts its spacing only between consecutive shown children,
like CSS gap and Figma auto layout, so a column of state panels of which
one shows has no stray gaps. A row/column wraps each child in a
FlexChildVisibility (parent data) that marks it collapsed while its
visibility formula is false; a zero-size child alone still gets gaps.
RenderCodelesslyFlex lays out its own gaps: RenderFlex runs without
spacing on a main axis shortened by the gaps between shown children,
then children move along by the gaps before them in visual order and the
flex grows by the gaps. Flex sharing, alignment, overflow, the squeeze
pass, RTL / bottom-to-top, dry layout and intrinsic sizes all count the
same gaps. A child hidden with the eye toggle keeps its space and gaps.
CodelesslyFlex.squeeze (default true) lets the design canvas keep the
flex for its spacing without squeezing overflowing children.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UErtKMSFkZWHUh8DrQMcZW1 parent 6605f1b commit 2aae927
3 files changed
Lines changed: 468 additions & 31 deletions
File tree
- lib/src/transformers
- node_transformers
- utils
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
348 | 350 | | |
349 | 351 | | |
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
353 | 355 | | |
354 | | - | |
355 | | - | |
| 356 | + | |
| 357 | + | |
356 | 358 | | |
357 | 359 | | |
358 | | - | |
| 360 | + | |
359 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
360 | 365 | | |
361 | 366 | | |
362 | 367 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
370 | 378 | | |
371 | 379 | | |
372 | 380 | | |
373 | 381 | | |
374 | 382 | | |
375 | | - | |
| 383 | + | |
376 | 384 | | |
377 | 385 | | |
378 | 386 | | |
379 | | - | |
| 387 | + | |
380 | 388 | | |
381 | 389 | | |
382 | 390 | | |
| |||
0 commit comments