Skip to content

CSS

Style components with Tailwind CSS v4 utility classes in Liquid templates, compiled by @tailwindcss/vite. For custom styles, add them to the appropriate CSS layer file.

Entry point

Everything starts from a single file that imports Tailwind, design tokens, and three layer files:

css
@import 'tailwindcss' source('../..');
@import '@/styles/theme.css';
@import '@/styles/base.css' layer(base);
@import '@/styles/components.css' layer(components);
@import '@/styles/utilities.css' layer(utilities);

@plugin '@tailwindcss/typography';
@plugin '@tailwindcss/forms';

The source('../..') directive tells Tailwind to scan from the project root so it picks up class names in Liquid templates under theme/.

Layer system

CSS is organized into three layers with increasing specificity:

LayerFilePurpose
basebase.cssRoot variables, resets, focus styles, reduced-motion
componentscomponents.cssReusable classes (.button, .article, .swimlane, .icon)
utilitiesutilities.cssOne-off helpers (.absolute-center, .strike, .hidden-scroll)

Utility classes always beat component classes, which always beat base styles — matching Tailwind's specificity model.

The @theme tokens in theme.css are imported without a layer because they configure Tailwind itself rather than producing output rules.

Tailwind plugins

Next steps