From 92015b62c377dad0b3a0715fa3ee34fa899c7f8e Mon Sep 17 00:00:00 2001 From: Niyati Raiyani Date: Sun, 31 Aug 2025 15:03:14 +0530 Subject: [PATCH] fix(curriculum): add Tailwind CSS section to FE Libs chapter review (#61946) --- .../6724e2dbf723fe1c8883cc69.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/curriculum/challenges/english/blocks/review-front-end-libraries/6724e2dbf723fe1c8883cc69.md b/curriculum/challenges/english/blocks/review-front-end-libraries/6724e2dbf723fe1c8883cc69.md index cfebc5a6fb8..29f30ab4788 100644 --- a/curriculum/challenges/english/blocks/review-front-end-libraries/6724e2dbf723fe1c8883cc69.md +++ b/curriculum/challenges/english/blocks/review-front-end-libraries/6724e2dbf723fe1c8883cc69.md @@ -1147,6 +1147,99 @@ Here is an example of using Bootstrap to create a list group. Instead of applyin ``` +## Tailwind CSS + +Tailwind is a utility-first CSS framework. Instead of writing custom CSS rules, you build your designs by combining small utility classes directly in your HTML. + +### Responsive Design Utilities + +Tailwind uses prefixes such as `sm:`, `md:`, and `lg:` to apply styles at different screen sizes. + +```html +
+ Responsive layout +
+``` + +### Flexbox Utilities + +Classes like `flex`, `flex-col`, `justify-around`, and `items-center` make it easy to create flexible layouts. + +```html +
+

Column on small screens

+

Row on medium and larger screens

+
+``` + +### Grid Utilities + +Tailwind includes utilities for CSS Grid, like `grid`, `grid-cols-1`, and `md:grid-cols-3`. + +```html +
+
Column 1
+
Column 2
+
Column 3
+
+``` + +### Spacing Utilities + +Utilities like `mt-8`, `mx-auto`, `p-4`, and `gap-4` help create consistent spacing without writing CSS. + +```html +
+ Spaced content +
+``` + +### Typography Utilities + +Utilities like `uppercase`, `font-bold`, `font-semibold`, and `text-4xl` control text appearance. + +You can set font sizes that adjust at breakpoints, such as `text-3xl` and `md:text-5xl`. + +```html +

+ Responsive Heading +

+``` + +### Colors and Hover States + +Tailwind provides a wide color palette, such as `text-red-700`, `bg-indigo-600`, and `bg-gray-100`. + +Classes like `hover:bg-pink-600` make interactive effects simple. + +```html + + Hover Me + +``` + +### Borders, Rings, and Effects + +- **Borders**: `border-2 border-red-300` adds borders with specified thickness and colors. +- **Rings**: `ring-1 ring-gray-300` creates outline-like effects often used for focus or cards. +- **Rounded corners and scaling**: Classes like `rounded-md`, `rounded-xl`, and `scale-105` add polish. + +```html +
+ Highlighted card +
+``` + +### Gradients + +Tailwind supports gradient utilities like `bg-gradient-to-r from-fuchsia-500 to-indigo-600`. + +```html +
+ Gradient background +
+``` + ## CSS Preprocessors - **CSS preprocessor**: A CSS preprocessor is a tool that extends standard CSS. It compiles the code with extended syntax into a native CSS file. It can be helpful for writing cleaner, reusable, less repetitive, and scalable CSS for complex projects.