Skip to content

Pre-freeze cleanup: drop deprecated, consolidate hover, canonical xs..2xl scale - #113

Merged
jackgranatowski merged 6 commits into
mainfrom
freeze-prep-cleanup
May 27, 2026
Merged

Pre-freeze cleanup: drop deprecated, consolidate hover, canonical xs..2xl scale#113
jackgranatowski merged 6 commits into
mainfrom
freeze-prep-cleanup

Conversation

@kiro-agent

@kiro-agent kiro-agent Bot commented May 27, 2026

Copy link
Copy Markdown

This pull request was created by @kiro-agent on behalf of @jackgranatowski 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent


Pre-freeze cleanup. Single PR, no version bump (no users yet). Five logical commits:

# Commit Net
1 chore(tokens): remove deprecated tokens -3 tokens (--sf-ratio-photo, --sf-sidebar-width-default, --sf-grid-min-default)
2 refactor(tokens): consolidate brand hover into palette-only -5 tokens (5 brand --hover from core); forms.css fallback chain simplified
3 refactor(layout): canonical xs..2xl size scale -3 modifiers (stack--2xs/--3xl, cluster--2xs); +4 modifiers (cluster--2xl, grid--2xl, section--xs/--2xl); +3 tokens
4 docs: regenerate references; document size scale and icon sizing rationale regen tokens.md/classes.md/registry.json/snapshot; size-scale table in layout.md; icon-sizing rationale comment in tokens.css
5 chore: update demo, coverage spec, dist bundles, CHANGELOG demo additions (sf-icon--boxed, is-visible, new modifiers); cleanup of removed-class references; bundle regen; CHANGELOG [Unreleased] entry

Verified locally

  • npm run docs:tokens → 619 tokens (was 624: -8 removed, +3 added)
  • npm run docs:classes → 144 .sf- + 40 .is- classes
  • npm run audit → clean
  • npm run build → 10/10 bundles, all exports resolve
  • Coverage check (mirrors tests/coverage.spec.js): every CSS class appears in docs/demo.html, no missing
  • Token-API snapshot updated to match new surface

Architecture decisions captured

  • Hover lives in palette only. The five brand --hover tokens in core/tokens.css were unused internally except by forms.css, which only ships in optimal+ bundles where palette is also present. Single-source-of-truth → no inter-bundle drift.
  • Naming conventions clarified (docs/architecture.md): single dash names palette/shade variants, double dash names application slots. Both public, both SemVer-locked.
  • Canonical size scale: --xs … --2xl everywhere except .sf-icon (capped at --xl because em-based icon sizing has a natural semantic ceiling — above 3em an icon becomes an illustration). Documented inline and in docs/layout.md.
  • Removed-tier tokens remain accessible. --sf-space-2xs, -3xl, -4xl are still public — only the class shortcuts go away. Override the primitive's scoped token to access them.

Tests not run in sandbox

Playwright (no browsers installed) and stylelint (deps not installed). CI will run both on the PR.

Summary by CodeRabbit

  • Breaking Changes

    • Removed deprecated tokens and color hover variants
    • Removed smaller layout class modifiers (.sf-stack--2xs, .sf-stack--3xl, .sf-cluster--2xs)
  • New Features

    • Expanded layout size modifiers across .sf-section, .sf-stack, .sf-cluster, and .sf-grid with new --xs and --2xl variants
    • Added new section padding tokens for extended size range
  • Documentation

    • Updated naming conventions and layout guides to reflect new size-modifier scales and removed deprecated elements

Review Change Stack

kiro-agent and others added 5 commits May 27, 2026 07:07
- Drop --sf-ratio-photo (use --sf-ratio-3-2 or --sf-ratio-4-3)
- Drop --sf-sidebar-width-default (use --sf-sidebar-width directly)
- Drop --sf-grid-min-default (use --sf-grid-min directly)
- Inline default values into the canonical names; the tokens were
  no-user, deprecation timeline (0.4.0/0.5.0) was speculative.
- Remove DEPRECATED section from tokens.css header and architecture.md
  Public-vs-internal description.

Co-authored-by: Jack Granatowski <contact@codeslash.net>
Remove 5 brand --hover tokens from core/tokens.css. They were declared
with a uniform 'l - 0.05' OKLCH formula but only --sf-color-action--hover
was consumed internally (by optional/forms.css), and forms.css ships
only in optimal+ bundles where optional/tokens.palette.css is also
present and provides --sf-color-{primary,...}-hover with palette-derived
values.

Net effect:
- 5 tokens removed from essential bundle (none used internally)
- forms.css simplified — drop fallback chain
  var(--sf-color-action-hover, var(--sf-color-action--hover))
  → var(--sf-color-action-hover)
- Inter-bundle drift eliminated: hover values are no longer different
  between essential and optimal/full

Architecture rule clarified in docs/architecture.md:
- single-dash names a palette/shade variant (the token IS a colour)
- double-dash names an application slot (where/when the colour applies)
Brand hover (palette shade) → single-dash, lives in palette.
Slot tokens (--bg--hover, --text--muted, --link--hover, etc.) → kept
double-dash in core/tokens.css.

Co-authored-by: Jack Granatowski <contact@codeslash.net>
Every size-aware primitive now supports the same canonical range
xs/s/m/l/xl/2xl, with one documented exception:

  .sf-stack    — drop --2xs, drop --3xl, keep --2xl     (xs..2xl)
  .sf-cluster  — drop --2xs, add  --2xl                  (xs..2xl)
  .sf-grid     — add  --2xl  (+ token --sf-grid-min-2xl: 28rem)
  .sf-icon     — UNCHANGED (xs..xl, capped at 3em — em-based icon
                 sizing has a natural semantic ceiling above which
                 the element stops being an icon)
  .sf-section  — add  --xs, add --2xl
                 (+ tokens --sf-section-pad--xs: var(--sf-space-xl)
                  and --sf-section-pad--2xl: calc(var(--sf-space-4xl) * 2))

The space tokens --sf-space-2xs / --sf-space-3xl / --sf-space-4xl
remain in core/tokens.css — they're consumer surface for BEM.
Only the class-modifier shortcuts for those extreme tiers are
removed from .sf-stack and .sf-cluster.

Naming rule (one sentence): xs..2xl wszędzie poza ikoną.

Co-authored-by: Jack Granatowski <contact@codeslash.net>
…onale

- Regenerate docs/tokens.md (619 tokens, was 624: -5 deprecated/hover, +3 size scale)
- Regenerate docs/classes.md (144 .sf-classes, +1 net for size scale)
- Regenerate docs/registry.json (mirrors the above)
- Update tests/token-api.snapshot.json to match the new surface
- docs/layout.md: add 'Size-modifier scale' section explaining xs..2xl
  canonical range and the .sf-icon exception (capped at xl, 3em)
- core/tokens.css: add inline comment block to the Icon sizes section
  explaining em-based design, why no clamp(), why no --sf-icon-scale
  (transitively covered by --sf-text-scale), and why xl is the cap

Co-authored-by: Jack Granatowski <contact@codeslash.net>
Demo (docs/demo.html):
- Add .sf-icon--boxed examples (3 variants: default, primary-tinted, action-pill)
- Add .sf-section--xs and .sf-section--2xl to size demo (now xs..2xl)
- Add .sf-grid--2xl to grid sizes demo
- Add .sf-cluster--2xl to gap-modifiers demo; rename heading
- Add .is-visible to states demo (paired with .is-invisible)
- Replace removed .sf-stack--2xs / .sf-stack--3xl / .sf-cluster--2xs uses
  (with .sf-stack--xs and inline-style overrides demonstrating the
   'go beyond canonical scale' pattern via --sf-stack-gap / --sf-cluster-gap)
- Update .sf-section paragraph to list xs..2xl modifiers

Coverage (tests/coverage.spec.js):
- Drop sf-icon--boxed and is-visible from EXCLUDED — both now demoed

Bundles (dist/):
- Regenerate via npm run build to reflect source changes
  (619 tokens, 144 .sf-classes, 40 .is-classes)

CHANGELOG.md:
- Document the four sub-changes under [Unreleased] / Breaking Changes
  (deprecated removed, hover consolidated, size scale realigned)

Co-authored-by: Jack Granatowski <contact@codeslash.net>
@jackgranatowski

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bd692b8e-9a05-4c27-8155-10c501898747

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR consolidates pre-freeze breaking changes: removes deprecated token aliases and undersized class variants, expands layout primitive size scales to a canonical --xs..--2xl range (with icon sizing capped at --xl), updates form styling to use simplified hover tokens, and regenerates all documentation and test fixtures to reflect the API surface changes.

Changes

Size-Modifier and Token Overhaul

Layer / File(s) Summary
Deprecated token and class variant removal
core/tokens.css, core/tokens.layout.css, core/layout.css
Removes brand hover tokens (--sf-color-*--hover), deprecated ratio (--sf-ratio-photo), default-alias fallback chains (--sf-sidebar-width-default, --sf-grid-min-default), and small layout variants (.sf-stack--2xs/--3xl, .sf-cluster--2xs).
Size-modifier scale expansion and new tokens
core/layout.css, core/tokens.css
Adds .sf-section--xs/--2xl, .sf-cluster--2xl, .sf-grid--2xl class variants and corresponding --sf-section-pad--xs/--2xl and --sf-grid-min-2xl tokens; expands icon sizing documentation explaining --xl cap.
Form styling hover token simplification
optional/forms.css
Updates button and file-input hover rules to directly reference --sf-color-action-hover, removing fallback-chain indirection.
Documentation, demo, and generated registry updates
CHANGELOG.md, docs/architecture.md, docs/layout.md, docs/demo.html, docs/tokens.md, docs/classes.md, docs/registry.json, integrations/bricks/data/inventory.json, tests/token-api.snapshot.json, tests/coverage.spec.js
CHANGELOG documents breaking changes and new documentation; demo.html updates stack modifier instances, adds icon--boxed subsection and expanded layout examples; layout.md clarifies size scale and icon exception; registry and snapshot files reflect all removals and additions; coverage test removes icon--boxed and is-visible exclusions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • codeslash-dev/SLASHED#79: Adds .sf-icon--boxed class with supporting tokens; this PR integrates the boxed-icon API into documentation and demos.
  • codeslash-dev/SLASHED#2: Establishes the layout token framework; this PR refines and expands the size-modifier scale within that framework.
  • codeslash-dev/SLASHED#48: Introduces hover-token conventions; this PR removes derived hover tokens and updates form styling to align with the new structure.

Suggested reviewers

  • jackgranatowski
🚥 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 summarizes the main changes: removal of deprecated tokens, consolidation of hover tokens, and canonicalization of size scale to xs..2xl.
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 freeze-prep-cleanup

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.

Actionable comments posted: 4

🤖 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.

Inline comments:
In `@docs/classes.md`:
- Around line 6-12: The generated docs/classes.md file is stale and failing the
CI check; re-run the project's docs generation step (the script/task that
produces the class reference), regenerate the class reference so the counts and
sections (e.g., the ".sf-*" and ".is-*" class listings and "Layout primitives
(`core/layout.css`)") are up-to-date, stage and commit the updated
docs/classes.md, and push so the CI git-diff check passes.

In `@docs/demo.html`:
- Line 1755: The demo HTML uses a <code> wrapper containing another <code>
(e.g., 'override beyond scale: <code>style="--sf-stack-gap:
var(--sf-space-3xl)"</code>') which is invalid; change the outer <code
style="font-size: var(--sf-text-xs)"> to a non-code wrapper such as <span
style="font-size: var(--sf-text-xs)"> so the inner <code> remains valid, and
make the same replacement for the other occurrence (the similar snippet at the
later line).

In `@docs/tokens.md`:
- Around line 6-14: The docs token reference is out of date: re-run the docs
generation step that produces docs/tokens.md (the generator that reads
core/tokens.css and outputs the token reference), regenerate docs/tokens.md so
it reflects the current 619/371/391 token counts, and commit the updated
docs/tokens.md to resolve the CI failure; ensure the regenerated file replaces
the stale version referenced in the PR.

In `@integrations/bricks/data/inventory.json`:
- Around line 5-7: The committed integrations/bricks/data/inventory.json is out
of date (keys like "variables", "sf_classes", "is_classes" no longer match
generated output); regenerate the inventory by running the project's
inventory/doc generation script or command used in CI (the tool that produces
integrations/bricks/data/inventory.json), verify the numbers update to match CI,
and commit the regenerated integrations/bricks/data/inventory.json so the CI
verification passes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a269271a-9288-46d6-82b6-d0ec10f85134

📥 Commits

Reviewing files that changed from the base of the PR and between 36727a7 and f51816c.

⛔ 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 (14)
  • CHANGELOG.md
  • core/layout.css
  • core/tokens.css
  • core/tokens.layout.css
  • docs/architecture.md
  • docs/classes.md
  • docs/demo.html
  • docs/layout.md
  • docs/registry.json
  • docs/tokens.md
  • integrations/bricks/data/inventory.json
  • optional/forms.css
  • tests/coverage.spec.js
  • tests/token-api.snapshot.json
💤 Files with no reviewable changes (1)
  • tests/coverage.spec.js

Comment thread docs/classes.md
Comment on lines +6 to 12
**144 .sf-classes, 40 .is-classes.** Every `.sf-*` layout/macro class and `.is-*` state class.
See [architecture.md](architecture.md) for layer order and naming conventions.

## Layout primitives (`core/layout.css`)

101 classes.
102 classes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Regenerate class reference to resolve CI blocker.

CI reports this generated file is stale (git diff --exit-code docs/classes.md). Please re-run docs generation and commit the updated artifact so source and generated docs stay in sync.

🤖 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 6 - 12, The generated docs/classes.md file is
stale and failing the CI check; re-run the project's docs generation step (the
script/task that produces the class reference), regenerate the class reference
so the counts and sections (e.g., the ".sf-*" and ".is-*" class listings and
"Layout primitives (`core/layout.css`)") are up-to-date, stage and commit the
updated docs/classes.md, and push so the CI git-diff check passes.

Comment thread docs/demo.html Outdated
<div>
<code style="font-size: var(--sf-text-xs)">.sf-stack--3xl</code>
<div class="sf-stack sf-stack--3xl demo-layout-wrap" style="margin-top: var(--sf-space-xs); min-width: 6rem">
<code style="font-size: var(--sf-text-xs)">override beyond scale: <code>style="--sf-stack-gap: var(--sf-space-3xl)"</code></code>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix invalid nested <code> markup in demo labels.

Line 1755 and Line 1769 nest <code> inside <code>, which is invalid HTML and can render inconsistently in docs.

Suggested fix
-            <code style="font-size: var(--sf-text-xs)">override beyond scale: <code>style="--sf-stack-gap: var(--sf-space-3xl)"</code></code>
+            <code style="font-size: var(--sf-text-xs)">override beyond scale: style="--sf-stack-gap: var(--sf-space-3xl)"</code>
...
-            <code style="font-size: var(--sf-text-xs)">override below scale: <code>style="--sf-cluster-gap: var(--sf-space-2xs)"</code></code>
+            <code style="font-size: var(--sf-text-xs)">override below scale: style="--sf-cluster-gap: var(--sf-space-2xs)"</code>

Also applies to: 1769-1769

🤖 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/demo.html` at line 1755, The demo HTML uses a <code> wrapper containing
another <code> (e.g., 'override beyond scale: <code>style="--sf-stack-gap:
var(--sf-space-3xl)"</code>') which is invalid; change the outer <code
style="font-size: var(--sf-text-xs)"> to a non-code wrapper such as <span
style="font-size: var(--sf-text-xs)"> so the inner <code> remains valid, and
make the same replacement for the other occurrence (the similar snippet at the
later line).

Comment thread docs/tokens.md
Comment on lines +6 to 14
**619 tokens.** Every `--sf-*` custom property and its default value. See
[architecture.md](architecture.md) for the PUBLIC / INTERNAL / DEPRECATED
contract and naming conventions, and [theming.md](theming.md) for the
rebrand workflow.

## Core tokens (`core/tokens.css`)

375 tokens.
371 tokens.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Regenerate token reference to resolve CI blocker.

CI indicates docs/tokens.md is stale (git diff --exit-code docs/tokens.md failed). Re-run the docs generation step and commit the refreshed file.

Also applies to: 391-391

🤖 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 6 - 14, The docs token reference is out of date:
re-run the docs generation step that produces docs/tokens.md (the generator that
reads core/tokens.css and outputs the token reference), regenerate
docs/tokens.md so it reflects the current 619/371/391 token counts, and commit
the updated docs/tokens.md to resolve the CI failure; ensure the regenerated
file replaces the stale version referenced in the PR.

Comment on lines +5 to 7
"variables": 619,
"sf_classes": 144,
"is_classes": 40

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Refresh generated inventory to satisfy CI verification.

CI reports integrations/bricks/data/inventory.json is stale. Please regenerate docs/inventory outputs and commit the updated file.

🤖 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 5 - 7, The committed
integrations/bricks/data/inventory.json is out of date (keys like "variables",
"sf_classes", "is_classes" no longer match generated output); regenerate the
inventory by running the project's inventory/doc generation script or command
used in CI (the tool that produces integrations/bricks/data/inventory.json),
verify the numbers update to match CI, and commit the regenerated
integrations/bricks/data/inventory.json so the CI verification passes.

@jackgranatowski

Copy link
Copy Markdown
Contributor

/kiro all

@jackgranatowski
jackgranatowski merged commit e436419 into main May 27, 2026
5 checks passed
@jackgranatowski
jackgranatowski deleted the freeze-prep-cleanup 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