2 ms·
> “optimizing for reusable CSS was going to be the right choice” That is what CSS is. In the melee of “CSS in everything but CSS,” people might have forgotten
by Brajeshwar 3y ago
> “optimizing for reusable CSS was going to be the right choice”
That is what CSS is. In the melee of “CSS in everything but CSS,” people might have forgotten what CSS is for. CSS’s classes are what you use everywhere again and again.
CSS Utility classes have been there for a long time and were made easy and famous by the likes of Bourbon[1]. They even have pre-defined styles — Neat[2].
Even though Tailwind can and should have been used more as what it was destined to do — utility classes. In a larger team, it is easier to stick to the TailwindCSS as such and have specialty/custom classes based on its utility for your project.
I was checking it out during its early release and introduced Tailwind to a team in 2018 who were stuck in Bootstrap. I wanted to stop hearing, “This is not part of Bootstrap.” The good thing I realized then was that if I followed a custom class with utility based on Tailwind, the result could continue to be the same with someone doing a “button button-blue button-large text-xl text-white.”
Btw, this too shall pass. I suggest learning CSS from first principles — everything that comes later will be another syntactic sugar. Remember, we started our projects with our grid layout that we stole from A List Apart’s faux-column layout, then came blueprint[3], bootstrap[4], foundation[5], bourbon, and now Tailwind, and every other one in between.
There was even a paid service (or a few, I think) that just churns out custom CSS grid layout code based on your drag-n-drop sliders.
1. https://www.bourbon.io https://www.bourbon.io
2. https://neat.bourbon.io https://neat.bourbon.io
3. https://github.com/joshuaclayton/blueprint-css https://github.com/joshuaclayton/blueprint-css
4. https://getbootstrap.com https://getbootstrap.com
5. https://get.foundation https://get.foundation