-
Couldn't load subscription status.
- Fork 4
Use multiple values instead of @supports query for p3 colors #41
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
Conversation
|
I have erred. The class is there in the tokens file: '.bg-scrim': [
{ 'background-color': 'var(--surface-scrim)' },
{ 'background-color': 'var(--surface-scrim-p3)' },
],so if it's complaining about it being missing from CSS, it must be getting dropped on the floor when TW tries to turn it into CSS. It's not only this one, sometimes it complains about other ones. |
|
TW says it uses this library // test.js
const postcss = require('postcss')
const postcssJs = require('postcss-js')
const nested = require('postcss-nested')
const style = {
'.a': [{ color: 'var(--content-accent)' }, { color: 'var(--content-accent-p3)' }],
'.b': {
color: 'var(--content-accent)',
},
'.c': {
color: 'var(--content-accent)',
color: 'var(--content-accent-p3)',
},
'.d': {
color: 'var(--content-accent)',
'&': {
color: 'var(--content-accent-p3)',
},
},
}
postcss(nested)
.process(style, { parser: postcssJs, from: undefined })
.then((result) => console.log(result.css))Nothing worked. I was in despair. (Actually Then I remembered // test2.js
const postcss = require('postcss')
const postcssJs = require('postcss-js')
console.log(postcssJs.objectify(postcss.parse('.a { color: #abc; color: #def; }')))💀 |
addUtilities|
🚀 PR was released in |


Should fix #40
Tested locally with a
npm linkshould confirm with the canary release.📦 Published PR as canary version:
1.0.1--canary.41.2907991.0✨ Test out this PR locally via:
npm install @oxide/design-system@1.0.1--canary.41.2907991.0 # or yarn add @oxide/design-system@1.0.1--canary.41.2907991.0