@pandacss/core@0.25.0
版本发布时间: 2024-01-06 19:06:35
chakra-ui/panda最新发布版本:@pandacss/types@0.46.0(2024-09-10 02:16:05)
Minor Changes
-
de282f60: Support token reference syntax when authoring styles object, text styles and layer styles.
import { css } from '../styled-system/css' const styles = css({ border: '2px solid {colors.primary}', })
This will resolve the token reference and convert it to css variables.
.border_2px_solid_\{colors\.primary\} { border: 2px solid var(--colors-primary); }
The alternative to this was to use the
token(...)
css function which will be resolved.token(...)
vs{...}
Both approaches return the css variable
const styles = css({ // token reference syntax border: '2px solid {colors.primary}', // token function syntax border: '2px solid token(colors.primary)', })
However, The
token(...)
syntax allows you to set a fallback value.const styles = css({ border: '2px solid token(colors.primary, red)', })
Patch Changes
-
59fd291c: Add a way to generate the staticCss for all recipes (and all variants of each recipe)
-
de282f60: Fix issue where
base
doesn't work within css functioncss({ // This didn't work, but now it does base: { color: 'blue' }, })
-
Updated dependencies [59fd291c]
-
Updated dependencies [de282f60]
- @pandacss/types@0.25.0
- @pandacss/token-dictionary@0.25.0
- @pandacss/error@0.25.0
- @pandacss/is-valid-prop@0.25.0
- @pandacss/logger@0.25.0
- @pandacss/shared@0.25.0