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
Panda uses CSS Cascade Layers and we put all layers like
@layer reset, base, tokens, recipes, utilities;
That totally makes sense, but I want to customize layers (@foundation, @component) exposing to an application as the following not to expose internal layers (reset, base, tokens, recipes, utilities) PandaCSS utilizes.
/* design-system.css *//* This layer has styles for the global scope */@layer design-system-foundation {
@layer reset, base;
}
@layer design-system-component {
@layer tokens, recipes, utilities;
}
And then, the application can use those layers like
The application doesn't have to know the internal layer structure and it brings us an abstraction that is useful to organize CSS architecture for the application.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, team👋 Thanks for all your great work!!!👏
Panda uses CSS Cascade Layers and we put all layers like
That totally makes sense, but I want to customize layers (
@foundation
,@component
) exposing to an application as the following not to expose internal layers (reset
,base
,tokens
,recipes
,utilities
) PandaCSS utilizes.And then, the application can use those layers like
The application doesn't have to know the internal layer structure and it brings us an abstraction that is useful to organize CSS architecture for the application.
ref. https://css-tricks.com/css-cascade-layers/#aa-managing-a-complex-css-architecture
This also enables us to have separate CSS files for specific layers.
Unfortunately, this doesn't work because Panda checks if
@layer
has all layershttps://github.com/chakra-ui/panda/blob/main/packages/core/src/context.ts#L358-L361
So I'd like to suggest to be able to define each CSS Cascade Layers like
Does this make sense?
Beta Was this translation helpful? Give feedback.
All reactions