Skip to content

fix(themes): refactor conversions and fix out of bound colors#86

Merged
coryrylan merged 2 commits into
mainfrom
topic-contrast-fixes
May 18, 2026
Merged

fix(themes): refactor conversions and fix out of bound colors#86
coryrylan merged 2 commits into
mainfrom
topic-contrast-fixes

Conversation

@coryrylan
Copy link
Copy Markdown
Collaborator

@coryrylan coryrylan commented May 15, 2026

Summary by CodeRabbit

  • Style
    • Updated color palette values across dark and light themes, refreshing accent and neutral colors
  • Refactor
    • Reordered line-height token structure in the light theme for consistent token ordering

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Updates replace numeric-scale color token values with new oklch(...) constants across dark and base theme ref.color palettes; base theme also moves font.line-height named tokens to appear after numeric entries.

Changes

Theme Color Palette and Structure Updates

Layer / File(s) Summary
Dark theme color palette value updates
projects/themes/src/dark.json
Replace oklch(...) values for ref.color accent and neutral/status palettes across numeric scales in the dark theme.
Base theme color palette and line-height structure updates
projects/themes/src/index.json
Replace oklch(...) values for ref.color accent, neutral, and status palettes across numeric scales in the base theme, and move named font.line-height entries (tight, snug, moderate, relaxed, loose) to appear after numeric scaled entries.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions 'refactor conversions and fix out of bound colors' but the changeset shows only color palette value updates from numeric-scale strings to oklch() constants and reordering of font.line-height entries—no apparent out-of-bounds fixes or conversion refactoring visible. Align the title with actual changes: describe the oklch() color constant migration and font.line-height reordering. For example: 'refactor(themes): migrate color palettes to oklch() format and reorder font.line-height tokens'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 topic-contrast-fixes

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

@coryrylan coryrylan force-pushed the topic-contrast-fixes branch 2 times, most recently from f1d42c6 to 8ed218a Compare May 15, 2026 16:13
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@projects/core/src/button-group/button-group.css`:
- Around line 43-45: The CSS rule for :host([container='flat']) sets
--background to the keyword initial which prevents var(--background, ...)
fallbacks and breaks color-mix usage; change the declaration in that selector to
set --background: transparent so the variable resolves to a valid color and
allows the fallback (and color-mix calls that compute
--nve-sys-interaction-state-base) to work correctly across tree-node, tabs-item,
steps-item and interaction-state consumers.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 650cd4b3-a251-405c-a0db-983561c83c58

📥 Commits

Reviewing files that changed from the base of the PR and between 5075247 and f1d42c6.

⛔ Files ignored due to path filters (3)
  • projects/core/.visual/card.dark.png is excluded by !**/*.png
  • projects/core/.visual/textarea.dark.png is excluded by !**/*.png
  • projects/core/.visual/textarea.png is excluded by !**/*.png
📒 Files selected for processing (16)
  • projects/core/src/accordion/accordion.css
  • projects/core/src/button-group/button-group.css
  • projects/core/src/button-group/button-group.global.css
  • projects/core/src/button/button.css
  • projects/core/src/card/card.css
  • projects/core/src/chat-message/chat-message.css
  • projects/core/src/checkbox/checkbox.css
  • projects/core/src/copy-button/copy-button.css
  • projects/core/src/grid/grid.css
  • projects/core/src/page/page.css
  • projects/core/src/progressive-filter-chip/progressive-filter-chip.global.css
  • projects/core/src/radio/radio.css
  • projects/core/src/steps/steps-item.css
  • projects/core/src/toolbar/toolbar.css
  • projects/themes/src/dark.json
  • projects/themes/src/index.json

Comment thread projects/core/src/button-group/button-group.css
@coryrylan coryrylan changed the title Topic contrast fixes fix(core): fallback to initial for background reset on host elements May 15, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@projects/core/src/button-group/button-group.global.css`:
- Line 41: The pressed-state rule in button-group is setting --background:
initial which breaks interaction-state color calculations; change the
pressed-state to either remove the --background override or set it to a concrete
color expression (for example use var(--nve-sys-layer-canvas-background) or
another explicit CSS color) so that --nve-sys-interaction-state-base and the
color-mix in interaction-state.css receive a valid color value instead of
"initial".

In
`@projects/core/src/progressive-filter-chip/progressive-filter-chip.global.css`:
- Line 6: Replace the reset keyword assignment for the component state by
assigning a design token to --background instead of using "initial": in the
:host([status='danger']) rule (where --background is currently set to initial),
set --background to the appropriate danger token (e.g.
var(--nve-status-danger-100) or the project’s equivalent) so the color-mix()
computation in :host can resolve correctly and var(--background) always has a
valid value.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: d954536c-6d4a-4fb6-86bf-821f9057100e

📥 Commits

Reviewing files that changed from the base of the PR and between f1d42c6 and 8ed218a.

⛔ Files ignored due to path filters (3)
  • projects/core/.visual/card.dark.png is excluded by !**/*.png
  • projects/core/.visual/textarea.dark.png is excluded by !**/*.png
  • projects/core/.visual/textarea.png is excluded by !**/*.png
📒 Files selected for processing (16)
  • projects/core/src/accordion/accordion.css
  • projects/core/src/button-group/button-group.css
  • projects/core/src/button-group/button-group.global.css
  • projects/core/src/button/button.css
  • projects/core/src/card/card.css
  • projects/core/src/chat-message/chat-message.css
  • projects/core/src/checkbox/checkbox.css
  • projects/core/src/copy-button/copy-button.css
  • projects/core/src/grid/grid.css
  • projects/core/src/page/page.css
  • projects/core/src/progressive-filter-chip/progressive-filter-chip.global.css
  • projects/core/src/radio/radio.css
  • projects/core/src/steps/steps-item.css
  • projects/core/src/toolbar/toolbar.css
  • projects/themes/src/dark.json
  • projects/themes/src/index.json

Comment thread projects/core/src/button-group/button-group.global.css Outdated
Comment thread projects/core/src/progressive-filter-chip/progressive-filter-chip.global.css Outdated
@coryrylan coryrylan force-pushed the topic-contrast-fixes branch from 8ed218a to 90ad264 Compare May 15, 2026 18:46
@coryrylan coryrylan changed the title fix(core): fallback to initial for background reset on host elements fix(themes): refactor conversions and fix out of bound colors May 15, 2026
@coryrylan coryrylan force-pushed the topic-contrast-fixes branch 6 times, most recently from 24118eb to 6def0f5 Compare May 18, 2026 13:52
"type": "color"
},
"800": {
"value": "oklch(71.6% 0.113 160.3)",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Rounding colors as most don't need to go to such precision (from conversion math of figma not supporting oklch) This also fixes a handful of colors where the math was incorrect and the color was falling out of the supported oklch color range resulting in incorrect hue values. Most changes have no perceived visual change due to the rounding. This is why there are few visual test changes.

The simplified rounding/numbers is a minor refactor/first step that will allow improvements to the color ramp and leverage newer css color mix features to compute the values more efficiently.

@coryrylan coryrylan force-pushed the topic-contrast-fixes branch from 6def0f5 to bf9b832 Compare May 18, 2026 14:14
<label>•︎•︎•︎•︎•︎•︎</label>
<textarea rows="15" cols="40"></textarea>
<nve-control-message>•︎•︎•︎•︎•︎•︎</nve-control-message>
</nve-textarea>
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The row/cols and resize styles were causing flakey tests due to platform differences

@coryrylan coryrylan force-pushed the topic-contrast-fixes branch from bf9b832 to 674aa18 Compare May 18, 2026 18:15
coryrylan added 2 commits May 18, 2026 13:29
- rounds values for future refactor cleanup with color mix options
- fixes a few cases of invalid oklch range values

Signed-off-by: Cory Rylan <crylan@nvidia.com>
Signed-off-by: Cory Rylan <crylan@nvidia.com>
@coryrylan coryrylan force-pushed the topic-contrast-fixes branch from 674aa18 to 771fe5e Compare May 18, 2026 18:29
@coryrylan coryrylan merged commit 5c9bd5f into main May 18, 2026
8 checks passed
@coryrylan coryrylan deleted the topic-contrast-fixes branch May 18, 2026 18:43
@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.11 🎉

Changelog

@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.1.2 🎉

Changelog

@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.2.0 🎉

Changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants