![cover-img](https://project-assets.showwcase.com/1420x/7465/1639411103517-FpKROxxtLBRmSsCCb4lxCS7LBVr2-sz037s0.jpg?type=webp)
10 Reasons To Choose Tailwind CSS
13 December, 2021
15
15
3
Contributors
What is Tailwind CSS exactly?
1. Tailwind is a Time-Saver
•
p-4 means padding: 1rem (number suffixes in Tailwind are often multiples of 0.25 rem )
•
m-4 means margin: 1rem
•
text-lg means font-size: 1.125rem; line-height: 1.75rem
•
Putting it all together, this HTML with Tailwind CSS enabled
2. Utility Classes Follow the Single Responsibility Principle
•
w-4 means width: 1rem;
•
bg-transparent means background-color: transparent; Few of the utility classes also encapsulate more than 1-3 CSS declarations at a time.
3. Documentation is Top-Notch
4. A Large and Growing Community
5. No More Media Queries!
•
sm: 640px
•
md: 768px
•
lg: 1024px
•
xl: 1280px
•
2xl: 1536px
6. It's Trivial to Create Component Styles
7. Purging Unused Classes Minimizes Bundle Size
8. Style Opinions are Productive
9. Avoiding the Need for Naming Conventions
10. It Feels Like Writing CSS
Still, It's Not Perfect
css
programming
tailwindcss
webdev
tailwind