Skip to content

Commit 2b80999

Browse files
committed
fix(docs): update sf-grid-cols-1 description to reflect no container context
Split the CSS block comment so .sf-grid-cols-1 has its own section accurately describing it as a plain single-column grid with no container: inline-size declaration. The previous shared comment with the multi-column CQ-responsive variants was stale and incorrectly implied a container ancestor was required. Regenerated api-index, classes, registry, and configurator sync. Addresses CodeRabbit review: docs/api-index.md line 969. https://claude.ai/code/session_01ATnXgvc7vf945stc5VDAvz
1 parent 93c4e11 commit 2b80999

4 files changed

Lines changed: 16 additions & 9 deletions

File tree

core/layout.css

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,18 @@
444444
min-height: 100dvh;
445445
}
446446

447+
/* -- Single-column grid --------------------------------------
448+
Plain single-column grid. No container context — it never
449+
needs CQ breakpoints (there's only one column). Use when you
450+
want consistent gap spacing without affecting container queries
451+
on child elements.
452+
---------------------------------------------------------- */
453+
454+
.sf-grid-cols-1 {
455+
display: grid;
456+
gap: var(--sf-grid-gap);
457+
}
458+
447459
/* -- Fixed column grids (container-query responsive) ---------
448460
Responsive fixed-column grids with no media queries.
449461
@@ -454,11 +466,6 @@
454466
Wrap in .sf-container (or any element with container-type: inline-size).
455467
---------------------------------------------------------- */
456468

457-
.sf-grid-cols-1 {
458-
display: grid;
459-
gap: var(--sf-grid-gap);
460-
}
461-
462469
.sf-grid-cols-2, .sf-grid-cols-3, .sf-grid-cols-4, .sf-grid-cols-6 {
463470
display: grid;
464471
gap: var(--sf-grid-gap);

dist/badge-essential.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 1,
33
"label": "essential",
4-
"message": "54.8 kB gzip",
4+
"message": "54.9 kB gzip",
55
"color": "brightgreen",
66
"namedLogo": "css3"
77
}

docs/api-index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27273,8 +27273,8 @@
2727327273
"kind": "layout",
2727427274
"category": "Layout primitives",
2727527275
"area": "layout",
27276-
"group": "Fixed column grids (container-query responsive)",
27277-
"description": "Responsive fixed-column grids with no media queries. IMPORTANT: These classes use anonymous @container queries, so they react to the nearest ancestor that has a container context (container-type: inline-size). Without a container ancestor the queries never match and the grid…",
27276+
"group": "Single-column grid",
27277+
"description": "Plain single-column grid. No container context — it never needs CQ breakpoints (there's only one column). Use when you want consistent gap spacing without affecting container queries on child elements.",
2727827278
"isVariant": false,
2727927279
"baseClass": null,
2728027280
"optional": false,

docs/api-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ and a short description. The machine-readable companion (with all columns) is
966966
| `.sf-grid--s` | PUBLIC | layout | Grid (auto) | Auto-fill CSS grid with no breakpoints. .sf-grid--fit switches to auto-fit. Fixed-column variants live in .sf-grid-cols-N. auto-fill: empty tracks preserved, last item doesn't stretch. auto-fit (.sf-grid--fit): empty tracks collapsed, items stretch. Override:… |
967967
| `.sf-grid--xl` | PUBLIC | layout | Grid (auto) | Auto-fill CSS grid with no breakpoints. .sf-grid--fit switches to auto-fit. Fixed-column variants live in .sf-grid-cols-N. auto-fill: empty tracks preserved, last item doesn't stretch. auto-fit (.sf-grid--fit): empty tracks collapsed, items stretch. Override:… |
968968
| `.sf-grid--xs` | PUBLIC | layout | Grid (auto) | Auto-fill CSS grid with no breakpoints. .sf-grid--fit switches to auto-fit. Fixed-column variants live in .sf-grid-cols-N. auto-fill: empty tracks preserved, last item doesn't stretch. auto-fit (.sf-grid--fit): empty tracks collapsed, items stretch. Override:… |
969-
| `.sf-grid-cols-1` | PUBLIC | layout | Fixed column grids (container-query responsive) | Responsive fixed-column grids with no media queries. IMPORTANT: These classes use anonymous @container queries, so they react to the nearest ancestor that has a container context (container-type: inline-size). Without a container ancestor the queries never match and the grid… |
969+
| `.sf-grid-cols-1` | PUBLIC | layout | Single-column grid | Plain single-column grid. No container context — it never needs CQ breakpoints (there's only one column). Use when you want consistent gap spacing without affecting container queries on child elements. |
970970
| `.sf-grid-cols-1-2` | PUBLIC | layout | Ratio grids | Two-column ratio grids, container-query responsive. |
971971
| `.sf-grid-cols-1-3` | PUBLIC | layout | Ratio grids | Two-column ratio grids, container-query responsive. |
972972
| `.sf-grid-cols-2` | PUBLIC | layout | Fixed column grids (container-query responsive) | Responsive fixed-column grids with no media queries. IMPORTANT: These classes use anonymous @container queries, so they react to the nearest ancestor that has a container context (container-type: inline-size). Without a container ancestor the queries never match and the grid… |

0 commit comments

Comments
 (0)