✨ 8 Things you might not know #TailwindCSS can do with just a few utility classes ✨

Thread 🧵 👇
1️⃣ Adding a gradient color to text with only 5 classes
2️⃣ Set hover state of child elements when the parent is hovered over - using `group` and `group-hover`
3️⃣ Centering content within a `div` using flex with 3 classes
4️⃣ Even better: Centering content within a `div` using grid with just 2 classes
5️⃣ Add some space (horizontal or vertical) between items within flex container using `space-x-` or `space-y-` utilities
6️⃣ Fit your image into any dimension preserving the aspect ratio and without adding it as a background image - using just one class
7️⃣ Give a different color to your placeholder text
8️⃣ Help the user select all text with one click using select all
Did you know all of these? Which one's your favorite? 😍

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Shruti Balasa

Shruti Balasa Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @shrutibalasa

2 Jan
Here are 10 reasons to start using @tailwindcss for your next project

#Tailwind #TailwindCSS

🧵Thread 👇
1️⃣ No CSS file needed

As the official website says, you can "Rapidly build modern websites without ever leaving your HTML"

It's like writing inline styles for each html element, but using class names - Far more readable and much faster to type. You almost don't need a CSS file.
2️⃣ No need for class names

Every time you need to style an element, you must think of a suitable class name. And then class names for the child elements.

To modify styles, you need to refer to the class name, go to CSS and then make changes. All that is avoided using Tailwind!
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!