🐼 Panda v0.29.0 #2110
Replies: 5 comments 13 replies
-
Am I right thinking that the latest |
Beta Was this translation helpful? Give feedback.
-
I just initialized a new project and After reverting back to 0.28.0 it worked so I think it's related to this version. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to use the opacity modifier with a var? |
Beta Was this translation helpful? Give feedback.
-
Is it possible to use the opacity modifier within a semantic token config definition where the {} syntax is being used? For example something like: selection: {
background: {
value: {
base: "{colors.red.100}/70",
_dark: "{colors.red.900}/70",
},
},
}, |
Beta Was this translation helpful? Give feedback.
-
I'm starting to get this error now: - [tokens]: Token paths must end with 'value': `theme.tokens.fonts.display.description` But when I update the font token to follow the pattern of Everything still works with the |
Beta Was this translation helpful? Give feedback.
-
To upgrade to v0.29.0:
What's Changed
Fixed
Added
Add config validation
Default values in patterns
You can now set and override
defaultValues
in pattern configurations.Here's an example of how to define a new
hstack
pattern with a defaultgap
value of40px
:Media query curly braces tokens
Add support for token references with curly braces like
{path.to.token}
in media queries, just like thetoken(path.to.token)
alternative already could.Color opacifier
Update every utilities connected to the
colors
tokens in the@pandacss/preset-base
(included by default) to use thecolor-mix
CSS function.This function allows you to mix two colors together, and we use it to change the opacity of a color using the
{color}/{opacity}
syntax.You can use it like this:
This will generate:
color-mix
color-mix
function is not supported by thebrowser.
The
utilities
transform function also receives a newutils
object that contains thecolorMix
function, so you canalso use it on your own utilities:
Here's a cool snippet (that we use internally !) that makes it easier to create a utility transform for a given
property:
then the same utility transform as above can be written like this:
Container queries Theme
Improve support for CSS container queries by adding a new
containerNames
andcontainerSizes
theme options.You can new define container names and sizes in your theme configuration and use them in your styles.
The default container sizes in the
@pandacss/preset-panda
preset are shown below:Then use them in your styles by referencing using
@<container-name>/<container-size>
syntax:This will generate the following CSS:
Container Query Pattern
To make it easier to use container queries, we've added a new
cq
pattern to@pandacss/preset-base
.You can also named container queries:
Config
Add support for explicitly specifying config related files that should trigger a context reload on change.
Set the
dependencies
option inpanda.config.ts
to a glob or list of files.Invoke
config:change
hook in more situations (when the--watch
flag is passed topanda codegen
,panda cssgen
,panda ship
)Watch for more config options paths changes, so that the related artifacts will be regenerated a bit more reliably
(ex: updating the
config.hooks
will now trigger a full regeneration ofstyled-system
)Changed
display: none
for hidden elements inreset
cssdefaultValues
feature.To override the default values, consider using the
extend
pattern.Beta Was this translation helpful? Give feedback.
All reactions