Skip to content

Add .sf-gap and .sf-equal layout utility classes - #117

Merged
jackgranatowski merged 5 commits into
mainfrom
claude/fervent-curie-DvX5u
May 27, 2026
Merged

Add .sf-gap and .sf-equal layout utility classes#117
jackgranatowski merged 5 commits into
mainfrom
claude/fervent-curie-DvX5u

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented May 27, 2026

Copy link
Copy Markdown
Contributor

This PR introduces two new layout utility classes to the Slashed framework:

Summary

Adds layout-agnostic gap utilities and a fixed equal-column grid system to provide more flexible spacing and grid options for developers.

Key Changes

  • New .sf-gap utility class: A layout-agnostic gap utility that injects spacing into any existing flex or grid container without imposing a display type or axis. Unlike .sf-stack (flex column) or .sf-cluster (flex-wrap row), this utility works on elements that already have their own display context.

    • Includes size variants: --xs, --s, --m, --l, --xl, --2xl
    • Customizable via --sf-gap-size CSS variable
    • Default gap size: var(--sf-space-gap)
  • New .sf-equal grid class: A fixed N-column grid system where column count never collapses, unlike the responsive .sf-grid-N classes. Useful when layout must remain N columns at all widths.

    • Includes preset variants: .sf-equal--2, .sf-equal--3, .sf-equal--4, .sf-equal--6
    • Customizable via --sf-equal-cols and --sf-equal-gap CSS variables
    • Default: 2 columns with var(--sf-space-gap) spacing
  • Added CSS variables:

    • --sf-gap-size: Controls gap spacing for .sf-gap utility
    • --sf-equal-cols: Controls column count for .sf-equal grid
    • --sf-equal-gap: Controls gap spacing for .sf-equal grid

Implementation Details

  • Changes applied consistently across all distribution files (essential, full, optimal variants in both standard and flat formats)
  • Source changes in core/layout.css and core/tokens.layout.css
  • Updated integrations/bricks/data/inventory.json to reflect new variables (+3) and classes (+12)
  • Comprehensive documentation included in CSS comments explaining usage and override patterns

https://claude.ai/code/session_01J4EpUK43Ke1jhpeLCHtDsr

Summary by CodeRabbit

  • New Features

    • Added .sf-gap utility class for flexible spacing control in flex and grid containers, with size variants ranging from extra-small to 2xl.
    • Added .sf-equal utility class for fixed-column layouts with variants supporting 2, 3, 4, and 6-column grids.
  • Documentation

    • Updated class reference and token registries to include new layout utilities.

Review Change Stack

.sf-gap injects gap into any existing flex/grid container without
imposing display type or axis — layout-agnostic complement to .sf-stack.

.sf-equal provides a fixed N-column grid that never collapses (unlike
.sf-grid-N container-query variants); defaults to 2 columns.

https://claude.ai/code/session_01J4EpUK43Ke1jhpeLCHtDsr
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jackgranatowski, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 37 minutes and 52 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 99473527-af23-49aa-b416-9670ce3434e1

📥 Commits

Reviewing files that changed from the base of the PR and between 96f6956 and 6e2f02d.

⛔ Files ignored due to path filters (30)
  • dist/slashed.essential.css is excluded by !**/dist/**
  • dist/slashed.essential.flat.css is excluded by !**/dist/**
  • dist/slashed.essential.flat.min.css is excluded by !**/dist/**
  • dist/slashed.essential.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.essential.min.css is excluded by !**/dist/**
  • dist/slashed.essential.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.full.css is excluded by !**/dist/**
  • dist/slashed.full.flat.css is excluded by !**/dist/**
  • dist/slashed.full.flat.min.css is excluded by !**/dist/**
  • dist/slashed.full.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.full.min.css is excluded by !**/dist/**
  • dist/slashed.full.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal-components.css is excluded by !**/dist/**
  • dist/slashed.optimal-components.flat.css is excluded by !**/dist/**
  • dist/slashed.optimal-components.flat.min.css is excluded by !**/dist/**
  • dist/slashed.optimal-components.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal-components.min.css is excluded by !**/dist/**
  • dist/slashed.optimal-components.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal-utilities.css is excluded by !**/dist/**
  • dist/slashed.optimal-utilities.flat.css is excluded by !**/dist/**
  • dist/slashed.optimal-utilities.flat.min.css is excluded by !**/dist/**
  • dist/slashed.optimal-utilities.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal-utilities.min.css is excluded by !**/dist/**
  • dist/slashed.optimal-utilities.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal.css is excluded by !**/dist/**
  • dist/slashed.optimal.flat.css is excluded by !**/dist/**
  • dist/slashed.optimal.flat.min.css is excluded by !**/dist/**
  • dist/slashed.optimal.flat.min.css.map is excluded by !**/dist/**, !**/*.map
  • dist/slashed.optimal.min.css is excluded by !**/dist/**
  • dist/slashed.optimal.min.css.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (3)
  • core/layout.css
  • docs/demo.html
  • tests/token-api.snapshot.json
📝 Walkthrough

Walkthrough

The PR introduces two new CSS layout primitives to the SLASHED design system: .sf-gap for flexible gap injection into flex/grid containers with size variants, and .sf-equal for non-collapsing fixed-column grids. These primitives are backed by three new layout tokens (--sf-gap-size, --sf-equal-cols, --sf-equal-gap), and all documentation, registries, and design system inventories are regenerated to reflect the additions.

Changes

Layout primitives: gap sizing and equal-column grid

Layer / File(s) Summary
Token definitions for gap and equal columns
core/tokens.layout.css
--sf-gap-size is introduced as a gap-sizing token aliased to --sf-space-gap, and --sf-equal-cols (defaulting to 2) plus --sf-equal-gap are defined to support fixed-column grid layouts.
CSS layout primitives: gap and equal
core/layout.css
.sf-gap utility applies gap: var(--sf-gap-size) with size variants (xs–2xl) mapped to spacing tokens. .sf-equal implements grid-template-columns: repeat(var(--sf-equal-cols), 1fr) with modifiers to set column counts (2, 3, 4, 6).
Documentation and design system inventory
docs/classes.md, docs/registry.json, docs/tokens.md, integrations/bricks/data/inventory.json
Layout primitives class reference, token documentation, and design system registry are regenerated to include the new .sf-gap and .sf-equal classes and their variants, and three new layout tokens. All metadata counts and inventory lists are updated consistently.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • codeslash-dev/SLASHED#20: Modifies --sf-space-gap token aliasing, which is the upstream dependency for the new --sf-gap-size token introduced in this PR.
  • codeslash-dev/SLASHED#2: Establishes the foundational layout primitives framework in core/layout.css and core/tokens.layout.css that this PR extends with gap and equal-column utilities.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: addition of two new layout utility classes (.sf-gap and .sf-equal) that are the primary focus of this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fervent-curie-DvX5u

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
integrations/bricks/data/inventory.json (1)

1-835: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Regenerate this file using npm run docs to fix CI failure.

The pipeline is failing because this generated inventory file is out of sync. The error message explicitly directs you to run the documentation generation command.

Pipeline error:

  • "inventory.json is stale. Run 'npm run docs' and commit the updated file."

Run the following command and commit the result:

npm run docs
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@integrations/bricks/data/inventory.json` around lines 1 - 835, The
inventory.json in the patch is out-of-date (see top-level "_meta" and the
"variables"/"sf_classes"/"is_classes" lists); regenerate the file by running the
docs generation command and commit the updated output: run npm run docs, verify
inventory.json is refreshed, then add/commit the regenerated inventory.json so
CI no longer reports "inventory.json is stale."
docs/tokens.md (1)

1-668: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Regenerate this file using npm run docs:tokens to fix CI failure.

The pipeline is explicitly failing on this file with multiple errors indicating it's stale. The file header states "Do not edit by hand" — the generation script must be run.

Pipeline errors:

  • "Command failed: git diff --exit-code docs/tokens.md"
  • "docs/tokens.md is stale — run 'npm run docs' and commit"

Run the following command and commit the result:

npm run docs:tokens
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/tokens.md` around lines 1 - 668, The docs/tokens.md file is stale and CI
fails; regenerate it and commit the updated output. Run the generation script
referenced in the file header (npm run docs:tokens) to recreate docs/tokens.md
(the header "Do not edit by hand" and the CI errors "docs/tokens.md is stale —
run 'npm run docs' and commit" point to this), stage the regenerated
docs/tokens.md, and push the commit so the pipeline's git-diff check (git diff
--exit-code docs/tokens.md) passes.
docs/registry.json (1)

1-850: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Regenerate this file using npm run docs to ensure consistency.

This registry is part of the generated documentation suite. While no specific pipeline error is shown for this file, it should be regenerated along with the other documentation files to maintain consistency across the design system inventory.

Run the complete documentation generation:

npm run docs
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/registry.json` around lines 1 - 850, The generated registry
(docs/registry.json) is out of sync with the rest of the docs; regenerate it by
running the documentation build so the "tokens", "sf_classes" and "is_classes"
sections are updated. From the project root run the npm script that builds docs
(npm run docs), verify docs/registry.json is updated, and commit the regenerated
file; reference the registry.json file and confirm token lists like
"--sf-color-primary" and classes such as "sf-container" / "is-active" are
present and consistent after regeneration.
docs/classes.md (1)

1-240: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Regenerate this file using npm run docs:classes instead of manual edits.

The pipeline is failing because this generated file is out of sync with the source. The file header explicitly states "Do not edit by hand" — the generation script must be run to ensure consistency.

Run the following command and commit the result:

npm run docs:classes
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/classes.md` around lines 1 - 240, Summary: docs/classes.md is a
generated file out of sync with source; regenerate it. Fix: run the generation
script referenced in the file header (scripts/gen-class-reference.js) via the
documented npm task and commit the updated artifact—execute npm run
docs:classes, review the changed output in docs/classes.md to ensure it matches
the source, then add/commit the updated file so CI passes.
🧹 Nitpick comments (1)
core/layout.css (1)

115-120: ⚡ Quick win

Consider aligning variant pattern with other layout primitives.

The .sf-gap size variants override the --sf-gap-size token, whereas most other layout primitives (.sf-stack, .sf-cluster) override the gap property directly in their variants. For example:

  • .sf-stack--xs { gap: var(--sf-space-xs); } (property override)
  • .sf-gap--xs { --sf-gap-size: var(--sf-space-xs); } (token override)

While the token-based approach is more flexible, the inconsistency may create a less predictable API surface for framework users.

♻️ Align with existing pattern used by .sf-stack and .sf-cluster
 .sf-gap { gap: var(--sf-gap-size); }
-.sf-gap--xs  { --sf-gap-size: var(--sf-space-xs); }
-.sf-gap--s   { --sf-gap-size: var(--sf-space-s); }
-.sf-gap--m   { --sf-gap-size: var(--sf-space-m); }
-.sf-gap--l   { --sf-gap-size: var(--sf-space-l); }
-.sf-gap--xl  { --sf-gap-size: var(--sf-space-xl); }
-.sf-gap--2xl { --sf-gap-size: var(--sf-space-2xl); }
+.sf-gap--xs  { gap: var(--sf-space-xs); }
+.sf-gap--s   { gap: var(--sf-space-s); }
+.sf-gap--m   { gap: var(--sf-space-m); }
+.sf-gap--l   { gap: var(--sf-space-l); }
+.sf-gap--xl  { gap: var(--sf-space-xl); }
+.sf-gap--2xl { gap: var(--sf-space-2xl); }

This maintains token override capability via style="--sf-gap-size: ..." while matching the established variant pattern.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/layout.css` around lines 115 - 120, The `.sf-gap--*` variant rules
currently override the `--sf-gap-size` token (e.g., `.sf-gap--xs {
--sf-gap-size: ... }`) which is inconsistent with `.sf-stack`/`.sf-cluster`
variants that override the `gap` property directly; update the `.sf-gap--xs`,
`.sf-gap--s`, `.sf-gap--m`, `.sf-gap--l`, `.sf-gap--xl`, and `.sf-gap--2xl`
selectors to set `gap: var(--sf-space-...)` instead of assigning
`--sf-gap-size`, while leaving the `--sf-gap-size` token support intact so
consumers can still override via style attributes when needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/classes.md`:
- Around line 1-240: Summary: docs/classes.md is a generated file out of sync
with source; regenerate it. Fix: run the generation script referenced in the
file header (scripts/gen-class-reference.js) via the documented npm task and
commit the updated artifact—execute npm run docs:classes, review the changed
output in docs/classes.md to ensure it matches the source, then add/commit the
updated file so CI passes.

In `@docs/registry.json`:
- Around line 1-850: The generated registry (docs/registry.json) is out of sync
with the rest of the docs; regenerate it by running the documentation build so
the "tokens", "sf_classes" and "is_classes" sections are updated. From the
project root run the npm script that builds docs (npm run docs), verify
docs/registry.json is updated, and commit the regenerated file; reference the
registry.json file and confirm token lists like "--sf-color-primary" and classes
such as "sf-container" / "is-active" are present and consistent after
regeneration.

In `@docs/tokens.md`:
- Around line 1-668: The docs/tokens.md file is stale and CI fails; regenerate
it and commit the updated output. Run the generation script referenced in the
file header (npm run docs:tokens) to recreate docs/tokens.md (the header "Do not
edit by hand" and the CI errors "docs/tokens.md is stale — run 'npm run docs'
and commit" point to this), stage the regenerated docs/tokens.md, and push the
commit so the pipeline's git-diff check (git diff --exit-code docs/tokens.md)
passes.

In `@integrations/bricks/data/inventory.json`:
- Around line 1-835: The inventory.json in the patch is out-of-date (see
top-level "_meta" and the "variables"/"sf_classes"/"is_classes" lists);
regenerate the file by running the docs generation command and commit the
updated output: run npm run docs, verify inventory.json is refreshed, then
add/commit the regenerated inventory.json so CI no longer reports
"inventory.json is stale."

---

Nitpick comments:
In `@core/layout.css`:
- Around line 115-120: The `.sf-gap--*` variant rules currently override the
`--sf-gap-size` token (e.g., `.sf-gap--xs { --sf-gap-size: ... }`) which is
inconsistent with `.sf-stack`/`.sf-cluster` variants that override the `gap`
property directly; update the `.sf-gap--xs`, `.sf-gap--s`, `.sf-gap--m`,
`.sf-gap--l`, `.sf-gap--xl`, and `.sf-gap--2xl` selectors to set `gap:
var(--sf-space-...)` instead of assigning `--sf-gap-size`, while leaving the
`--sf-gap-size` token support intact so consumers can still override via style
attributes when needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 36091b0a-5828-4bbd-a355-455f77ab8356

📥 Commits

Reviewing files that changed from the base of the PR and between 0891a4f and 96f6956.

⛔ Files ignored due to path filters (10)
  • dist/slashed.essential.css is excluded by !**/dist/**
  • dist/slashed.essential.flat.css is excluded by !**/dist/**
  • dist/slashed.full.css is excluded by !**/dist/**
  • dist/slashed.full.flat.css is excluded by !**/dist/**
  • dist/slashed.optimal-components.css is excluded by !**/dist/**
  • dist/slashed.optimal-components.flat.css is excluded by !**/dist/**
  • dist/slashed.optimal-utilities.css is excluded by !**/dist/**
  • dist/slashed.optimal-utilities.flat.css is excluded by !**/dist/**
  • dist/slashed.optimal.css is excluded by !**/dist/**
  • dist/slashed.optimal.flat.css is excluded by !**/dist/**
📒 Files selected for processing (6)
  • core/layout.css
  • core/tokens.layout.css
  • docs/classes.md
  • docs/registry.json
  • docs/tokens.md
  • integrations/bricks/data/inventory.json

@jackgranatowski

Copy link
Copy Markdown
Contributor Author

/kiro all

@jackgranatowski

Copy link
Copy Markdown
Contributor Author

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)

integrations/bricks/data/inventory.json (1)> 1-835: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Regenerate this file using npm run docs to fix CI failure.
The pipeline is failing because this generated inventory file is out of sync. The error message explicitly directs you to run the documentation generation command.
Pipeline error:

  • "inventory.json is stale. Run 'npm run docs' and commit the updated file."

Run the following command and commit the result:

npm run docs

🤖 Prompt for AI Agents

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@integrations/bricks/data/inventory.json` around lines 1 - 835, The
inventory.json in the patch is out-of-date (see top-level "_meta" and the
"variables"/"sf_classes"/"is_classes" lists); regenerate the file by running the
docs generation command and commit the updated output: run npm run docs, verify
inventory.json is refreshed, then add/commit the regenerated inventory.json so
CI no longer reports "inventory.json is stale."

docs/tokens.md (1)> 1-668: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Regenerate this file using npm run docs:tokens to fix CI failure.
The pipeline is explicitly failing on this file with multiple errors indicating it's stale. The file header states "Do not edit by hand" — the generation script must be run.
Pipeline errors:

  • "Command failed: git diff --exit-code docs/tokens.md"
  • "docs/tokens.md is stale — run 'npm run docs' and commit"

Run the following command and commit the result:

npm run docs:tokens

🤖 Prompt for AI Agents

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/tokens.md` around lines 1 - 668, The docs/tokens.md file is stale and CI
fails; regenerate it and commit the updated output. Run the generation script
referenced in the file header (npm run docs:tokens) to recreate docs/tokens.md
(the header "Do not edit by hand" and the CI errors "docs/tokens.md is stale —
run 'npm run docs' and commit" point to this), stage the regenerated
docs/tokens.md, and push the commit so the pipeline's git-diff check (git diff
--exit-code docs/tokens.md) passes.

docs/registry.json (1)> 1-850: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Regenerate this file using npm run docs to ensure consistency.
This registry is part of the generated documentation suite. While no specific pipeline error is shown for this file, it should be regenerated along with the other documentation files to maintain consistency across the design system inventory.
Run the complete documentation generation:

npm run docs

🤖 Prompt for AI Agents

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/registry.json` around lines 1 - 850, The generated registry
(docs/registry.json) is out of sync with the rest of the docs; regenerate it by
running the documentation build so the "tokens", "sf_classes" and "is_classes"
sections are updated. From the project root run the npm script that builds docs
(npm run docs), verify docs/registry.json is updated, and commit the regenerated
file; reference the registry.json file and confirm token lists like
"--sf-color-primary" and classes such as "sf-container" / "is-active" are
present and consistent after regeneration.

docs/classes.md (1)> 1-240: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Regenerate this file using npm run docs:classes instead of manual edits.
The pipeline is failing because this generated file is out of sync with the source. The file header explicitly states "Do not edit by hand" — the generation script must be run to ensure consistency.
Run the following command and commit the result:

npm run docs:classes

🤖 Prompt for AI Agents

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/classes.md` around lines 1 - 240, Summary: docs/classes.md is a
generated file out of sync with source; regenerate it. Fix: run the generation
script referenced in the file header (scripts/gen-class-reference.js) via the
documented npm task and commit the updated artifact—execute npm run
docs:classes, review the changed output in docs/classes.md to ensure it matches
the source, then add/commit the updated file so CI passes.

🧹 Nitpick comments (1)

core/layout.css (1)> 115-120: ⚡ Quick win

Consider aligning variant pattern with other layout primitives.
The .sf-gap size variants override the --sf-gap-size token, whereas most other layout primitives (.sf-stack, .sf-cluster) override the gap property directly in their variants. For example:

  • .sf-stack--xs { gap: var(--sf-space-xs); } (property override)
  • .sf-gap--xs { --sf-gap-size: var(--sf-space-xs); } (token override)

While the token-based approach is more flexible, the inconsistency may create a less predictable API surface for framework users.

♻️ Align with existing pattern used by .sf-stack and .sf-cluster

 .sf-gap { gap: var(--sf-gap-size); }
-.sf-gap--xs  { --sf-gap-size: var(--sf-space-xs); }
-.sf-gap--s   { --sf-gap-size: var(--sf-space-s); }
-.sf-gap--m   { --sf-gap-size: var(--sf-space-m); }
-.sf-gap--l   { --sf-gap-size: var(--sf-space-l); }
-.sf-gap--xl  { --sf-gap-size: var(--sf-space-xl); }
-.sf-gap--2xl { --sf-gap-size: var(--sf-space-2xl); }
+.sf-gap--xs  { gap: var(--sf-space-xs); }
+.sf-gap--s   { gap: var(--sf-space-s); }
+.sf-gap--m   { gap: var(--sf-space-m); }
+.sf-gap--l   { gap: var(--sf-space-l); }
+.sf-gap--xl  { gap: var(--sf-space-xl); }
+.sf-gap--2xl { gap: var(--sf-space-2xl); }

This maintains token override capability via style="--sf-gap-size: ..." while matching the established variant pattern.

🤖 Prompt for AI Agents

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/layout.css` around lines 115 - 120, The `.sf-gap--*` variant rules
currently override the `--sf-gap-size` token (e.g., `.sf-gap--xs {
--sf-gap-size: ... }`) which is inconsistent with `.sf-stack`/`.sf-cluster`
variants that override the `gap` property directly; update the `.sf-gap--xs`,
`.sf-gap--s`, `.sf-gap--m`, `.sf-gap--l`, `.sf-gap--xl`, and `.sf-gap--2xl`
selectors to set `gap: var(--sf-space-...)` instead of assigning
`--sf-gap-size`, while leaving the `--sf-gap-size` token support intact so
consumers can still override via style attributes when needed.

🤖 Prompt for all review comments with AI agents

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/classes.md`:
- Around line 1-240: Summary: docs/classes.md is a generated file out of sync
with source; regenerate it. Fix: run the generation script referenced in the
file header (scripts/gen-class-reference.js) via the documented npm task and
commit the updated artifact—execute npm run docs:classes, review the changed
output in docs/classes.md to ensure it matches the source, then add/commit the
updated file so CI passes.

In `@docs/registry.json`:
- Around line 1-850: The generated registry (docs/registry.json) is out of sync
with the rest of the docs; regenerate it by running the documentation build so
the "tokens", "sf_classes" and "is_classes" sections are updated. From the
project root run the npm script that builds docs (npm run docs), verify
docs/registry.json is updated, and commit the regenerated file; reference the
registry.json file and confirm token lists like "--sf-color-primary" and classes
such as "sf-container" / "is-active" are present and consistent after
regeneration.

In `@docs/tokens.md`:
- Around line 1-668: The docs/tokens.md file is stale and CI fails; regenerate
it and commit the updated output. Run the generation script referenced in the
file header (npm run docs:tokens) to recreate docs/tokens.md (the header "Do not
edit by hand" and the CI errors "docs/tokens.md is stale — run 'npm run docs'
and commit" point to this), stage the regenerated docs/tokens.md, and push the
commit so the pipeline's git-diff check (git diff --exit-code docs/tokens.md)
passes.

In `@integrations/bricks/data/inventory.json`:
- Around line 1-835: The inventory.json in the patch is out-of-date (see
top-level "_meta" and the "variables"/"sf_classes"/"is_classes" lists);
regenerate the file by running the docs generation command and commit the
updated output: run npm run docs, verify inventory.json is refreshed, then
add/commit the regenerated inventory.json so CI no longer reports
"inventory.json is stale."

---

Nitpick comments:
In `@core/layout.css`:
- Around line 115-120: The `.sf-gap--*` variant rules currently override the
`--sf-gap-size` token (e.g., `.sf-gap--xs { --sf-gap-size: ... }`) which is
inconsistent with `.sf-stack`/`.sf-cluster` variants that override the `gap`
property directly; update the `.sf-gap--xs`, `.sf-gap--s`, `.sf-gap--m`,
`.sf-gap--l`, `.sf-gap--xl`, and `.sf-gap--2xl` selectors to set `gap:
var(--sf-space-...)` instead of assigning `--sf-gap-size`, while leaving the
`--sf-gap-size` token support intact so consumers can still override via style
attributes when needed.

ℹ️ Review info

/kiro fix

…er pattern

Size modifiers now set gap directly (gap: var(--sf-space-*)) instead of
setting the --sf-gap-size token, matching the established pattern used by
.sf-stack--* and .sf-cluster--*. The --sf-gap-size token on :root and the
base .sf-gap rule are unchanged, so style="--sf-gap-size: X" overrides
still work on bare .sf-gap elements.

https://claude.ai/code/session_01J4EpUK43Ke1jhpeLCHtDsr
@jackgranatowski
jackgranatowski merged commit 2b1daf9 into main May 27, 2026
5 checks passed
@jackgranatowski
jackgranatowski deleted the claude/fervent-curie-DvX5u branch May 31, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants