visit
Tailwind CSS stands out as the fastest-growing CSS library to date. It has swiftly become an essential tool for front-end developers. Many developers on the front end are utilizing it in large-scale projects, encountering minimal issues. Its enhancements to website and web-app development and design are undeniably remarkable.
So, what’s the problem? Why does the title say '“Tailwindcss? No Thanks”?
Before we can get into Tailwindcss and its development intricacies we must satisfy a few prerequisites.
CSS stands for Cascading Style Sheets. The best definition for CSS in my opinion comes from techterms.com
“CSS is a style sheet language used for formatting content in HTML webpages. CSS style sheets can define the appearance and formatting of text, tables, and other elements separately from the content itself. Styles may be found within a web page’s HTML file or in a separate document referenced by multiple webpages”.
In not so many words: CSS is s styling language. You use CSS on HTML elements to make your webpage or web app look excellent.
From the words of the themselves, Tailwindcss is “A utility-first CSS framework packed with classes like flex
, pt-4
, text-center
and rotate-90
that can be composed to build any design, directly in your markup”.
What does Tailwindcss look like? Let’s compare by making a vanilla CSS equivalent and then a Tailwindcss equivalent.
Let’s break down what’s going on in the above text. It is an HTML 5 excerpt and we are constructing a button.
To construct the button we set it up through “divs” - essentially small containers to input things for changing our website or web app. We give each div its own “class” so we are able to reference that particular element later on in our separate CSS file. Although, you can also give divs their own “ids”. You can do “in-line” CSS changes, which means you can put CSS directly into the HTML file but most tend to avoid that for the sake of organization.
In the above code, we are interacting with the button class in the HTML excerpt. The way you make your CSS file aware of your HTML classes is with a dot at the beginning of the class name itself. Below that, in order, we align the button to the center of the div with “align-items”. Below align-item is the “background clip” which defines how far the “background-color” will stretch to and not stretch over. The “border” is the thickness of the sides of the button and the border radius is how curved the edges are. All we’ve just mentioned contributes to developing the button style. As we can see, the original CSS styles seem simple enough. How would Tailwindcss handle the same case?
Wait, what? Did we just put CSS-looking code into an HTML file? yes, we did. What you are looking at is the equivalent of the previous code examples in Tailwindcss. This is actually one of the more unique attributes of Tailwindcss. When using Tailwindcss you do not put your separate CSS code into a different file. All your Tailwindcss code goes directly into your HTML file. As we stated before, developers traditionally avoid in-line CSS coding. With Tailwindcss in-line coding is no longer really an option, it is almost necessary. The Tailwindcss is fully implemented through class identification.
In the above image, we are in an HTML5 document importing a picture of chocolate under the class “card-img”. Let us see what the corresponding CSS looks like.
stated that Tailwindcss had gained 4.5 million weekly downloads as of November 19, 2022. As I am writing this, if you go onto and search for Tailwindcss it has 336 million downloads. Since its release 5 years ago that’s an average of 184,110 downloads per day. An incredulous amount of downloads.
Earlier, at the beginning of this piece, I wrote, “There may be a time or times when Tailwindcss is not the optimal solution for your projects”. Why did I write this? and how does it correlate with the title? “Tailwindcss? I’ll Pass ”.
Tailwindcss is popular globally amongst almost all frontend developers, it looks easier to implement than traditional CSS and it offers more customisability than other technologies of its type. Heck, my use of it even inspired this article itself. So why do I still doubt it? Because I used it of course.
Tailwindcss is every bit as good as everyone claims it to be and more. Similarly, it is every bit of bad as people claim it to be as well. The nature of Tailwindcss makes it convoluted to work with on short to midterm projects, the learning curve completely hampers your development, the insistence on making custom components, etc. These all make Tailwindcss unbearable, IN THE SHORT TERM. Only in the short term!
You can find out if you subscribe to me and we’ll be seeing each other very soon ;)