# Style Migration Summary: WordPress/Salient to Tailwind CSS ## Overview This document summarizes the complete migration from WordPress/Salient legacy styles to a modern Tailwind CSS architecture for the KLZ Cables Next.js application. ## What Was Removed ### 1. Legacy CSS Files - **`styles/design-tokens.scss`** - 370 lines of CSS custom properties - **`styles/base.scss`** - 713 lines of base styles and utility classes - **Total: 1,083 lines** of redundant CSS removed ### 2. WordPress/Salient Legacy Classes The following WordPress/Salient classes were removed from components: - `vc_row`, `vc_row-fluid`, `vc_column` (layout structure) - `wpb_wrapper`, `wpb_text_column` (content wrappers) - `wpb_content_element`, `wpb_single_image` (component wrappers) - `btn`, `btn-primary`, `btn-secondary` (legacy button classes) - `container`, `container-fluid` (legacy containers) - `text-left`, `text-center`, `text-right` (alignment) - `accent-color`, `primary-color`, `secondary-color` (colors) - `bg-light`, `bg-dark`, `bg-primary` (backgrounds) ### 3. Inline Styles Removed inline styles from components: - **Loading.tsx**: `style={{ width: widthStyle, height: heightStyle }}` - **FormTextarea.tsx**: `style={autoResize ? { minHeight: `${minHeight}px`, overflow: 'hidden' } : {}}` - **FormSelect.tsx**: `style={{ backgroundImage: `url(...)` }}` ### 4. Redundant CSS Classes - All utility classes from `base.scss` (margins, padding, typography, etc.) - All component-specific classes from `design-tokens.scss` - All WordPress compatibility classes ## What Was Kept ### 1. Essential Global Styles (`app/globals.scss`) ```scss // Only 84 lines remain (down from 1,083) @tailwind base; @tailwind components; @tailwind utilities; /* Custom Scrollbar */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: #e9ecef; } ::-webkit-scrollbar-thumb { background: #0056b3; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #003d82; } /* Focus Styles for Accessibility */ *:focus-visible { outline: 2px solid #0056b3; outline-offset: 2px; } /* Smooth scrolling */ html { scroll-behavior: smooth; } /* Reduced motion support */ @media (prefers-reduced-motion: reduce) { /* ... */ } /* Print styles */ @media print { /* ... */ } ``` ### 2. Tailwind Configuration (`tailwind.config.js`) - **Custom breakpoints** for responsive design - **Brand colors** (primary, secondary, accent, neutral) - **Typography scale** with fluid typography using CSS clamp - **Spacing system** with consistent scale - **Border radius** and **shadows** - **Container** configuration with responsive padding - **Custom utilities** for touch targets, responsive visibility, fluid spacing ### 3. WordPress Compatibility Layer The `ContentRenderer` component still includes: - **Shortcode processing** for legacy content - **Class conversion** from WordPress to Tailwind - **Asset replacement** for images - **Safe HTML parsing** with allowed tags ## New Architecture ### 1. Design System All design tokens are now in `tailwind.config.js`: ```javascript colors: { primary: { DEFAULT: '#0056b3', dark: '#003d82', light: '#e6f0ff' }, // ... other colors }, fontSize: { 'xs': ['clamp(0.7rem, 0.65rem + 0.2vw, 0.75rem)', { lineHeight: '1.5' }], // ... fluid typography }, spacing: { 'xs': '0.25rem', 'sm': '0.5rem', 'md': '1rem', // ... consistent scale }, ``` ### 2. Component Architecture All components now use Tailwind classes exclusively: **Before (WordPress/Salient):** ```html
Content