-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(shadcn): light-dark
support
#6664
base: main
Are you sure you want to change the base?
Conversation
@mfteuscher is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
af33a7b
to
ef6d9aa
Compare
I'm looking into this as well. Definitely interested in merging this. Any issues with |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@mfteuscher heads up: the changes should be made (and tested) in apps/v4. I'm going to upgrade apps/www later. |
Ok, I'll make sure changes are made and tested in apps/v4. Thanks |
ef6d9aa
to
92769e2
Compare
test(shadcn): begin test updates for new light-dark paradigm
72fafeb
to
a2bac46
Compare
@shadcn finished up all the work on this update, and after looking through the v4 app, there don't appear to be any issues with the |
light-dark()
gained base support from all major browsers in 2024, and it makes for really clean CSS syntax. This update shouldn't conflict with the planned move to OKLCH.The updated PostCSS plugin updater will migrate existing color variables in the
:root
and.dark
blocks to just the:root
inside thelight-dark()
function. If a color variable only exists in the:root
or.dark
blocks, they will be ignored. Non-color variables will also be ignored, sincelight-dark()
only supports CSS colors. Any new variables added will use thelight-dark()
function, as long as both a light and dark variant are provided.The code is currently not passing all tests. I wanted to confirm that this wasn't already being implemented before putting in the work of getting all the tests passing@shadcn, is this PR something you're interested in merging, or are you already working on this, making this PR unnecessary?Example
It turns this
into this