tailwind-turbopack
Tailwind CSS + Turbopack
Avoid Inline Styles
Never use inline style={} props. Always use Tailwind classes or CSS in stylesheets.
For dynamic values that can't be expressed as Tailwind classes, define CSS classes with data attributes in a stylesheet:
/* In stylesheet */
.collapsible[data-expanded="false"] {
grid-template-rows: 0fr;
}
.collapsible[data-expanded="true"] {
grid-template-rows: 1fr;
}
/* In component */
<div className="collapsible" data-expanded={isExpanded}>
Known Issue
Turbopack may fail to generate CSS for some Tailwind utility classes (especially arbitrary values in responsive variants like max-md:grid-rows-[0fr]). Classes appear in HTML but the CSS rules are missing from the bundle.
Workaround: Use Webpack for development or define complex styles in CSS files:
pnpm dev:webpack
More from saleor/storefront
saleor-paper-storefront
>
10react-patterns
Write idiomatic React with proper hooks and render purity. Use when writing components, fixing hook-related lint errors, or deciding where to put logic (render vs effect vs handler).
4ui-components
Create and style UI components with design tokens. Use when creating components, styling with Tailwind, deciding between Server/Client Components, or using shadcn/ui primitives.
4caching-strategy
Understand the caching architecture, Cache Components (PPR), and revalidation mechanisms. Use when debugging stale content, modifying caching behavior, or understanding data freshness guarantees.
4pdp
Product Detail Page architecture, image gallery/carousel, caching, and add-to-cart flow. Use when modifying PDP layout, debugging gallery swipe/thumbnails, understanding LCP optimization, fixing ErrorBoundary issues, or working with variant-specific images.
3filtering-system
Product list filtering and sorting architecture. Use when modifying filters, adding new filter types, working on category/collection pages, or understanding server-side vs client-side filtering.
3