Tailwind CSS is a utility first CSS library, which means it helps developers style their websites and web applications without creating a class name, writing their own CSS or creating CSS files, they also can use this in any technology
It was created to be highly customizable and more useable than any other CSS framework like Bootstrap. Its class names are compact and easy to understand and write or read and also helps to other developers to understand. We can also create our own classes in this using multiple classes of Tailwind or write our custom classes or CSS in Tailwind. It will compile at run time, so its property is also capable of rewriting any other CSS.
1. Better than custom CSS
2. Better to inline CSS
The major discussion people have with this approach is, "Isn’t this just inline styles?" In a way, you were applying styles directly to elements and not bothering to give them a class to which you then apply styles.
<button className="relative text-white bg-blue-500 hover:bg-blue-700
focus:outline-none focus:ring-2 focus:ring-blue-400 px-4 py-2 rounded">
<span className="before:content-['💡'] after:content-['✏️'] before:pr-1 after:pl-1">
Hover & Focus Button
</span>
<div className="mt-2 text-sm text-gray-700">
* applies to all child elements
</div>
</button>
Ready to transform your business with our technology solutions? Contact Us today to Leverage Our Tailwind Expertise.
0