Skip to content

Commit 89aef1a

Browse files
committed
refactor(manifests): attributes read in a consistent order
The order attributes are written in is the order of the table on a component's page and, since yesterday, of the controls under its demo. It was whatever each manifest's author happened to type: eight components led with a boolean or buried data-variant behind a detail. They now read what the thing is, then how strongly it presents, then how big, then the rest of its configuration in the order it was written, then the on/off flags. Ten manifests moved; the other twenty-three with more than one attribute already agreed. Two by hand rather than by the rule. The card's ratio does nothing until the card is below its threshold, so the threshold comes first. grid and masonry ordered the same pair opposite ways, so grid now matches it with the two column attributes together. Nothing about the attributes themselves changed, only their order, so the regenerated pages differ only in the order of their rows.
1 parent ae3ca7e commit 89aef1a

22 files changed

Lines changed: 68 additions & 68 deletions

File tree

‎docs/buttons.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ The group carries `role="group"` and a name, so a screen reader announces the se
5555

5656
| Attribute | Type | Values | Default | Description |
5757
| --- | --- | --- | --- | --- |
58-
| `data-attach` | boolean | | | Fuse the buttons into one segmented control that shares borders. |
5958
| `data-gap` | enum | `none`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `xs-sm`, `xs-md`, `xs-lg`, `xs-xl`, `xs-2xl`, `xs-3xl`, `sm-md`, `sm-lg`, `sm-xl`, `sm-2xl`, `sm-3xl`, `md-lg`, `md-xl`, `md-2xl`, `md-3xl`, `lg-xl`, `lg-2xl`, `lg-3xl`, `xl-2xl`, `xl-3xl`, `2xl-3xl` | `sm` | Space between buttons when not attached. |
59+
| `data-attach` | boolean | | | Fuse the buttons into one segmented control that shares borders. |
6060

6161
</div>
6262

‎docs/card.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ Do not wrap a card in a link. Put the link on the heading and add `data-stretch`
7272

7373
| Attribute | Type | Values | Default | Description |
7474
| --- | --- | --- | --- | --- |
75-
| `data-ratio` | enum | `1/1`, `4/3`, `3/2`, `16/9`, `21/9` | `16/9` | The figure's aspect ratio when the card is wide. |
75+
| `data-variant` | enum | `primary`, `secondary`, `success`, `warning`, `alert`, `neutral` | | Tints the border and adds a bar along the top; the body stays plain. |
7676
| `data-threshold` | enum | `2xs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl` | `md` | The card's own width from which the picture sits beside the text instead of on top. |
77+
| `data-ratio` | enum | `1/1`, `4/3`, `3/2`, `16/9`, `21/9` | `16/9` | The figure's aspect ratio when the card is wide. |
7778
| `data-raised` | boolean | | | A shadow instead of a border. |
78-
| `data-variant` | enum | `primary`, `secondary`, `success`, `warning`, `alert`, `neutral` | | Tints the border and adds a bar along the top; the body stays plain. |
7979

8080
</div>
8181

‎docs/field.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ The label must point at the control with `for` and the control must carry that `
7171

7272
| Attribute | Type | Values | Default | Description |
7373
| --- | --- | --- | --- | --- |
74+
| `data-variant` | enum | `primary`, `secondary`, `success`, `warning`, `alert`, `neutral` | `primary` | The colour of a checked checkbox or radio. |
7475
| `data-size` | enum | `sm`, `md`, `lg` | `md` | Scales the control's height and text. |
7576
| `data-inline` | boolean | | | Put the label beside the control. Checkboxes and radios are inline without it. |
76-
| `data-variant` | enum | `primary`, `secondary`, `success`, `warning`, `alert`, `neutral` | `primary` | The colour of a checked checkbox or radio. |
7777

7878
</div>
7979

‎docs/grid.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ It is a grid and nothing else is. Foundation 6 readers: this replaces the Block
7373
| Attribute | Type | Values | Default | Description |
7474
| --- | --- | --- | --- | --- |
7575
| `data-min` | enum | `none`, `2xs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl` | `xs` | The narrowest a column may be. With none, only data-columns decides the count; none is meant to be paired with data-columns, and alone gives a single full-width column. |
76-
| `data-gap` | enum | `none`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `xs-sm`, `xs-md`, `xs-lg`, `xs-xl`, `xs-2xl`, `xs-3xl`, `sm-md`, `sm-lg`, `sm-xl`, `sm-2xl`, `sm-3xl`, `md-lg`, `md-xl`, `md-2xl`, `md-3xl`, `lg-xl`, `lg-2xl`, `lg-3xl`, `xl-2xl`, `xl-3xl`, `2xl-3xl` | `md` | Space between columns and rows. |
7776
| `data-columns` | enum | `1`, `2`, `3`, `4`, `5`, `6` | | The most columns allowed. Fewer appear when the container cannot fit that many at data-min; with data-min="none" the count is exact. With data-fold, the count only ever halves. |
78-
| `data-fold` | boolean | | | Halve the column count as the grid narrows instead of stepping down one at a time. Needs data-columns 2, 4, or 6 and uses data-min as the width per column. data-min="none" has no meaning with a fold: the count needs a width per column. |
77+
| `data-gap` | enum | `none`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `xs-sm`, `xs-md`, `xs-lg`, `xs-xl`, `xs-2xl`, `xs-3xl`, `sm-md`, `sm-lg`, `sm-xl`, `sm-2xl`, `sm-3xl`, `md-lg`, `md-xl`, `md-2xl`, `md-3xl`, `lg-xl`, `lg-2xl`, `lg-3xl`, `xl-2xl`, `xl-3xl`, `2xl-3xl` | `md` | Space between columns and rows. |
7978
| `data-ranks` | enum | `2`, `3`, `4`, `5`, `6` | | Line up the parts of the children across each row: the value is how many parts a child has, and each part takes one row. |
79+
| `data-fold` | boolean | | | Halve the column count as the grid narrows instead of stepping down one at a time. Needs data-columns 2, 4, or 6 and uses data-min as the width per column. data-min="none" has no meaning with a fold: the count needs a width per column. |
8080

8181
</div>
8282

‎docs/llms-full.txt‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@ Fits as many equal columns as the container allows at a minimum width, up to an
315315

316316
Attributes:
317317
- data-min: none | 2xs | xs (default) | sm | md | lg | xl | 2xl — The narrowest a column may be. With none, only data-columns decides the count; none is meant to be paired with data-columns, and alone gives a single full-width column.
318-
- data-gap: none | xs | sm | md (default) | lg | xl | 2xl | 3xl | xs-sm | xs-md | xs-lg | xs-xl | xs-2xl | xs-3xl | sm-md | sm-lg | sm-xl | sm-2xl | sm-3xl | md-lg | md-xl | md-2xl | md-3xl | lg-xl | lg-2xl | lg-3xl | xl-2xl | xl-3xl | 2xl-3xl — Space between columns and rows.
319318
- data-columns: 1 | 2 | 3 | 4 | 5 | 6 — The most columns allowed. Fewer appear when the container cannot fit that many at data-min; with data-min="none" the count is exact. With data-fold, the count only ever halves.
320-
- data-fold (boolean) — Halve the column count as the grid narrows instead of stepping down one at a time. Needs data-columns 2, 4, or 6 and uses data-min as the width per column. data-min="none" has no meaning with a fold: the count needs a width per column.
319+
- data-gap: none | xs | sm | md (default) | lg | xl | 2xl | 3xl | xs-sm | xs-md | xs-lg | xs-xl | xs-2xl | xs-3xl | sm-md | sm-lg | sm-xl | sm-2xl | sm-3xl | md-lg | md-xl | md-2xl | md-3xl | lg-xl | lg-2xl | lg-3xl | xl-2xl | xl-3xl | 2xl-3xl — Space between columns and rows.
321320
- data-ranks: 2 | 3 | 4 | 5 | 6 — Line up the parts of the children across each row: the value is how many parts a child has, and each part takes one row.
321+
- data-fold (boolean) — Halve the column count as the grid narrows instead of stepping down one at a time. Needs data-columns 2, 4, or 6 and uses data-min as the width per column. data-min="none" has no meaning with a fold: the count needs a width per column.
322322

323323
### When to use it
324324

@@ -474,8 +474,8 @@ In browsers without native masonry, items read down each column and then across.
474474
Holds one child over the rest, centered, without pushing anything around; the parent is the box it covers.
475475

476476
Attributes:
477-
- data-fixed (boolean) — Center the held child over the viewport instead of this box, and keep it there while the page scrolls.
478477
- data-gap: none | xs | sm | md (default) | lg | xl | 2xl | 3xl | xs-sm | xs-md | xs-lg | xs-xl | xs-2xl | xs-3xl | sm-md | sm-lg | sm-xl | sm-2xl | sm-3xl | md-lg | md-xl | md-2xl | md-3xl | lg-xl | lg-2xl | lg-3xl | xl-2xl | xl-3xl | 2xl-3xl — The least space kept between the held child and the edges of the box.
478+
- data-fixed (boolean) — Center the held child over the viewport instead of this box, and keep it there while the page scrolls.
479479

480480
On children:
481481
- data-over on > * (boolean) — Lifts the child out of the flow and centers it over the box; exactly one child carries it.
@@ -516,8 +516,8 @@ Lays its children out in a single row that scrolls horizontally.
516516

517517
Attributes:
518518
- data-gap: none | xs | sm | md (default) | lg | xl | 2xl | 3xl | xs-sm | xs-md | xs-lg | xs-xl | xs-2xl | xs-3xl | sm-md | sm-lg | sm-xl | sm-2xl | sm-3xl | md-lg | md-xl | md-2xl | md-3xl | lg-xl | lg-2xl | lg-3xl | xl-2xl | xl-3xl | 2xl-3xl — Space between items.
519-
- data-snap (boolean) — Snap each item's start edge into place as the track scrolls.
520519
- data-width: 2xs | xs | sm | md | lg | xl | 2xl — Give every item this width instead of its natural one.
520+
- data-snap (boolean) — Snap each item's start edge into place as the track scrolls.
521521

522522
### When to use it
523523

@@ -1146,8 +1146,8 @@ Put the class on a button, an a, or a submit input, nothing else. Use button for
11461146
A group of buttons: a wrapping row, or one fused control with data-attach.
11471147

11481148
Attributes:
1149-
- data-attach (boolean) — Fuse the buttons into one segmented control that shares borders.
11501149
- data-gap: none | xs | sm (default) | md | lg | xl | 2xl | 3xl | xs-sm | xs-md | xs-lg | xs-xl | xs-2xl | xs-3xl | sm-md | sm-lg | sm-xl | sm-2xl | sm-3xl | md-lg | md-xl | md-2xl | md-3xl | lg-xl | lg-2xl | lg-3xl | xl-2xl | xl-3xl | 2xl-3xl — Space between buttons when not attached.
1150+
- data-attach (boolean) — Fuse the buttons into one segmented control that shares borders.
11511151

11521152
### When to use it
11531153

@@ -1184,10 +1184,10 @@ role="group" with a name, so the set is announced as one thing. A segmented togg
11841184
A bordered surface for one thing: an optional figure that bleeds to the edges, a body, and a footer that sits at the bottom; a row with the picture beside the text once the card's content reaches the md width.
11851185

11861186
Attributes:
1187-
- data-ratio: 1/1 | 4/3 | 3/2 | 16/9 (default) | 21/9 — The figure's aspect ratio when the card is wide.
1187+
- data-variant: primary | secondary | success | warning | alert | neutral — Tints the border and adds a bar along the top; the body stays plain.
11881188
- data-threshold: 2xs | xs | sm | md (default) | lg | xl | 2xl — The card's own width from which the picture sits beside the text instead of on top.
1189+
- data-ratio: 1/1 | 4/3 | 3/2 | 16/9 (default) | 21/9 — The figure's aspect ratio when the card is wide.
11891190
- data-raised (boolean) — A shadow instead of a border.
1190-
- data-variant: primary | secondary | success | warning | alert | neutral — Tints the border and adds a bar along the top; the body stays plain.
11911191

11921192
On children:
11931193
- data-stretch on a (boolean) — Stretches the link over the whole card, so the card is clickable while the link keeps its own name.
@@ -1556,9 +1556,9 @@ With data-trigger="hover" the module adds opening under the pointer and changes
15561556
One form control with its label, an optional hint, and an error that shows itself when the control is invalid.
15571557

15581558
Attributes:
1559+
- data-variant: primary (default) | secondary | success | warning | alert | neutral — The colour of a checked checkbox or radio.
15591560
- data-size: sm | md (default) | lg — Scales the control's height and text.
15601561
- data-inline (boolean) — Put the label beside the control. Checkboxes and radios are inline without it.
1561-
- data-variant: primary (default) | secondary | success | warning | alert | neutral — The colour of a checked checkbox or radio.
15621562

15631563
On children:
15641564
- data-hint on > * (boolean) — Help text, referenced by the control's aria-describedby.
@@ -1646,9 +1646,9 @@ The label's for must match the control's id; the validator checks it. Reference
16461646
A bar with a brand, a list of links, and actions, that collapses the links behind a toggle at its own width and opens them as a sheet, a drawer, or a screen.
16471647

16481648
Attributes:
1649+
- data-variant: primary (default) | secondary | success | warning | alert | neutral — The hue of the current link and of the hover tint.
16491650
- data-threshold: 2xs | xs | sm | md (default) | lg | xl | 2xl — The nav's own width at or above which the links sit in the bar; below it they are behind the toggle.
16501651
- data-panel: sheet (default) | drawer | screen — The shape of the open list below the threshold: a sheet under the bar, a drawer from the start edge, or the whole screen.
1651-
- data-variant: primary (default) | secondary | success | warning | alert | neutral — The hue of the current link and of the hover tint.
16521652
- data-gap: none | xs | sm (default) | md | lg | xl | 2xl | 3xl | xs-sm | xs-md | xs-lg | xs-xl | xs-2xl | xs-3xl | sm-md | sm-lg | sm-xl | sm-2xl | sm-3xl | md-lg | md-xl | md-2xl | md-3xl | lg-xl | lg-2xl | lg-3xl | xl-2xl | xl-3xl | 2xl-3xl — Space between the bar's parts and between the links.
16531653

16541654
On children:
@@ -1734,10 +1734,10 @@ Give the nav an aria-label, since a page often has more than one. The toggle nee
17341734
Links to the pages of a long list, each a square target, the current one filled, shrinking to Previous, the current page, and Next when it is narrow.
17351735

17361736
Attributes:
1737-
- data-threshold: 2xs | xs | sm (default) | md | lg | xl | 2xl — The pagination's own width below which only Previous, the current page, and Next remain.
17381737
- data-variant: primary (default) | secondary | success | warning | alert | neutral — The hue of the current page and of the hover tint.
1739-
- data-justify: start (default) | center | end | between | around | evenly — Where the links sit in the row.
17401738
- data-size: sm | md (default) | lg — The text step.
1739+
- data-threshold: 2xs | xs | sm (default) | md | lg | xl | 2xl — The pagination's own width below which only Previous, the current page, and Next remain.
1740+
- data-justify: start (default) | center | end | between | around | evenly — Where the links sit in the row.
17411741

17421742
### When to use it
17431743

@@ -1834,9 +1834,9 @@ Gives a section a shaped edge, a slant, a curve, or a wave, cut from its own bac
18341834

18351835
Attributes:
18361836
- data-shape: slant (default) | curve | wave — The shape of the cut edge.
1837+
- data-size: sm | md (default) | lg — The depth of the cut: twice the size's space step.
18371838
- data-edge: top | bottom (default) | both — Which edge is cut.
18381839
- data-flip (boolean) — Mirror the shape horizontally, for alternating sections. A curve is symmetric and does not change.
1839-
- data-size: sm | md (default) | lg — The depth of the cut: twice the size's space step.
18401840

18411841
### When to use it
18421842

@@ -1962,8 +1962,8 @@ Give the table a caption, or aria-label / aria-labelledby. Header cells carry sc
19621962
A row of tabs over their panels, showing one at a time when its module is loaded and all of them when it is not.
19631963

19641964
Attributes:
1965-
- data-orientation: horizontal (default) | vertical — Whether the tab list runs along the top or down the side.
19661965
- data-variant: primary (default) | secondary | success | warning | alert | neutral — The hue of the selected tab and its edge.
1966+
- data-orientation: horizontal (default) | vertical — Whether the tab list runs along the top or down the side.
19671967
- data-gap: none | xs | sm | md (default) | lg | xl | 2xl | 3xl | xs-sm | xs-md | xs-lg | xs-xl | xs-2xl | xs-3xl | sm-md | sm-lg | sm-xl | sm-2xl | sm-3xl | md-lg | md-xl | md-2xl | md-3xl | lg-xl | lg-2xl | lg-3xl | xl-2xl | xl-3xl | 2xl-3xl — Space between the list and the panels.
19681968

19691969
module: tabs.js (optional)

0 commit comments

Comments
 (0)