# Framework-specific Fix Guide This document explains specific fix techniques for each framework and styling method. --- ## Pure CSS / SCSS ### Fixing Layout Overflow ```css /* Before: Overflow occurs */ .container { width: 100%; } /* After: Control overflow */ .container { width: 100%; max-width: 100%; overflow-x: hidden; } ``` ### Text Clipping Prevention ```css /* Single line truncation */ .text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Multi-line truncation */ .text-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } /* Word wrapping */ .text-wrap { word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; } ``` ### Spacing Unification ```css /* Unify spacing with CSS custom properties */ :root { --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; } .card { padding: var(--spacing-md); margin-bottom: var(--spacing-lg); } ``` ### Improving Contrast ```css /* Before: Insufficient contrast */ .text { color: #999999; background-color: #ffffff; } /* After: Meets WCAG AA standards */ .text { color: #595959; /* Contrast ratio 7:1 */ background-color: #ffffff; } ``` --- ## Tailwind CSS ### Layout Fixes ```jsx {/* Before: Overflow */}
Long text...
{/* Multi-line truncation */}Long text...
{/* Allow wrapping */}Long text...
``` ### Responsive Support ```jsx {/* Mobile-first responsive */}{/* Changed from text-gray-500 */} Readable text
``` --- ## React + CSS Modules ### Fixes in Module Scope ```css /* Component.module.css */ /* Before */ .container { display: flex; } /* After: Add overflow control */ .container { display: flex; flex-wrap: wrap; overflow: hidden; max-width: 100%; } ``` ### Component-side Fixes ```jsx // Component.jsx import styles from './Component.module.css'; // BeforeContent