-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
🎨 Color Modes #1131
🎨 Color Modes #1131
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primer-css/9rfgnKgoA48rZAGSxy168TBQ7JDz |
Created #1134 and changed this PRs's base to it. Once this PR is ready, we can merge it and start testing in parallel with the @primer/css-next npm package. Similar to the Component Refresh. |
7769784
to
d0457ba
Compare
// Color modes | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
@simurai I changed the name of the package in this PR to Please feel free to push any commits you need to the Primer Primitives PR; if you do you can use the version number in the GitHub checks to update this PR's |
I switched the base branch back to master, so |
…lors [Color Modes] Remove all deprecated colors
…into mkt/color-modes-whee
Hey @simurai so I get it that automatic dark mode detection is coming to release 16.0 of primer, is that correct? |
Yes, although this reminds me we still have to document it. You can add these So an example would be: <html data-color-mode="auto" data-light-theme="light" data-dark-theme="dark_dimmed"> |
This PR goes hand-in-hand with primer/primitives#18 to introduce color modes to Primer. This PR is extremely WIP.
TODO
primer/primitives
var(--color-text-primary)
shows as invalid. Update stylelint config to support CSS variables #1176btn-blue
tobtn-primary
color-scheme: dark light
to each mode to support "native" elements, see this article$text-gray-dark: var(--color-text-primary);
color-
link
utilities to aLink
componentcolor-text-white
. This is the only "immutable" color. It stays "white" in all modes.rgba()
that would need to be converted.@primer/css-next
works everywhere on dotcom. Use@primer/css-legacy
for CSS bundles that can't use@primer/css-next
.API changes
btn-solid()
,btn-inverse()
,btn-outline()
mixinsdropdown-menu-dark
btn-blue
tobtn-primary