- flex-shrink: a line whose children want more room than it has takes it back from those that shrink, in proportion to shrink times size and never below a min size, a fixed size or the content. A scroll box shrinks (and scrolls), and a box in a column shrinks as far as the scroll boxes inside it let it, so a list in a column takes the room its siblings leave with no height. `flex: grow shrink`, and `flex-shrink` by name. - A row wider than its room measures its texts (and boxes without a width) again in the room the rest leave them, so a line wraps beside an icon. - calc() with + - * / and brackets over px, %, em, rem, vw, vh, plain numbers and var(); a width or height keeps its percentage, taken of the room it is given. Lengths lists (padding, margin) keep a calc()'s spaces. - `order` places a box's children without touching the tree. - width: 0 and height: 0 are 0: an unset size is UI_AUTO now, not 0. - A component root that is itself a component takes each user's class, style and id in turn (the outermost's id wins), and the rules of all their sheets are weighed by specificity together; a user's rule wins a tie. The parent's sheet used to override the child's whatever its specificity, and a middle component's sheet was lost. - The default sheet lays .ui-track out as a row, so a range's fill is as tall as its track and a checked box's knob goes right; a range's thumb is centred on the fill's end. - ui_boxes.ludic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
468 B
Text
14 lines
468 B
Text
.page { width: 300px; gap: 4px }
|
|
.panel { height: 200px; gap: 10px }
|
|
.bar { height: 30px }
|
|
.list { overflow: auto }
|
|
.item { height: 20px }
|
|
.line { width: 200px; gap: 8px }
|
|
.line img { width: 24px; height: 24px }
|
|
.zero { width: 0; height: 0 }
|
|
.half { --gap: 10px; width: calc(50% - var(--gap)); height: calc(2 * var(--gap) + 1em); padding: calc(1em / 4) 2px }
|
|
.ordered { gap: 0 }
|
|
.a { order: 1 }
|
|
.b { order: 2 }
|
|
.c { order: 3 }
|
|
.ui-track { height: 12px; padding: 2px }
|