Skip to content

Set color-scheme on theme roots for native widget styling - #41

Open
thiagoburgo wants to merge 1 commit into
figamore:mainfrom
thiagoburgo:pr/color-scheme
Open

thiagoburgo wants to merge 1 commit into
figamore:mainfrom
thiagoburgo:pr/color-scheme

Conversation

@thiagoburgo

@thiagoburgo thiagoburgo commented Sep 15, 2026

Copy link
Copy Markdown

Browser-painted controls (scrollbars, form widgets, unstyled button fallbacks) did not follow the active FigUI theme. On dark themes, some native UI could still render with light UA defaults.

This adds color-scheme: light on :root and color-scheme: dark on .dark, .anthracite-dark, and .midnight-dark in src/index.css. The property tells the browser which palette to use for native controls without affecting FigUI's custom CSS variables.

Test plan

  • Switch between Light, Dark, Anthracite Dark, and Midnight Dark
  • Confirm scrollbars and native form controls match the selected theme
  • Verify no visual regressions on desktop, tablet, or mobile layouts

Summary by CodeRabbit

  • Style
    • Updated light and dark themes so browser-controlled interface elements, such as form fields and scrollbars, better match the selected theme.

Keeps browser-painted controls in sync with light and dark themes.
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b3ea9776-6114-4537-84fb-70ff2806fec6

📥 Commits

Reviewing files that changed from the base of the PR and between afcb734 and 8560916.

📒 Files selected for processing (1)
  • src/index.css

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The CSS now declares light or dark color-scheme values for the default and three dark theme scopes. This affects browser-painted widgets without changing other CSS variables or rules.

Changes

Theme color-scheme support

Layer / File(s) Summary
Theme scope declarations
src/index.css
The :root scope declares color-scheme: light. The .dark, .anthracite-dark, and .midnight-dark scopes declare color-scheme: dark.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: figamore

Merge Risk: ⚪ Minimal · up to 85609

The change is limited to matching browser-painted controls to each supported theme and presents no identified merge-blocking risk.

🚥 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: adding color-scheme declarations to theme roots for native widget styling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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.

1 participant