Julia Evans
Follow
Moving away from Tailwind, and learning to structure my CSS
The author reflects on their journey with CSS, initially embracing Tailwind for its structure, but now transitioning to vanilla CSS. This change was prompted by a desire to understand CSS more deeply and improve their skills. The author details the new CSS structure, including an imported reset, component-based styling, predefined color variables, and a font size system adapted from Tailwind. They also utilize utility classes, establish a base for global styles, and manage spacing consciously. Responsive design relies more on CSS grid layouts, departing from Tailwind's media query-focused approach. The build system employs esbuild for production bundling, although not essential during development. The author outlines key reasons for the migration, citing the reliance on a build system, improved CSS knowledge, the limitations of Tailwind, and a desire for more semantic HTML. They conclude by discussing features like @layer, and acknowledging the benefits of Tailwind while still finding value in its principles.