DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Concepts

Cerberus FactoryResponsive DesignCSS VariablesThemes & Color ModesColor opacity modifierConditional StylesVirtual ColorCascade LayersUtilities

Compositions

Animation StylesLayer StylesText Styles

Style Props

BackgroundBorderEffectsSpacingText GradientTransitionsz-index

Cascade Layers

CSS cascade layers refer to the order in which CSS rules are applied to an HTML element.

  • source
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page

Cerberus relies on CSS cascade layers to provide a predictable, performant way to override components. The layers are defined to match that of Panda CSS.

Layer Types

Cerberus supports these cascade layer types:

  • @layer reset: Where the preflight or css resets styles are defined.

  • @layer base: Where global styles are placed when defined in globalCss config property.

  • @layer recipes: Where styles for recipes are placed when defined in theme.recipes or theme.slotRecipes

  • @layer tokens: Where styles for design tokens are placed when defined in theme.tokens or theme.semanticTokens

  • @layer utilities: Where styles for utilities are placed when defined in theme.utilities

Layer Order

Cerberus recommends the following order for cascade layers:

@layer reset, base, tokens, recipes, utilities;

This structure allows for smoother experience when combining Cerberus and Panda CSS in the same project.

On this page

  • Layer Types
  • Layer Order
Edit this page on Github