Styling Stack
The project’s styling is built on:- Tailwind CSS 4.0: Utility-first CSS framework
- Custom CSS Variables: Design system tokens
- Component Styles: Pre-built UI components (McQueen theme)
- Vite Integration: Fast compilation and HMR
CSS Architecture
All styles are defined in a single file:resources/css/app.css:1-1800) includes:
- Tailwind CSS imports and configuration
- CSS custom properties (design tokens)
- Component-specific styles
- Responsive utilities
Tailwind Configuration
The CSS file integrates Tailwind CSS 4.0 with@import and @source directives:
Content Sources
Tailwind scans these locations for class names (resources/css/app.css:3-6):
- Laravel pagination views
- Compiled Blade templates
- All Blade templates in
resources/ - All JavaScript files in
resources/
Theme Configuration
Custom font family defined inresources/css/app.css:8-10:
Tailwind CSS 4.0 uses the new
@theme directive for configuration instead of a separate tailwind.config.js file.Design System
CSS Variables
The project defines a comprehensive design token system inresources/css/app.css:16-47:
Color Palette
| Token | Value | Usage |
|---|---|---|
--color-primary | #DC2626 (Red 600) | Primary brand color, CTAs |
--color-primary-dark | #B91C1C (Red 700) | Hover states |
--color-success | #22C55E (Green 500) | Success messages, stock indicators |
--color-danger | #EF4444 (Red 500) | Error states, out of stock |
Component Styles
The CSS includes pre-built component styles following the “McQueen” design theme:Major Components
Header & Navigation
Defined in Includes:
resources/css/app.css:90-167:- Sticky header with shadow
- Logo styling
- Navigation links
- Cart badge with item count
- User icon
Product Cards
Defined in Features:
resources/css/app.css:233-334:- Product image placeholder
- Category badge
- Product name and price
- Stock indicator
- Add to cart button
Authentication Forms
Defined in Includes:
resources/css/app.css:339-510:- Login and register forms
- Input fields with icons
- Focus states with primary color
- Responsive form layouts
Order Management
Defined in
resources/css/app.css:604-960:- Order list cards
- Order detail pages
- Status timeline with icons
- Order items breakdown
- Summary cards with shipping info
Shopping Cart
Defined in Features:
resources/css/app.css:964-1096:- Two-column layout
- Quantity controls
- Item removal
- Sticky summary sidebar
Base Styles
Global resets and base styles (resources/css/app.css:50-85):
Responsive Design
Mobile-first responsive breakpoints:- General:
resources/css/app.css:515-540 - Orders/Cart:
resources/css/app.css:1101-1144 - Landing:
resources/css/app.css:1737-1799
Asset Pipeline
Development
Vite compiles CSS with HMR:- Instant CSS updates without page reload
- Source maps for debugging
- Tailwind JIT compilation
- CSS variable support
Production
Optimized build process:- Unused Tailwind classes purged
- CSS minification
- Vendor prefixes added automatically
- File hashing for cache busting
Using Styles in Blade
Include the compiled CSS in your Blade templates:Customizing Styles
Adding New Colors
Define new CSS variables in:root:
Creating Components
Follow the existing pattern:Extending Tailwind
Add utility classes in the@theme block:
Tailwind CSS 4.0 uses CSS variables directly in the
@theme block instead of a JavaScript configuration file.Best Practices
Maintain Consistency
Follow existing naming conventions:
- BEM-like structure:
.product-card,.product-info,.product-name - Descriptive state classes:
.available,.completed,.pending - Utility classes:
.btn-primary,.btn-secondary
Next Steps
Frontend Development
Learn about Vite configuration and JavaScript setup
Deployment
Build optimized assets for production