Skip to content

fix(lumlocker): scope to 4 brand colors, fix section-theme bypass - #335

Merged
jackgranatowski merged 6 commits into
mainfrom
claude/serene-turing-asgxuf
Jun 16, 2026
Merged

fix(lumlocker): scope to 4 brand colors, fix section-theme bypass#335
jackgranatowski merged 6 commits into
mainfrom
claude/serene-turing-asgxuf

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

LumLocker now covers only primary, secondary, tertiary, and action —
neutral is excluded (locking a desaturated grey to a brand L value
would make it appear chromatic). Removes the --sf-color-neutral
override from :root[data-lumlocker].

Fixes the section-level bypass bug: [data-theme] descendants would
re-compute brand colors from source tokens, ignoring the root-level
lumlocked values. New combinator rules
(:root[data-lumlocker] [data-theme="dark/light"]) have higher
specificity (2 attr selectors) and re-apply the OKLCH L-lock for
those 4 colors inside any themed subtree.

Also: add .sf-bento--3 modifier for column symmetry (--2/--3/--4),
and remove the unnecessary container context from .sf-grid-cols-1
(a single-column grid never needs CQ responsive breakpoints).

Updated comments in tokens.css and themes.css to reflect the 4-color
scope.

https://claude.ai/code/session_01ATnXgvc7vf945stc5VDAvz

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed theme color “lumlocking” so locked brand colors still apply inside nested themed (light/dark) sections.
  • New Features

    • Enhanced Bento grid responsiveness with updated container-query behavior.
    • Added Bento child span modifiers (featured, full, tall, wide) and updated column modifiers (supports --2, --3, --6; --4 removed).
  • Changes

    • Updated the default Bento grid column count to 4 (was 3).
  • Documentation

    • Refreshed Bento demos and class/token references to match the new behavior.

claude added 3 commits June 16, 2026 05:24
LumLocker now covers only primary, secondary, tertiary, and action —
neutral is excluded (locking a desaturated grey to a brand L value
would make it appear chromatic). Removes the --sf-color-neutral
override from :root[data-lumlocker].

Fixes the section-level bypass bug: [data-theme] descendants would
re-compute brand colors from source tokens, ignoring the root-level
lumlocked values. New combinator rules
(:root[data-lumlocker] [data-theme="dark/light"]) have higher
specificity (2 attr selectors) and re-apply the OKLCH L-lock for
those 4 colors inside any themed subtree.

Also: add .sf-bento--3 modifier for column symmetry (--2/--3/--4),
and remove the unnecessary container context from .sf-grid-cols-1
(a single-column grid never needs CQ responsive breakpoints).

Updated comments in tokens.css and themes.css to reflect the 4-color
scope.

https://claude.ai/code/session_01ATnXgvc7vf945stc5VDAvz
The default --sf-bento-cols-default is already 3, so the modifier
was a no-op. Column count is controlled via --sf-bento-cols (modifier
class or inline style); the --3 class added noise without value.

https://claude.ai/code/session_01ATnXgvc7vf945stc5VDAvz
Default column count changed from 3 → 4: divides evenly for 1+3,
2+2, 3+1, and 2×2 featured layouts.

Column modifiers added: --3 and --6 (alongside existing --2).
Previous --4 removed since 4 is now the default.

Child span modifiers added for bento items:
  .sf-bento-wide     → grid-column: span 2
  .sf-bento-full     → grid-column: 1 / -1 (all columns)
  .sf-bento-tall     → grid-row: span 2
  .sf-bento-featured → span 2 cols × 2 rows (hero card)

grid-auto-flow: dense on the parent fills gaps caused by spanning
items automatically — no manual placement needed.

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

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

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 54 minutes and 11 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ 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: f41d578f-5784-4f60-bb10-6e61bf3e7c5e

📥 Commits

Reviewing files that changed from the base of the PR and between 93c4e11 and 2b80999.

⛔ Files ignored due to path filters (1)
  • dist/badge-essential.json is excluded by !**/dist/**
📒 Files selected for processing (3)
  • core/layout.css
  • docs/api-index.json
  • docs/api-index.md
📝 Walkthrough

Walkthrough

Updates bento grid layout: splits .sf-grid-cols-1 container context from multi-column variants, changes the default bento column token from 3 to 4, revises container-query breakpoints, removes the --4 column modifier, and adds child span modifier selectors. Separately narrows the lumlocker system to 4 brand colors, removing neutral, and adds [data-theme] descendant selectors to prevent lumlocked values from being bypassed in themed subtrees. Generated indexes and documentation are updated to reflect these changes.

Changes

Bento Grid Layout

Layer / File(s) Summary
Bento default token and grid-cols-1 container split
core/tokens.layout.css, core/layout.css
--sf-bento-cols-default incremented from 3 to 4; .sf-grid-cols-1 split from the multi-column group so it no longer declares container: sf-grid / inline-size.
Bento container-query, modifiers, and child span selectors
core/layout.css
Block comment updated to enumerate supported modifiers; S-range container query added forcing 2-column layout at 30em–47.99em; column modifiers limited to --2, --3, --6 (.sf-bento--4 removed); new child span selectors .sf-bento-wide, .sf-bento-full, .sf-bento-tall, .sf-bento-featured added.
Generated bento indexes and documentation
configurator/src/data/api-index.generated.json, docs/api-index.json, docs/api-index.md, docs/classes.md, docs/demo.html, docs/registry.json, docs/test-coverage-3-layout.html, docs/token-index.json
API indexes, class/token registries, and demo/test pages updated to reflect new bento column defaults, child span modifiers, and removal of the --4 modifier.

Lumlocker Brand Color Scope

Layer / File(s) Summary
Lumlocker comment updates
core/tokens.css, core/themes.css
--sf-lumlocker inline comment and lumlocker section header updated to describe 4 brand colors (primary/secondary/tertiary/action), explicitly excluding neutral and base. Comment added describing the [data-theme] subtree fix.
data-theme descendant lumlocker selectors
core/themes.css
:root[data-lumlocker] [data-theme="dark"] and :root[data-lumlocker] [data-theme="light"] descendant selectors added inside the @supports (color: oklch(...)) block to reapply lumlocked brand color lightness values in nested themed subtrees; neutral reassignment removed.
Generated lumlocker token indexes and documentation
configurator/src/data/api-index.generated.json, docs/api-index.json, docs/api-index.md, docs/token-index.json, docs/token-index.md, docs/tokens.md
Token indexes and documentation updated to reflect the narrowed lumlocker scope (4 brand colors instead of 5, excluding neutral and base from the lock).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • codeslash-dev/SLASHED#327: Implements the API freeze items including the lumlocker brand-color scope fix and bento grid container-query breakpoint behavior changes documented in that issue.

Possibly related PRs

  • codeslash-dev/SLASHED#154: Directly modifies .sf-bento container-query and grid-template rules in core/layout.css and touches core/themes.css lumlocker behavior, overlapping both functional areas of this PR.
🚥 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 accurately describes the primary change: fixing the lumlocker feature to scope to 4 brand colors and addressing the section-theme bypass bug, which aligns with the main objectives.
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/serene-turing-asgxuf

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: 3

🤖 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 `@core/layout.css`:
- Around line 581-588: The `.sf-bento--4` column modifier has been removed from
the CSS in core/layout.css (now only supporting `--2`, `--3`, and `--6`), but
this modifier is still referenced in multiple documentation and configuration
files. Remove all references to the `.sf-bento--4` modifier from docs/demo.html,
docs/api-index.md, docs/classes.md, docs/api-index.json, docs/registry.json, and
docs/test-coverage-3-layout.html to ensure documentation accurately reflects the
current set of supported modifiers.

In `@core/tokens.css`:
- Around line 319-323: The LumLocker documentation in the API reference is out
of sync with the current implementation. Update the API index entry to reflect
that LumLocker now locks 4 brand colors (primary, secondary, tertiary, action)
instead of 5, and clearly state that neutral is excluded because it is a
desaturated grey that should not be locked to a brand lightness value. Ensure
the updated documentation matches the behavior described in the tokens.css
comments for LumLocker.

In `@core/tokens.layout.css`:
- Line 132: Update the documentation files to reflect the changed token value
for the Bento grid default columns. In docs/tokens.md at line 525,
docs/token-index.md at line 198, and docs/api-index.md at line 540, locate all
references to the old value of 3 for the --sf-bento-cols-default token and
update each occurrence to 4 to match the new value now defined in
core/tokens.layout.css at line 132.
🪄 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: c8f00801-cae6-44ae-9b2b-7786e017cfff

📥 Commits

Reviewing files that changed from the base of the PR and between c0d8d84 and 8e42ead.

⛔ Files ignored due to path filters (2)
  • dist/badge-essential.json is excluded by !**/dist/**
  • dist/badge-optimal.json is excluded by !**/dist/**
📒 Files selected for processing (4)
  • core/layout.css
  • core/themes.css
  • core/tokens.css
  • core/tokens.layout.css

Comment thread core/layout.css
Comment on lines +581 to 588
/* Container column modifiers */
.sf-bento--2 { --sf-bento-cols: 2; }
.sf-bento--4 { --sf-bento-cols: 4; }
.sf-bento--3 { --sf-bento-cols: 3; }
.sf-bento--6 { --sf-bento-cols: 6; }

/* Container row height modifiers */
.sf-bento--compact { --sf-bento-row: var(--sf-bento-row-compact); }
.sf-bento--tall { --sf-bento-row: var(--sf-bento-row-tall); }

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for references to the removed .sf-bento--4 modifier
rg -n 'sf-bento--4' docs/ tests/

Repository: codeslash-dev/SLASHED

Length of output: 1006


🏁 Script executed:

#!/bin/bash
# Read the specific lines in core/layout.css to verify the current state
sed -n '575,595p' core/layout.css

Repository: codeslash-dev/SLASHED

Length of output: 941


🏁 Script executed:

#!/bin/bash
# Search for all .sf-bento-- modifier definitions in the CSS file
rg -n 'sf-bento--' core/layout.css | head -20

Repository: codeslash-dev/SLASHED

Length of output: 562


Update documentation to remove .sf-bento--4 references.

The .sf-bento--4 modifier was removed from CSS (lines 582–584 now contain only --2, --3, --6), but multiple documentation files still list it as a supported modifier. Update the following to reflect the current set: docs/demo.html, docs/api-index.md, docs/classes.md, docs/api-index.json, docs/registry.json, and docs/test-coverage-3-layout.html. Since 3 columns is now the default, consumers explicitly using .sf-bento--4 should simply remove that class.

🤖 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 581 - 588, The `.sf-bento--4` column modifier
has been removed from the CSS in core/layout.css (now only supporting `--2`,
`--3`, and `--6`), but this modifier is still referenced in multiple
documentation and configuration files. Remove all references to the
`.sf-bento--4` modifier from docs/demo.html, docs/api-index.md, docs/classes.md,
docs/api-index.json, docs/registry.json, and docs/test-coverage-3-layout.html to
ensure documentation accurately reflects the current set of supported modifiers.

Comment thread core/tokens.css
Comment thread core/tokens.layout.css
claude added 2 commits June 16, 2026 08:40
Regenerate all auto-generated docs (api-index, classes, token-index,
tokens, registry) to reflect the updated bento API:
  - --sf-bento-cols-default: 3 → 4
  - .sf-bento--4 removed (4 is now the default)
  - New classes: .sf-bento--3, .sf-bento--6 (column modifiers)
  - New child span classes: .sf-bento-wide, .sf-bento-tall,
    .sf-bento-featured, .sf-bento-full

Hand-updated docs/demo.html and docs/test-coverage-3-layout.html to
add examples for every new bento class (fixes regression test:
"every .sf-* class from core/*.css appears in docs/demo.html").

Fixes "Verify all generated artifacts" CI failure (registry.json stale).
Addresses CodeRabbit review comments: .sf-bento--4 refs removed,
LumLocker 4-color scope reflected, bento default updated to 4.

https://claude.ai/code/session_01ATnXgvc7vf945stc5VDAvz
Regenerate configurator/src/data/api-index.generated.json via
configurator:sync after bento API changes (new classes, removed
.sf-bento--4, updated --sf-bento-cols-default).

https://claude.ai/code/session_01ATnXgvc7vf945stc5VDAvz

@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 (1)
docs/api-index.md (1)

969-969: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the .sf-grid-cols-1 contract text.

This entry still says the 1-column variant is container-query responsive and needs an ancestor container, which conflicts with the layout change that removes that dependency. Update the generated docs so consumers don't rely on stale behavior.

🤖 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/api-index.md` at line 969, The documentation for the `.sf-grid-cols-1`
class in the api-index.md file is outdated and still describes it as requiring
container-query responsiveness with an ancestor container context. Update the
contract text for `.sf-grid-cols-1` to reflect that the layout change has
removed this container-query dependency. Remove the references to needing a
container ancestor with container-type: inline-size and update the description
to accurately describe the new behavior where this class works without requiring
container context.
🤖 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/api-index.md`:
- Line 969: The documentation for the `.sf-grid-cols-1` class in the
api-index.md file is outdated and still describes it as requiring
container-query responsiveness with an ancestor container context. Update the
contract text for `.sf-grid-cols-1` to reflect that the layout change has
removed this container-query dependency. Remove the references to needing a
container ancestor with container-type: inline-size and update the description
to accurately describe the new behavior where this class works without requiring
container context.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 741eddef-b951-4569-85da-e5e099856572

📥 Commits

Reviewing files that changed from the base of the PR and between 8e42ead and 93c4e11.

📒 Files selected for processing (10)
  • configurator/src/data/api-index.generated.json
  • docs/api-index.json
  • docs/api-index.md
  • docs/classes.md
  • docs/demo.html
  • docs/registry.json
  • docs/test-coverage-3-layout.html
  • docs/token-index.json
  • docs/token-index.md
  • docs/tokens.md
✅ Files skipped from review due to trivial changes (4)
  • docs/token-index.json
  • docs/demo.html
  • docs/test-coverage-3-layout.html
  • docs/classes.md

…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
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