Styling Approach
Horse Trust uses Tailwind CSS 4 as the primary styling solution, combined with a custom equestrian-themed design system. All styles are utility-first with custom CSS variables for brand consistency.Tailwind CSS Configuration
Installation
package.json
Global Styles
Location:app/globals.css
app/globals.css
Custom Color Palette
Brand Colors
The Horse Trust design system uses an equestrian-inspired color palette:| Color Name | CSS Variable | Hex Value | Usage |
|---|---|---|---|
| Equestrian Green | --color-equestrian-green | #14532d | Primary actions, success states |
| Equestrian Navy | --color-equestrian-navy | #0f172a | Headers, dark backgrounds |
| Equestrian Gold | --color-equestrian-gold | #C5A059 | Accents, luxury details, CTAs |
| Equestrian Sand | --color-equestrian-sand | #fdfbf7 | Light backgrounds, cards |
Using Custom Colors
Tailwind automatically generates utility classes from CSS variables:Typography System
Font Families
Two Google Fonts are loaded for typography hierarchy: 1. Public Sans (Sans-serif) - Body text and UI elements 2. Playfair Display (Serif) - Headings and luxury accentsFont Configuration
Typography Classes
Typography Examples
Heading Example
Body Text Example
Small Caps Label
Theme Configuration
Root CSS Variables
Dark Mode Support
Tailwind’s dark mode is configured for automatic theme switching:Custom CSS Classes
Hero Gradient
Luxury Card Hover
Scrollbar Styling
Custom scrollbar for both light and dark themes:app/globals.css
Component Styling Patterns
Button Styles
Card Styles
Input Styles
Badge Styles
Responsive Design
Breakpoints
Tailwind’s default breakpoints:| Breakpoint | Min Width | Prefix |
|---|---|---|
| Small | 640px | sm: |
| Medium | 768px | md: |
| Large | 1024px | lg: |
| X-Large | 1280px | xl: |
| 2X-Large | 1536px | 2xl: |
Responsive Examples
Layout Utilities
Container
Flexbox
Grid
Animation & Transitions
Transition Classes
Backdrop Effects
Best Practices
1. Use Semantic Color Names
2. Leverage Tailwind’s Utility Classes
3. Use Responsive Prefixes
4. Group Hover Effects
5. Consistent Spacing
Use Tailwind’s spacing scale (4px increments):Design Tokens Reference
Spacing Scale
p-2→ 8pxp-4→ 16pxp-6→ 24pxp-8→ 32pxp-12→ 48px
Border Radius
rounded→ 4pxrounded-lg→ 8pxrounded-xl→ 12pxrounded-2xl→ 16pxrounded-full→ 9999px
Shadow Scale
shadow-sm→ Subtle shadowshadow→ Standard shadowshadow-md→ Medium shadowshadow-lg→ Large shadowshadow-xl→ Extra large shadowshadow-2xl→ Dramatic shadow

