Why I Use Pure CSS in Lots of My Projects (and Why You Might Want to as Well)
In an era dominated by front-end frameworks, using pure CSS can seem like an old-school choice. For me, though, it's been a strategic decision rooted in experience and a deep understanding of how CSS works.
Why Pure CSS?
1. Built From Experience
I started my long web development journey (and still there) with nothing but basic HTML, JS and CSS. Over time, I’ve had the opportunity to work on several projects where I saw how well CSS can be implemented. Through practice and learning from great engineers, I developed a strong foundation. This firsthand experience has helped me gain the confidence to style complex designs without relying on extra tools or frameworks.
2. CSS Has Evolved (Goodbye, SCSS!)
Once upon a time, preprocessors like SCSS were essential because CSS was missing crucial features like variables and nesting. But now that CSS has caught up, these features are baked into the language. For example, CSS’s @custom-mediaand :has() selectors simplify the work that preprocessors once did, making CSS more flexible and reducing the need for extra dependencies.
Why Pure CSS?
1. Built From Experience
I started my web development journey with nothing but CSS. Over time, I’ve had the opportunity to work on several projects where I saw how well CSS can be implemented. Through practice and learning from great engineers, I developed a strong foundation. This firsthand experience has helped me gain the confidence to style complex designs without relying on extra tools or frameworks.
2. CSS Has Evolved (Goodbye, SCSS!)
Once upon a time, preprocessors like SCSS were essential because CSS was missing crucial features like variables and nesting. But now that CSS has caught up, these features are baked into the language. For example, CSS’s @custom-mediaand :has() selectors simplify the work that preprocessors once did, making CSS more flexible and reducing the need for extra dependencies.
3. The Framework Conundrum: First Bootstrap, Now Tailwind... What's Next?
Frameworks like Bootstrap and Tailwind have become popular because they offer pre-built classes and structures, allowing developers to move fast. But these frameworks also change frequently. If you know pure CSS well, you won’t need to jump from one framework to another. CSS remains the core of all these tools. By sticking with it, I save myself from needing to relearn new frameworks every few years.
领英推荐
4. Speed and Efficiency
When working with pure CSS, I don’t need to constantly reference documentation or hunt for the right class. Instead, I can live-style in the browser’s DevTools, tweak things as I go, and paste the final CSS back into my project. It’s efficient, and it allows me to maintain full control over the styling without external interference.
Should You Use Pure CSS?
It depends on your skill level and project needs.
Trends
Frameworks like Tailwind have been praised for their utility-based approach, but they aren't without limitations. Yes, Tailwind in some basic cases can speed up styling, but at the same time it requires understanding a wide array of class names, which might slow you down if you need something very custom.
Additionally, Google's web.dev CSS guide emphasises, that understanding core CSS concepts allows developers to write more maintainable, scalable code, while frameworks are often used without understanding the underlying principles.
Conclusion
Pure CSS might not be now as "trendy" as frameworks like Tailwind or Bootstrap, but for developers with strong CSS knowledge, it offers flexibility and control that frameworks can’t match. As someone who’s been working with CSS for years, I’ve found that sticking with the basics has allowed me to create scalable, efficient systems without the need for constant retraining on new tools.
So, should you use pure CSS or jump on the framework bandwagon? It depends on your experience, your project’s demands, and how much control you want over your design.
#PureCSS #WebDevelopment #FrontendDevelopment #CSS #TailwindCSS #Bootstrap #WebDesign #Coding #SoftwareDevelopment #ResponsiveDesign #UIUX #DeveloperExperience #FrontendFrameworks #CSSBestPractices #WebDevCommunity
founder | najjednoduch?ie rie?enie dochádzky pre firmy | Fresh QR
5 个月I thought tailwind is a simplified way to write pure css ?? Personally i like frameworks like bootstrap bcs I am not capable of designing my own and nice components. Why would I learn CSS if I cannot leverage it?