Overview
The FreshJuice theme uses Tailwind CSS v4 with custom configuration and utilities. The CSS architecture is organized into layers: base styles, components, and utilities, with additional custom theme tokens and design system values.CSS Architecture
File Structure
Tailwind Configuration
Location:source/css/tailwind.css
The main Tailwind configuration file defines custom theme tokens, content sources, and imports all style layers.
Theme Tokens
Custom Colors
Custom Fonts
Custom Aspect Ratios
Custom Spacing
Content Sources
Tailwind scans these paths for class usage:Custom Animations
Location:source/css/base/animations.css
fadeIn Animation
A simple opacity fade-in animation:Typography Utilities
Location:source/css/base/typography.css
Balanced Headings in Articles
Article headings automatically use text balancing for better readability:text-balance utility prevents awkward line breaks in headings by balancing text across multiple lines.
Custom Utilities
Location:source/css/utilities/utils.css
Available Utilities (Commented Examples)
The theme includes commented utility examples that can be enabled as needed:Icon Utilities
Container Utilities
Common Patterns
Responsive Video Embeds
Combine aspect ratio utilities with responsive classes:Hero Section with Custom Spacing
Create a hero section that accounts for fixed navigation:Animated Content Loading
Use fadeIn animation for progressive content reveal:Image Galleries with Aspect Ratios
Create consistent image galleries:Article Layout
Complete article layout with balanced typography:Extending the Theme
Adding Custom Colors
Add new color tokens totailwind.css:
Adding Custom Animations
Add new keyframe animations tobase/animations.css:
Creating Custom Utilities
Add new utility classes toutilities/utils.css: