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 | ||
|
|
|
@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 |
[Color Modes] Remove presentational utilities/variables
Put back some utilities for view_components
…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/primitivesvar(--color-text-primary)shows as invalid. Update stylelint config to support CSS variables #1176btn-bluetobtn-primarycolor-scheme: dark lightto each mode to support "native" elements, see this article$text-gray-dark: var(--color-text-primary);color-linkutilities to aLinkcomponentcolor-text-white. This is the only "immutable" color. It stays "white" in all modes.rgba()that would need to be converted.@primer/css-nextworks everywhere on dotcom. Use@primer/css-legacyfor CSS bundles that can't use@primer/css-next.API changes
btn-solid(),btn-inverse(),btn-outline()mixinsdropdown-menu-darkbtn-bluetobtn-primary