Comments (2)
a few things are wrong in your config:
- you don't need a
base
custom condition with an empty value, it's automatically provided in thecss()
fn - the
&
character was missing in your customkids
condition (we should emphasise this in the linked page) - you can use
DEFAULT
in the configsemanticTokens
to specify the value when not using a condition - your semanticToken is named the same as the one defined in token,
primary
, ideally avoid clashing names and use a new one - you didn't wrap your semanticToken
primary
in a{ value: xxx }
key
import { defineConfig } from '@pandacss/dev';
export const config = defineConfig({
conditions: {
kids: '&[data-theme=kids]',
},
theme: {
tokens: {
colors: {
primary: { value: '#FFF200', description: 'yellow.500' },
secondary: { value: '#7334F4', description: 'purple.500' },
}
},
semanticTokens: {
colors: {
main: {
value: {
DEFAULT: '{colors.primary}',
_kids: '{colors.secondary}'
}
}
}
}
},
});
we will add config validation exactly to avoid this kind of issues
from panda.
Thankyou! My apologies for misunderstanding the documentation, fixed here: https://play.panda-css.com/5p5p9cbz2y
from panda.
Related Issues (20)
- defineKeyframes type error HOT 4
- Responsive rule insertion order in HMR updates HOT 1
- Themed recipes does not support the usage of `.raw()` HOT 2
- Semantic tokens should be type checked HOT 2
- Compiling with vite/rollup produces warnings about the __PURE__ annotations HOT 2
- Custom Utility with Shorthand not extracted HOT 1
- Merging css props with `css` function doesn't work as the example shows HOT 1
- Reducing the burden on type systems HOT 1
- Panda CSS default theme not applying HOT 9
- `bleed` pattern not handling CSS custom properties
- Pattern properties with correct naming are not taken into account into custom component HOT 2
- named containers not generated properly HOT 2
- CSS from recipes not applied on web app consuming a package
- PostCSS warning when Panda rules are not injected
- `panda` emitted package poses importing issues HOT 3
- Storybook HMR issues with recipe import HOT 7
- `v-model` doesn't work on styled JSX components (VueJS) HOT 1
- Could not resolve "@pandacss/dev"
- Cannot create a tree-shakeable component library with Panda CSS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panda.