Slab uses Tailwind CSS v4. Most styling is done with utility classes directly in Liquid files. This document covers all the ways CSS is applied and when to use each approach.
There are five places css can live:
| Tailwind utility classes | Inline in .liquid files | Layout, spacing, sizing, and anything Tailwind covers natively |
|---|---|---|
src/css/utilities/ | Inline in .liquid files | Theme-aware typography, colors, animations, and other utilities that pull from CSS custom properties |
src/css/components/ | Imported globally via src/entrypoints/styles.css | Cross-cutting styles reused across many files that cannot be a single utility class |
src/css/base/ | Imported globally via src/entrypoints/styles.css | Opinionated resets and defaults for bare HTML elements |
{% stylesheet %} tag | Inside a section, block, or snippet file | Scoped styles tied to a single component where no utility class exists |
Use this as a decision guide — work through it top to bottom:
src/css/utilities/ class cover it? Use that class. These are theme-aware and pull from CSS custom properties, so they automatically adapt to merchant settings. See Utility classes.{% stylesheet %} tag inside that file. See .cursor/rules/css.mdc.src/css/components/.src/css/base/. Do not add component styles here.@utility rule? Add it to src/css/utilities/.Start by connecting your source repository and choosing the pages you want to publish.
You can then browse your documentation and ask questions about the content your team has shared.