You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this configuration, I can't use spacing tokens:
css({background: 'accent.5',// okpadding: '4',// outputs '4px', not '1rem'})
Problem Statement/Justification
I was wondered why Park UI literally duplicated some of Panda's tokens. I think this is because they didn't have the ability to just extend from the preset-panda. It only extends preset-base, which lacks spacing tokens.
Tailwind allows this kind of extension. It can be harder to migrate.
It make the developer to duplicate "convenient" tokens from the preset-panda.
Proposed Solution or API
To overwrite tokens, provide new ones:
{
theme: {
tokens: {
colors: {
red: {...}}}}}
To remove tokens, provide an empty object:
{theme: {tokens: {colors: {}// no more colors}}}
To extend tokens, use extend:
{theme: {extend: {}// already implemented}}
Alternatives
Duplicate tokens from the preset-panda.
Extend, not overwrite. It creates typings mess (and I think increases the size of the output CSS file due to CSS variables).
The text was updated successfully, but these errors were encountered:
currently the solution is to just use javascript and pick/omit whatever you need, as described here
we thought of maybe making it easier with a syntax similar to the one you proposed but we're mostly waiting to see if there's enough demand before adding more features, maybe you could make it a feature request ? https://panda-css.canny.io/feature-request
Description
I have a simple scenario:
preset-panda
.Here's my configuration:
With this configuration, I can't use
spacing
tokens:Problem Statement/Justification
preset-panda
. It only extendspreset-base
, which lacksspacing
tokens.preset-panda
.Proposed Solution or API
extend
:Alternatives
preset-panda
.The text was updated successfully, but these errors were encountered: