Plan step 35: <x-stack gap align>, the first of M3's layout components, with what they all share - src/Support/Layout.php reading the props into data-md-* attributes, the spacing-token gap and padding rules, the hide-below/hide-from rules in material.visibility, the stylesheet checks for resources/css/layout, the browser test file and the skill's Layout group. The Workbench puts the material layers above Tailwind's preflight, which would otherwise zero every layout padding and margin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
41 lines
1.2 KiB
CSS
41 lines
1.2 KiB
CSS
/*
|
|
* <x-stack>: its children one under another, in a pane.
|
|
*
|
|
* A flex column, stretched across the stack's width unless `data-md-align` says `start`, `center`
|
|
* or `end`. The space between the children is `--md-gap` (spacing.css), one of M3's spacing
|
|
* tokens and none by default; M3 groups with proximity, so the gap is the grouping
|
|
* (docs/reference/m3/foundations.md § Layout → Grids & spacing). M3 defines no in-pane arrangement
|
|
* component; this is the neutral one, beside <x-row> and <x-grid>.
|
|
*
|
|
* In `material.layout`; `hide-below`/`hide-from` come from visibility.css.
|
|
*/
|
|
|
|
@layer material.reset, material.tokens, material.base, material.layout, material.components, material.text, material.visibility;
|
|
|
|
@import './spacing.css';
|
|
@import './visibility.css';
|
|
|
|
@layer material.layout {
|
|
:where([data-md-stack]) {
|
|
--md-gap: 0px;
|
|
}
|
|
|
|
[data-md-stack] {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--md-gap);
|
|
}
|
|
|
|
[data-md-stack][data-md-align='start'] {
|
|
align-items: flex-start;
|
|
}
|
|
|
|
[data-md-stack][data-md-align='center'] {
|
|
align-items: center;
|
|
}
|
|
|
|
[data-md-stack][data-md-align='end'] {
|
|
align-items: flex-end;
|
|
}
|
|
}
|