CSS Cascade Layer Planner
Name up to eight layers, add their CSS rules and move them into declaration order. Copy the generated @layer declaration and blocks into your stylesheet.
Runs locally in your browserName up to eight layers, add their CSS rules and move them into declaration order. Copy the generated @layer declaration and blocks into your stylesheet.
Runs locally in your browserThe planner keeps one list of cascade layers. Each entry carries a name and the rules that belong to it, and the export writes a single statement — @layer reset, tokens, base, components, utilities; — followed by one block per layer in that order. The stack on the right is the same list read top to bottom: the first card is declared first, the last card wins when two layers set the same property.
The plan starts with five layers, reset, tokens, base, components and utilities, each with one short demo rule, and the fourth one is selected. There is no run button: the stack, the readout and the Generated code pane follow every keystroke, and Copy CSS puts that text on the clipboard.
Cascade layers are resolved in the order they are declared, so the layer named last in the statement is the one that wins when both set the same property. The stack labels the two ends of that order — First declared · lower priority on the first card, Last declared · higher priority on the last — while the layers in between carry a plain @layer badge.
Move earlier and Move later shift the selected layer one position at a time, and the declaration line at the top of the export is rewritten immediately: the layers you see in the stack are exactly the names in the statement, in that order.
A layer name becomes a CSS identifier: the planner lowercases it, replaces anything outside a-z, 0-9, _ and - with a hyphen, trims hyphens from both ends and prefixes x- when the name starts with a digit. Typing MAIN LAYER therefore exports main-layer, and a field left empty exports layer.
The workbench enforces two limits: one plan holds between one and eight layers, and the name field stops at 36 characters. Removing the last layer or adding a ninth leaves the plan untouched and prints the reason above the shell.
Renaming a layer to a name another layer already uses is allowed, but the export then repeats that name and the browser merges the two blocks into a single layer: the rules of both cards end up in one layer. The workbench prints an inline note as soon as that happens, so the duplicate is visible before it is copied.
The plan never leaves the page: the layer list, the rules and the generated statement are built in the browser, Copy CSS writes them straight to the clipboard, and there is no upload step, account or run button. Reset brings back the five default layers at any time.