Skip to main content

CSS Spells

Browsing 23 incantations written in css.

CSS Adept
Conjuration
GoF Lineage: Bridge

Bridge

Decouple layout structures from their decorative themes, allowing both to vary independently.

#css #layout #decoupling
Read Full Scroll →
CSS Apprentice
Transmutation
GoF Lineage: Builder

Builder

Construct complex styles step-by-step using utility classes to incrementally assemble a complete spell ward.

#css #utility-classes #composition
Read Full Scroll →
CSS Archmage
Enchantment
GoF Lineage: Command

Command

Encapsulate a request as an object, via CSS variables driven by inputs or state checkboxes.

#css #checkbox-hack #state
Read Full Scroll →
CSS Adept
Abjuration
GoF Lineage: Facade

Facade

Provide a unified, simple class to mask a complex set of underlying nested styles.

#css #architecture #simplification
Read Full Scroll →
CSS Adept
Chronomancy
GoF Lineage: Memento

Memento

Capture and restore an object's internal state using CSS variables and interactive pseudo-classes.

#css #variables #pseudo-classes
Read Full Scroll →
CSS Archmage
Divination
GoF Lineage: Observer

Observer

Respond to state changes automatically, such as using ResizeObserver equivalents like Container Queries.

#css #container-queries #responsiveness
Read Full Scroll →
CSS Apprentice
Illusion
GoF Lineage: Prototype

Prototype

Clone existing style objects utilizing native CSS class chaining or preprocessor extensions to copy base styles.

#css #cloning #inheritance
Read Full Scroll →
CSS Adept
Illusion
GoF Lineage: Proxy

Proxy

Provide a surrogate or placeholder, such as a skeleton screen, until the true content manifests.

#css #skeleton #loading
Read Full Scroll →
CSS Apprentice
Transmutation
GoF Lineage: State

State

Allow an element to alter its behavior when its internal state changes, using pseudo-classes.

#css #states #accessibility
Read Full Scroll →
CSS Adept
Evocation
GoF Lineage: Strategy

Strategy

Define a family of algorithms (layouts) and make them interchangeable via discrete structural classes.

#css #layout #architecture
Read Full Scroll →
CSS Adept
Transmutation
GoF Lineage: Visitor

Visitor

Represent an operation to be performed on the elements of an object structure, using sibling combinators.

#css #combinators #interaction
Read Full Scroll →