Major Changes
-
a20811c: - Fix issue where
rtl
andltr
variants does not work with[dir=auto]
- Add
::-webkit-details-marker
tomarker
condition - Add new
inset-2xs
,inset-xs
andinset-sm
shadows - Add new
noscript
andinverted-colors
conditions - Add
:popover-open
toopen
condition - Removed
inner
shadow in favor ofinset-sm
- Remap blur tokens:
blurs.sm
->blurs.xs
blurs.base
->blurs.sm
- Add
-
a3bcbea: Stable release of PandaCSS
Style Context
Add
createStyleContext
function to framework artifacts for React, Preact, Solid, and Vue frameworksimport { sva } from 'styled-system/css' import { createStyleContext } from 'styled-system/jsx' const card = sva({ slots: ['root', 'label'], base: { root: { color: 'red', bg: 'red.300', }, label: { fontWeight: 'medium', }, }, variants: { size: { sm: { root: { padding: '10px', }, }, md: { root: { padding: '20px', }, }, }, }, defaultVariants: { size: 'sm', }, }) const { withProvider, withContext } = createStyleContext(card) const CardRoot = withProvider('div', 'root') const CardLabel = withContext('label', 'label')
Then, use like this:
<CardRoot size="sm"> <CardLabel>Hello</CardLabel> </CardRoot>
Minor Changes
-
860cc7d: Add support for
bgLinear
,bgRadial
andbgConic
properties.bgLinear
<div className={css({ bgLinear: 'to-r', gradientFrom: 'cyan.500', gradientTo: 'blue.500', })} />
bgRadial
<div className={css({ bgRadial: 'in srgb', gradientFrom: 'pink.400', gradientFromPosition: '40%', gradientTo: 'fuchsia.700', })} />
bgConic
<div className={css({ bgConic: 'in srgb', gradientFrom: 'blue.600', gradientTo: 'sky.400', gradientToPosition: '50%', })} />
Add support for
boxSize
property that maps towidth
andheight
properties.<div className={css({ boxSize: '24' })} />
Patch Changes
- Updated dependencies [a3bcbea]
- @pandacss/types@1.0.0