Skip to content

Add color scheme preview setting for light-dark() CSS functions#1543

Draft
pedroalmeida415 wants to merge 1 commit intotailwindlabs:mainfrom
pedroalmeida415:claude/add-color-scheme-preview-NpAXj
Draft

Add color scheme preview setting for light-dark() CSS functions#1543
pedroalmeida415 wants to merge 1 commit intotailwindlabs:mainfrom
pedroalmeida415:claude/add-color-scheme-preview-NpAXj

Conversation

@pedroalmeida415
Copy link
Copy Markdown

@pedroalmeida415 pedroalmeida415 commented Jan 27, 2026

Summary

This PR adds support for previewing colors defined using the light-dark() CSS function based on a user-configurable color scheme preference. Users can now choose whether to preview the light or dark color value in inline color decorators.

Changes

  • Added tailwindCSS.colorSchemePreview setting to VS Code extension
  • Modified resolveLightDark() to accept a colorScheme parameter
  • Threaded colorScheme through color resolution functions
  • Updated documentColorProvider to pass the setting value

Test plan

  • Unit tests for resolveLightDark() function
  • Manual testing: change setting to 'dark' and verify color decorators show dark variant of light-dark() values

@pedroalmeida415 pedroalmeida415 force-pushed the claude/add-color-scheme-preview-NpAXj branch from 56cddc2 to dd47679 Compare January 27, 2026 22:29
@pedroalmeida415 pedroalmeida415 marked this pull request as draft January 27, 2026 22:51
Adds a new setting `tailwindCSS.colorSchemePreview` that controls
whether the light or dark color is shown in previews for CSS
`light-dark()` function values.

- Accepts 'light' (default) or 'dark'
- Useful for developers working primarily in one color scheme
- Added tests for the resolveLightDark function

https://claude.ai/code/session_01Fi6Utr1yb5jk3Xo9yvY567
@pedroalmeida415 pedroalmeida415 force-pushed the claude/add-color-scheme-preview-NpAXj branch from dd47679 to 32fbee0 Compare January 28, 2026 14:14
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