Skip to content

feat(macros): add .sf-content-auto and .sf-tabular-nums macros (#222, #214) - #235

Merged
jackgranatowski merged 1 commit into
mainfrom
feat/macros-content-tabular
Jun 5, 2026
Merged

feat(macros): add .sf-content-auto and .sf-tabular-nums macros (#222, #214)#235
jackgranatowski merged 1 commit into
mainfrom
feat/macros-content-tabular

Conversation

@jackgranatowski

Copy link
Copy Markdown
Contributor

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 Web


Summary

Follow-up to #234. Resolves the two remaining issues that I'd previously mis-shelved as "blocked utilities" — they're actually macros (token-driven recipes, public API, essential bundle), per the core/macros.css taxonomy: a macro answers "what does this element do / look like?" (cf. the existing single-property .sf-no-tap-highlight macro). The utilities layer stays empty per the roadmap.

Issue Macro Behaviour
#222 .sf-content-auto + --sf-content-intrinsic-size token (default 500px) content-visibility: auto with a contain-intrinsic-size placeholder — skips rendering offscreen content on long pages. Progressive enhancement; unsupported engines (Safari < 18) render normally. Deliberately not paired with will-change.
#214 .sf-tabular-nums font-variant-numeric: var(--sf-font-numeric, tabular-nums) — column-aligned digits. Pairs with the --sf-font-numeric token + number-input styling shipped in #234.

Changes

  • core/macros.css — two new macro classes
  • core/tokens.macros.css--sf-content-intrinsic-size override token
  • docs/demo.html — demo blocks (required by the selector-coverage test)
  • docs/macros.md — documentation for both macros
  • Admin-app cheatsheet (cheatsheet-data.js) + rebuilt bundle; regenerated docs/tokens.md, docs/classes.md, docs/registry.json, Bricks inventory.json, classes-hints.json
  • tests/token-api.snapshot.json+--sf-content-intrinsic-size

Testing

  • npm run lint:css — pass
  • node scripts/check-artifacts.js --check (CI artifacts-freshness, rebuilds CSS+docs / editor-app / admin-app) — pass, all outputs in sync
  • check-cheatsheet — all 1006 inventory entries covered
  • Token snapshot (806) verified against the canonical registry — 0 diffs
  • New macro classes covered in docs/demo.html (selector-coverage test)

Notes

Reclassify #222 and the class half of #214 as MACROS (token-driven
recipes, public API, essential bundle) rather than utilities. The
utilities layer stays empty per roadmap; these answer "what does this
element do/look like?", matching the macros-layer definition (cf. the
existing single-property .sf-no-tap-highlight macro).

- #222 .sf-content-auto + --sf-content-intrinsic-size token: sets
  content-visibility:auto with a contain-intrinsic-size placeholder to
  skip offscreen rendering on long pages. Progressive enhancement.
- #214 .sf-tabular-nums: font-variant-numeric via --sf-font-numeric.

Adds demo.html coverage, macros.md docs, admin-app cheatsheet entries,
and regenerates token/class registries, Bricks inventory, and the
admin-app bundle. Token API snapshot updated (+--sf-content-intrinsic-size)
and verified against the canonical registry (806 tokens).
@coderabbitai

coderabbitai Bot commented Jun 5, 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 8 minutes and 48 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: 96e43f34-5d82-4344-85b6-c6ab63d81e8f

📥 Commits

Reviewing files that changed from the base of the PR and between aae6f17 and 9c45fac.

📒 Files selected for processing (13)
  • CHANGELOG.md
  • core/macros.css
  • core/tokens.macros.css
  • docs/classes.md
  • docs/demo.html
  • docs/macros.md
  • docs/registry.json
  • docs/tokens.md
  • plugins/SLASHED-for-WP/data/classes-hints.json
  • plugins/SLASHED-for-WP/integrations/bricks/admin-app/src/lib/cheatsheet-data.js
  • plugins/SLASHED-for-WP/integrations/bricks/assets/admin-app/app.js
  • plugins/SLASHED-for-WP/integrations/bricks/data/inventory.json
  • tests/token-api.snapshot.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/macros-content-tabular

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.

@jackgranatowski

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

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.

@jackgranatowski
jackgranatowski merged commit 3b30d36 into main Jun 5, 2026
9 checks passed
jackgranatowski pushed a commit that referenced this pull request Jun 5, 2026
Resolve conflicts after #235 (.sf-content-auto / .sf-tabular-nums) merged:
- core/tokens.macros.css: keep both --sf-content-intrinsic-size (#235) and
  the --sf-scrim-* tokens (this PR).
- core/macros.css: keep both #235's .sf-content-auto/.sf-tabular-nums and this
  PR's .sf-link--subtle/--reverse variants.
- CHANGELOG.md: keep both PRs' Added entries.
- Regenerated docs/registry.json, docs/tokens.md, docs/classes.md, Bricks
  inventory, class-hints, and the admin-app bundle (812 tokens, 173 classes,
  cheatsheet 1025/1025). Token snapshot auto-merged and verified vs registry.
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