Tailwind Mastery

Elevate your CSS skills and ace your frontend interviews with the most comprehensive Tailwind CSS question bank ever.

0 / 200 Questions Mastered
JIT Ready
Mobile First

Showing 200 Resources

Click to expand and reveal code examples
#1
What is Tailwind CSS?
Beginner

Tailwind CSS is a utility-first CSS framework for rapidly building custom user interfaces. Unlike Bootstrap, it doesn't provide pre-built components (...

Detailed Insights

Tailwind CSS is a utility-first CSS framework for rapidly building custom user interfaces. Unlike Bootstrap, it doesn't provide pre-built components (like buttons or navbars). Instead, it provides low-level utility classes that let you build completely custom designs without leaving your HTML.

Module: core
#2
What does 'Utility-First' mean?
Beginner

A utility-first approach means styling elements by applying small, single-purpose classes (utilities) directly in the HTML. For example, instead of a ...

Detailed Insights

A utility-first approach means styling elements by applying small, single-purpose classes (utilities) directly in the HTML. For example, instead of a '.btn' class, you might use 'bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded'.

Module: core
#3
What are the advantages of using Tailwind CSS?
Beginner

Advantages include: No more inventing class names, CSS files stop growing, making changes is safer, faster development cycles, and deep customization ...

Detailed Insights

Advantages include: No more inventing class names, CSS files stop growing, making changes is safer, faster development cycles, and deep customization through the config file.

Module: core
#4
How do you install Tailwind CSS?
Beginner

Tailwind can be installed via npm (recommended) using 'npm install -D tailwindcss postcss autoprefixer' followed by 'npx tailwindcss init' to create t...

Detailed Insights

Tailwind can be installed via npm (recommended) using 'npm install -D tailwindcss postcss autoprefixer' followed by 'npx tailwindcss init' to create the config file.

Module: core
#5
What is the tailwind.config.js file?
Beginner

This is the configuration file where you define your design tokens (colors, fonts, spacing), plugins, and 'content' paths (where Tailwind looks for cl...

Detailed Insights

This is the configuration file where you define your design tokens (colors, fonts, spacing), plugins, and 'content' paths (where Tailwind looks for class names to generate CSS).

Module: core
#6
Explain the 'content' option in tailwind.config.js.
Beginner

The 'content' option (formerly 'purge') tells Tailwind which files to scan for class names. This ensures that only the CSS you actually use is generat...

Detailed Insights

The 'content' option (formerly 'purge') tells Tailwind which files to scan for class names. This ensures that only the CSS you actually use is generated in the final production bundle.

Module: core
#7
What are Directive in Tailwind CSS?
Experience

Directives are custom Tailwind-specific '@' rules used in your CSS files. Main ones are @tailwind (injects styles), @apply (applies utilities to CSS),...

Detailed Insights

Directives are custom Tailwind-specific '@' rules used in your CSS files. Main ones are @tailwind (injects styles), @apply (applies utilities to CSS), and @layer (organizes custom styles).

Module: core
#8
What is the @apply directive?
Experience

@apply allows you to inline existing utility classes into your own custom CSS. This is useful for cleaning up HTML when you have highly repetitive com...

Detailed Insights

@apply allows you to inline existing utility classes into your own custom CSS. This is useful for cleaning up HTML when you have highly repetitive component patterns.

Module: core
#9
How to use hover and focus states in Tailwind?
Beginner

Tailwind uses modifiers for states. Prefix any utility with the state name and a colon. Example: 'hover:bg-red-500', 'focus:outline-none', 'active:sca...

Detailed Insights

Tailwind uses modifiers for states. Prefix any utility with the state name and a colon. Example: 'hover:bg-red-500', 'focus:outline-none', 'active:scale-95'.

Module: core
#10
What are responsive modifiers?
Beginner

Responsive modifiers (sm:, md:, lg:, xl:, 2xl:) allow you to apply styles at specific breakpoints. Tailwind is mobile-first, so 'w-full md:w-1/2' mean...

Detailed Insights

Responsive modifiers (sm:, md:, lg:, xl:, 2xl:) allow you to apply styles at specific breakpoints. Tailwind is mobile-first, so 'w-full md:w-1/2' means full width on mobile and half on medium screens and up.

Module: core
#11
How to handle Dark Mode in Tailwind?
Experience

Tailwind includes a 'dark:' modifier. You can enable it in tailwind.config.js using either 'media' (follows system prefs) or 'class' (toggled by a cla...

Detailed Insights

Tailwind includes a 'dark:' modifier. You can enable it in tailwind.config.js using either 'media' (follows system prefs) or 'class' (toggled by a class on the html element).

Module: core
#12
Difference between Tailwind and Bootstrap?
Beginner

Bootstrap is component-based (ready-made UI). Tailwind is utility-based (building blocks). Tailwind offers more design freedom, while Bootstrap offers...

Detailed Insights

Bootstrap is component-based (ready-made UI). Tailwind is utility-based (building blocks). Tailwind offers more design freedom, while Bootstrap offers faster initial prototyping for generic designs.

Module: core
#13
What is PostCSS?
Experience

PostCSS is a tool for transforming CSS with JavaScript. Tailwind CSS is a PostCSS plugin. It handles things like nesting, autoprefixing, and utility g...

Detailed Insights

PostCSS is a tool for transforming CSS with JavaScript. Tailwind CSS is a PostCSS plugin. It handles things like nesting, autoprefixing, and utility generation.

Module: core
#14
How to use arbitrary values in Tailwind?
Beginner

Use square brackets to apply values not in your theme. Example: 'top-[117px]', 'bg-[#1da1f2]', 'w-[calc(100%-1rem)]'.

Detailed Insights

Use square brackets to apply values not in your theme. Example: 'top-[117px]', 'bg-[#1da1f2]', 'w-[calc(100%-1rem)]'.

Module: core
#15
What is the @layer directive?
Experience

@layer tells Tailwind which 'bucket' a set of custom styles belongs to: 'base' (resets), 'components' (classes like .btn), or 'utilities' (single-purp...

Detailed Insights

@layer tells Tailwind which 'bucket' a set of custom styles belongs to: 'base' (resets), 'components' (classes like .btn), or 'utilities' (single-purpose classes).

Module: core
#16
How to add custom colors?
Beginner

In the theme.extend.colors section of tailwind.config.js. Example: extend: { colors: { 'brand-blue': '#123456' } }.

Detailed Insights

In the theme.extend.colors section of tailwind.config.js. Example: extend: { colors: { 'brand-blue': '#123456' } }.

Module: core
#17
What is 'Preflight' in Tailwind?
Experience

Preflight is a set of base styles (resets) built on top of modern-normalize, designed to smooth out cross-browser inconsistencies and provide a clean ...

Detailed Insights

Preflight is a set of base styles (resets) built on top of modern-normalize, designed to smooth out cross-browser inconsistencies and provide a clean slate.

Module: core
#18
How to disable Preflight?
Advanced

In tailwind.config.js, set corePlugins: { preflight: false }. This is useful when integrating Tailwind into an existing project with its own resets.

Detailed Insights

In tailwind.config.js, set corePlugins: { preflight: false }. This is useful when integrating Tailwind into an existing project with its own resets.

Module: core
#19
Explain the spacing scale in Tailwind.
Beginner

By default, 1 unit equals 0.25rem (4px). So 'm-4' is 1rem (16px), 'p-8' is 2rem (32px), etc.

Detailed Insights

By default, 1 unit equals 0.25rem (4px). So 'm-4' is 1rem (16px), 'p-8' is 2rem (32px), etc.

Module: core
#20
What are transition utilities?
Beginner

Classes like 'transition-all', 'duration-300', 'ease-in-out' are used to add smooth animations to property changes.

Detailed Insights

Classes like 'transition-all', 'duration-300', 'ease-in-out' are used to add smooth animations to property changes.

Module: core
#21
How to use 'group' hover?
Experience

Apply the 'group' class to a parent element, and then use 'group-hover:' modifiers on children to trigger styles when the parent is hovered.

Detailed Insights

Apply the 'group' class to a parent element, and then use 'group-hover:' modifiers on children to trigger styles when the parent is hovered.

Module: core
#22
What is 'peer' modifier?
Experience

Similar to group, but for siblings. Apply 'peer' to a preceding element and 'peer-checked:...' or 'peer-hover:...' to a following sibling.

Detailed Insights

Similar to group, but for siblings. Apply 'peer' to a preceding element and 'peer-checked:...' or 'peer-hover:...' to a following sibling.

Module: core
#23
How to handle opacity?
Beginner

Use 'opacity-{value}' for entire elements, or the slash syntax for colors like 'bg-blue-500/50' (50% opacity background).

Detailed Insights

Use 'opacity-{value}' for entire elements, or the slash syntax for colors like 'bg-blue-500/50' (50% opacity background).

Module: core
#24
What is the purpose of 'important' modifier?
Advanced

Prefixing a class with '!' (e.g., '!mt-4') adds !important to the generated CSS. Useful for overriding stubborn 3rd party styles.

Detailed Insights

Prefixing a class with '!' (e.g., '!mt-4') adds !important to the generated CSS. Useful for overriding stubborn 3rd party styles.

Module: core
#25
How to use Container queries?
Advanced

Using the '@tailwindcss/container-queries' plugin. It allows styling elements based on the size of their parent container rather than the viewport.

Detailed Insights

Using the '@tailwindcss/container-queries' plugin. It allows styling elements based on the size of their parent container rather than the viewport.

Module: core
#26
What are 'Variants' in Tailwind?
Advanced

Variants are the modifiers like hover:, focus:, sm:, etc. You can enable/disable them for specific plugins in the config file (though modern Tailwind ...

Detailed Insights

Variants are the modifiers like hover:, focus:, sm:, etc. You can enable/disable them for specific plugins in the config file (though modern Tailwind handles this automatically).

Module: core
#27
How to extend the spacing scale?
Experience

In config under theme.extend.spacing. Adding '72': '18rem' will create classes like 'm-72', 'w-72', etc.

Detailed Insights

In config under theme.extend.spacing. Adding '72': '18rem' will create classes like 'm-72', 'w-72', etc.

Module: core
#28
What is the difference between 'theme' and 'extend' in config?
Experience

'theme' overrides the entire default configuration for that section. 'extend' merges your values with the defaults.

Detailed Insights

'theme' overrides the entire default configuration for that section. 'extend' merges your values with the defaults.

Module: core
#29
Explain typography in Tailwind.
Beginner

Tailwind provides utilities for everything from 'text-sm' to 'text-9xl', 'font-bold', 'leading-tight' (line height), and 'tracking-wide' (letter spaci...

Detailed Insights

Tailwind provides utilities for everything from 'text-sm' to 'text-9xl', 'font-bold', 'leading-tight' (line height), and 'tracking-wide' (letter spacing).

Module: core
#30
What is the 'aspect-ratio' utility?
Beginner

Utilities like 'aspect-video' or 'aspect-square' use the native CSS aspect-ratio property to force elements to maintain proportions.

Detailed Insights

Utilities like 'aspect-video' or 'aspect-square' use the native CSS aspect-ratio property to force elements to maintain proportions.

Module: core
#31
How to use CSS Gradients in Tailwind?
Beginner

Use 'bg-gradient-to-{dir}' with 'from-{color}', 'via-{color}', and 'to-{color}'. Example: 'bg-gradient-to-r from-cyan-500 to-blue-500'.

Detailed Insights

Use 'bg-gradient-to-{dir}' with 'from-{color}', 'via-{color}', and 'to-{color}'. Example: 'bg-gradient-to-r from-cyan-500 to-blue-500'.

Module: core
#32
Explain the 'ring' utility.
Beginner

'ring' utilities apply a box-shadow that looks like a border, but doesn't affect the box model width/height. Often used for focus indicators.

Detailed Insights

'ring' utilities apply a box-shadow that looks like a border, but doesn't affect the box model width/height. Often used for focus indicators.

Module: core
#33
What is 'screen' utility?
Beginner

'h-screen' and 'w-screen' set height and width to 100vh and 100vw respectively.

Detailed Insights

'h-screen' and 'w-screen' set height and width to 100vh and 100vw respectively.

Module: core
#34
How to handle vertical alignment?
Beginner

Use 'align-top', 'align-middle', 'align-bottom' for inline/table elements, or flexbox/grid for block elements.

Detailed Insights

Use 'align-top', 'align-middle', 'align-bottom' for inline/table elements, or flexbox/grid for block elements.

Module: core
#35
What are 'Forms' in Tailwind?
Experience

Tailwind doesn't style forms by default. Most developers use the '@tailwindcss/forms' plugin to get a sensible, customizable baseline for form inputs.

Detailed Insights

Tailwind doesn't style forms by default. Most developers use the '@tailwindcss/forms' plugin to get a sensible, customizable baseline for form inputs.

Module: core
#36
How to use 'line-clamp'?
Experience

Use 'line-clamp-1' through 'line-clamp-6' to truncate text after a specific number of lines with an ellipsis. Now built into the core.

Detailed Insights

Use 'line-clamp-1' through 'line-clamp-6' to truncate text after a specific number of lines with an ellipsis. Now built into the core.

Module: core
#37
What is the 'divide' utility?
Beginner

'divide-x' or 'divide-y' adds borders between sibling elements automatically. Great for lists or navbars.

Detailed Insights

'divide-x' or 'divide-y' adds borders between sibling elements automatically. Great for lists or navbars.

Module: core
#38
Explain 'Space Between' (space-x/y).
Beginner

A margin-based alternative to gap. It adds margin to all but the first child in a list.

Detailed Insights

A margin-based alternative to gap. It adds margin to all but the first child in a list.

Module: core
#39
How to use 'Marker' utility?
Experience

'marker:text-blue-500' allows you to style the bullets or numbers in a list.

Detailed Insights

'marker:text-blue-500' allows you to style the bullets or numbers in a list.

Module: core
#40
What is 'First-letter' and 'First-line'?
Experience

Modifiers 'first-letter:' and 'first-line:' allow for editorial-style typography directly in classes.

Detailed Insights

Modifiers 'first-letter:' and 'first-line:' allow for editorial-style typography directly in classes.

Module: core
#41
How to customize Screen sizes?
Advanced

In the 'screens' section of the config. You can define custom breakpoints like 'tablet': '640px' or '3xl': '1600px'.

Detailed Insights

In the 'screens' section of the config. You can define custom breakpoints like 'tablet': '640px' or '3xl': '1600px'.

Module: core
#42
Explain the 'Selection' modifier.
Experience

'selection:bg-yellow-200' styles the highlighted text when a user selects content on the page.

Detailed Insights

'selection:bg-yellow-200' styles the highlighted text when a user selects content on the page.

Module: core
#43
How to handle 'Backdrop CSS'?
Experience

Use 'backdrop-blur', 'backdrop-brightness', etc. to apply filters to the area behind an element (e.g., for glassmorphism).

Detailed Insights

Use 'backdrop-blur', 'backdrop-brightness', etc. to apply filters to the area behind an element (e.g., for glassmorphism).

Module: core
#44
What are 'Prose' classes?
Experience

Part of the '@tailwindcss/typography' plugin. Applying the 'prose' class to a div automatically styles nested raw HTML (like from a CMS) beautifully.

Detailed Insights

Part of the '@tailwindcss/typography' plugin. Applying the 'prose' class to a div automatically styles nested raw HTML (like from a CMS) beautifully.

Module: core
#45
How to use 'Object Fit' and 'Object Position'?
Beginner

Utilities like 'object-cover', 'object-contain', 'object-center' are used to control how <img> tags fill their container.

Detailed Insights

Utilities like 'object-cover', 'object-contain', 'object-center' are used to control how <img> tags fill their container.

Module: core
#46
What is the 'Visible' vs 'Invisible' utility?
Beginner

'visible' and 'invisible' toggle the visibility property, while 'hidden' sets display: none.

Detailed Insights

'visible' and 'invisible' toggle the visibility property, while 'hidden' sets display: none.

Module: core
#47
Explain 'Isolation' utility.
Advanced

'isolate' or 'isolation-auto' creates a new stacking context, useful for fixing z-index issues with complex layouts.

Detailed Insights

'isolate' or 'isolation-auto' creates a new stacking context, useful for fixing z-index issues with complex layouts.

Module: core
#48
How to use 'Blend Modes'?
Advanced

Use utilities like 'mix-blend-multiply' or 'bg-blend-overlay' to create complex visual effects with overlays.

Detailed Insights

Use utilities like 'mix-blend-multiply' or 'bg-blend-overlay' to create complex visual effects with overlays.

Module: core
#49
What is 'Filter' utility?
Experience

Classes like 'blur', 'grayscale', 'sepia' allow you to apply CSS filters directly to elements.

Detailed Insights

Classes like 'blur', 'grayscale', 'sepia' allow you to apply CSS filters directly to elements.

Module: core
#50
Does Tailwind support CSS Variables?
Advanced

Yes, you can reference variables in square brackets: 'w-[var(--my-width)]' or use them inside the tailwind.config.js for dynamic themes.

Detailed Insights

Yes, you can reference variables in square brackets: 'w-[var(--my-width)]' or use them inside the tailwind.config.js for dynamic themes.

Module: core
#51
How to create a simple Flexbox container?
Beginner

Add the 'flex' class. By default, it sets flex-direction: row. Use 'flex-col' for vertical stacking.

Detailed Insights

Add the 'flex' class. By default, it sets flex-direction: row. Use 'flex-col' for vertical stacking.

Module: layout
#52
How to center items in Flexbox?
Beginner

Use 'items-center' for vertical alignment and 'justify-center' for horizontal alignment within a flex container.

Detailed Insights

Use 'items-center' for vertical alignment and 'justify-center' for horizontal alignment within a flex container.

Module: layout
#53
How to make a responsive Grid in Tailwind?
Beginner

Use 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4' with 'gap-4' to change column counts based on screen size.

Detailed Insights

Use 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4' with 'gap-4' to change column counts based on screen size.

Module: layout
#54
What is the 'flex-1' class?
Experience

It sets 'flex: 1 1 0%', which allows a flex item to grow and shrink as needed, ignoring its initial size.

Detailed Insights

It sets 'flex: 1 1 0%', which allows a flex item to grow and shrink as needed, ignoring its initial size.

Module: layout
#55
Difference between 'flex-1', 'flex-auto', and 'flex-none'?
Experience

'flex-1' ignores content size. 'flex-auto' considers content size. 'flex-none' prevents the item from growing or shrinking.

Detailed Insights

'flex-1' ignores content size. 'flex-auto' considers content size. 'flex-none' prevents the item from growing or shrinking.

Module: layout
#56
How to use Grid Column span?
Beginner

Use 'col-span-{n}'. Example: 'col-span-2' makes an item span two columns in the grid.

Detailed Insights

Use 'col-span-{n}'. Example: 'col-span-2' makes an item span two columns in the grid.

Module: layout
#57
What is 'col-start' and 'col-end'?
Experience

Used to position an item at a specific grid line. Example: 'col-start-2 col-span-3'.

Detailed Insights

Used to position an item at a specific grid line. Example: 'col-start-2 col-span-3'.

Module: layout
#58
How to create a Holy Grail layout?
Experience

Use a flex container with 'flex-col min-h-screen'. Use 'flex-1' on the main content area to push the footer down.

Detailed Insights

Use a flex container with 'flex-col min-h-screen'. Use 'flex-1' on the main content area to push the footer down.

Module: layout
#59
What is the 'container' class in Tailwind?
Beginner

It sets the max-width of an element to match the current breakpoint. Unlike Bootstrap, it doesn't center itself by default; you must add 'mx-auto'.

Detailed Insights

It sets the max-width of an element to match the current breakpoint. Unlike Bootstrap, it doesn't center itself by default; you must add 'mx-auto'.

Module: layout
#60
How to use 'Basis' in Flexbox?
Experience

The 'basis-{size}' utilities set the initial size of a flex item before space distribution.

Detailed Insights

The 'basis-{size}' utilities set the initial size of a flex item before space distribution.

Module: layout
#61
Explain Grid Auto Flow.
Advanced

Utilities like 'grid-flow-row', 'grid-flow-col', and 'grid-flow-dense' control how the auto-placement algorithm works.

Detailed Insights

Utilities like 'grid-flow-row', 'grid-flow-col', and 'grid-flow-dense' control how the auto-placement algorithm works.

Module: layout
#62
What is 'place-items-center'?
Experience

A shorthand for grid layouts that centers items both horizontally and vertically simultaneously.

Detailed Insights

A shorthand for grid layouts that centers items both horizontally and vertically simultaneously.

Module: layout
#63
How to create a sticky header?
Beginner

Use 'sticky top-0 z-50'. Ensure the parent doesn't have overflow-hidden, which can break sticky behavior.

Detailed Insights

Use 'sticky top-0 z-50'. Ensure the parent doesn't have overflow-hidden, which can break sticky behavior.

Module: layout
#64
Explain 'Position' utilities.
Beginner

Tailwind provides 'static', 'fixed', 'absolute', 'relative', and 'sticky'. Combine with inset utilities like 'top-0', 'right-4'.

Detailed Insights

Tailwind provides 'static', 'fixed', 'absolute', 'relative', and 'sticky'. Combine with inset utilities like 'top-0', 'right-4'.

Module: layout
#65
How to center an absolute element?
Experience

Use 'top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2'. Tailwind 3.0+ also allows 'inset-0 m-auto' for centering absolute elements of known size.

Detailed Insights

Use 'top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2'. Tailwind 3.0+ also allows 'inset-0 m-auto' for centering absolute elements of known size.

Module: layout
#66
What is the 'Z-index' scale in Tailwind?
Beginner

Default values are z-0, z-10, z-20, z-30, z-40, z-50, and z-auto. You can customize this in the config.

Detailed Insights

Default values are z-0, z-10, z-20, z-30, z-40, z-50, and z-auto. You can customize this in the config.

Module: layout
#67
How to hide an element on desktop but show on mobile?
Beginner

Use 'block md:hidden'. (Remember Tailwind is mobile-first, so default comes first).

Detailed Insights

Use 'block md:hidden'. (Remember Tailwind is mobile-first, so default comes first).

Module: layout
#68
Explain 'Overflow' utilities.
Beginner

Use 'overflow-auto' (scroll when needed), 'overflow-hidden' (clip), 'overflow-scroll' (always scroll).

Detailed Insights

Use 'overflow-auto' (scroll when needed), 'overflow-hidden' (clip), 'overflow-scroll' (always scroll).

Module: layout
#69
What is 'Break Inside' utility?
Advanced

Utilities like 'break-inside-avoid' are useful for multi-column text layouts or print styles to prevent elements from splitting across columns/pages.

Detailed Insights

Utilities like 'break-inside-avoid' are useful for multi-column text layouts or print styles to prevent elements from splitting across columns/pages.

Module: layout
#70
How to create a Sidebar with fixed width?
Experience

Use 'w-64 flex-shrink-0' on the sidebar and 'flex-1' on the main content.

Detailed Insights

Use 'w-64 flex-shrink-0' on the sidebar and 'flex-1' on the main content.

Module: layout
#71
Explain 'Flex Grow' and 'Flex Shrink'.
Experience

'grow' (sets flex-grow: 1), 'grow-0' (prevent grow). 'shrink' (sets flex-shrink: 1), 'shrink-0' (fixed size).

Detailed Insights

'grow' (sets flex-grow: 1), 'grow-0' (prevent grow). 'shrink' (sets flex-shrink: 1), 'shrink-0' (fixed size).

Module: layout
#72
How to align self in Grid/Flex?
Experience

Use 'self-start', 'self-end', 'self-center', 'self-stretch' to override the parent's alignment for one specific child.

Detailed Insights

Use 'self-start', 'self-end', 'self-center', 'self-stretch' to override the parent's alignment for one specific child.

Module: layout
#73
What is 'Grid Rows'?
Experience

Utilities like 'grid-rows-3' set explicit horizontal rows. Less common than columns but useful for fixed-height dashboard grids.

Detailed Insights

Utilities like 'grid-rows-3' set explicit horizontal rows. Less common than columns but useful for fixed-height dashboard grids.

Module: layout
#74
Explain 'Box Sizing' in Tailwind.
Beginner

Tailwind sets 'box-border' (border-box) by default in Preflight. You can use 'box-content' if needed.

Detailed Insights

Tailwind sets 'box-border' (border-box) by default in Preflight. You can use 'box-content' if needed.

Module: layout
#75
How to handle Screen Readers only visibility?
Advanced

Use 'sr-only' to hide an element visually but keep it for screen readers. Use 'not-sr-only' to reverse it at specific breakpoints.

Detailed Insights

Use 'sr-only' to hide an element visually but keep it for screen readers. Use 'not-sr-only' to reverse it at specific breakpoints.

Module: layout
#76
What is 'Gap' utility?
Beginner

'gap-{size}' works for both Flexbox and Grid, defining the space between items.

Detailed Insights

'gap-{size}' works for both Flexbox and Grid, defining the space between items.

Module: layout
#77
How to create a multi-column text layout?
Advanced

Use 'columns-1', 'columns-2', etc., which uses CSS columns rather than Flex/Grid. Great for newspaper-style text.

Detailed Insights

Use 'columns-1', 'columns-2', etc., which uses CSS columns rather than Flex/Grid. Great for newspaper-style text.

Module: layout
#78
What is 'Aspect Ratio' utility?
Beginner

'aspect-square', 'aspect-video' or arbitrary 'aspect-[4/3]' to maintain dimensions.

Detailed Insights

'aspect-square', 'aspect-video' or arbitrary 'aspect-[4/3]' to maintain dimensions.

Module: layout
#79
How to keep footer at bottom of page?
Experience

Apply 'flex flex-col min-h-screen' to the wrapper and 'mt-auto' to the footer, or 'flex-1' to the content.

Detailed Insights

Apply 'flex flex-col min-h-screen' to the wrapper and 'mt-auto' to the footer, or 'flex-1' to the content.

Module: layout
#80
What is 'Display' utility?
Beginner

Classes like 'block', 'inline-block', 'inline', 'flex', 'grid', 'table', 'hidden' toggles the display property.

Detailed Insights

Classes like 'block', 'inline-block', 'inline', 'flex', 'grid', 'table', 'hidden' toggles the display property.

Module: layout
#81
How to create a 3x3 square grid?
Experience

'grid grid-cols-3 gap-0' and ensure children have 'aspect-square'.

Detailed Insights

'grid grid-cols-3 gap-0' and ensure children have 'aspect-square'.

Module: layout
#82
What is 'Clearfix' in Tailwind?
Experience

A 'clearfix' utility exists to clear floats, though floats are rarely used in modern Tailwind designs.

Detailed Insights

A 'clearfix' utility exists to clear floats, though floats are rarely used in modern Tailwind designs.

Module: layout
#83
How to handle 'Inset' positioning?
Beginner

'inset-0' is shorthand for top:0, bottom:0, left:0, right:0. Use 'inset-x-0' for horizontal and 'inset-y-0' for vertical.

Detailed Insights

'inset-0' is shorthand for top:0, bottom:0, left:0, right:0. Use 'inset-x-0' for horizontal and 'inset-y-0' for vertical.

Module: layout
#84
Explain 'Box Decoration Break'.
Advanced

'decoration-clone' vs 'decoration-slice' controls how backgrounds/borders behave when an element wraps across multiple lines.

Detailed Insights

'decoration-clone' vs 'decoration-slice' controls how backgrounds/borders behave when an element wraps across multiple lines.

Module: layout
#85
Responsive Padding and Margin.
Beginner

Example: 'p-4 md:p-8 lg:p-12'. Always follows the mobile-first pattern.

Detailed Insights

Example: 'p-4 md:p-8 lg:p-12'. Always follows the mobile-first pattern.

Module: layout
#86
What is 'w-max' and 'w-min'?
Experience

'w-max' sets width to max-content (as wide as possible), 'w-min' to min-content (as narrow as possible).

Detailed Insights

'w-max' sets width to max-content (as wide as possible), 'w-min' to min-content (as narrow as possible).

Module: layout
#87
How to use 'w-fit'?
Experience

'w-fit' sets width to fit-content, which is useful for centering buttons or boxes that should only be as wide as their labels.

Detailed Insights

'w-fit' sets width to fit-content, which is useful for centering buttons or boxes that should only be as wide as their labels.

Module: layout
#88
Explain 'Flex Wrap' utilities.
Beginner

'flex-wrap', 'flex-nowrap' (default), and 'flex-wrap-reverse' control if items move to a new line when out of space.

Detailed Insights

'flex-wrap', 'flex-nowrap' (default), and 'flex-wrap-reverse' control if items move to a new line when out of space.

Module: layout
#89
How to create a masonry-like layout?
Advanced

Traditionally requires JS, but the 'columns-{n}' utility can achieve basic CSS-only masonry.

Detailed Insights

Traditionally requires JS, but the 'columns-{n}' utility can achieve basic CSS-only masonry.

Module: layout
#90
What is 'Justify Items'?
Experience

Grid-only utility to align items along their inline (horizontal) axis.

Detailed Insights

Grid-only utility to align items along their inline (horizontal) axis.

Module: layout
#91
What is 'Align Content'?
Advanced

Controls how rows are distributed in a multi-line flex/grid container when there is extra vertical space.

Detailed Insights

Controls how rows are distributed in a multi-line flex/grid container when there is extra vertical space.

Module: layout
#92
How to push nav items to the right?
Beginner

In a flex container, wrap items in a div and add 'ml-auto' to it, or use 'justify-between'.

Detailed Insights

In a flex container, wrap items in a div and add 'ml-auto' to it, or use 'justify-between'.

Module: layout
#93
Explain 'Container Center' in config.
Advanced

In tailwind.config.js, you can set theme: { container: { center: true } } so the .container class always includes mx-auto.

Detailed Insights

In tailwind.config.js, you can set theme: { container: { center: true } } so the .container class always includes mx-auto.

Module: layout
#94
How to add horizontal scroll with snap?
Advanced

Use 'overflow-x-auto snap-x' on parent and 'snap-center' or 'snap-start' on children.

Detailed Insights

Use 'overflow-x-auto snap-x' on parent and 'snap-center' or 'snap-start' on children.

Module: layout
#95
Explain 'Float' in Tailwind.
Beginner

'float-right', 'float-left', 'float-none'. Best used for wrapping text around images.

Detailed Insights

'float-right', 'float-left', 'float-none'. Best used for wrapping text around images.

Module: layout
#96
How to manage 'Max Width' responsively?
Beginner

Utililties like 'max-w-xs' up to 'max-w-7xl', and 'max-w-full'. Screen specific: 'max-w-screen-md'.

Detailed Insights

Utililties like 'max-w-xs' up to 'max-w-7xl', and 'max-w-full'. Screen specific: 'max-w-screen-md'.

Module: layout
#97
What is 'Pointer Events'?
Experience

'pointer-events-none' (click-through) and 'pointer-events-auto'. Useful for overlays.

Detailed Insights

'pointer-events-none' (click-through) and 'pointer-events-auto'. Useful for overlays.

Module: layout
#98
How to use 'Touch Action'?
Advanced

Utilities like 'touch-none', 'touch-pan-x' control how the element behaves on touchscreens (scrolling vs custom JS).

Detailed Insights

Utilities like 'touch-none', 'touch-pan-x' control how the element behaves on touchscreens (scrolling vs custom JS).

Module: layout
#99
What is 'Will Change'?
Advanced

'will-change-scroll' or 'will-change-transform' hints to the browser for hardware acceleration on complex animations.

Detailed Insights

'will-change-scroll' or 'will-change-transform' hints to the browser for hardware acceleration on complex animations.

Module: layout
#100
Explain 'Table Layout' utilities.
Advanced

'table-auto' (columns sized by content) and 'table-fixed' (columns sized by width property, more predictable).

Detailed Insights

'table-auto' (columns sized by content) and 'table-fixed' (columns sized by width property, more predictable).

Module: layout
#101
How to extend Tailwind's default theme?
Experience

Use the 'extend' key in tailwind.config.js. This adds your values to the existing ones rather than replacing them.

Detailed Insights

Use the 'extend' key in tailwind.config.js. This adds your values to the existing ones rather than replacing them.

Module: customization
#102
How to create a custom color palette?
Experience

Define an object in the config: colors: { brand: { 100: '#...', 500: '#...' } }. This generates 'bg-brand-500', 'text-brand-100', etc.

Detailed Insights

Define an object in the config: colors: { brand: { 100: '#...', 500: '#...' } }. This generates 'bg-brand-500', 'text-brand-100', etc.

Module: customization
#103
How to reference other themes values in config?
Advanced

The config file is JS, so you can import 'tailwindcss/colors' or use the 'theme' function provided in the callback syntax.

Detailed Insights

The config file is JS, so you can import 'tailwindcss/colors' or use the 'theme' function provided in the callback syntax.

Module: customization
#104
How to add custom fonts?
Experience

Define in theme.extend.fontFamily. Example: { sans: ['Inter', 'sans-serif'] }. You'll still need to @import the font in your CSS.

Detailed Insights

Define in theme.extend.fontFamily. Example: { sans: ['Inter', 'sans-serif'] }. You'll still need to @import the font in your CSS.

Module: customization
#105
What is the Tailwind Play CDN?
Beginner

A script tag you can add to HTML to use Tailwind in the browser without a build step. Useful for prototyping but not for production.

Detailed Insights

A script tag you can add to HTML to use Tailwind in the browser without a build step. Useful for prototyping but not for production.

Module: customization
#106
How to use Tailwind Plugins?
Experience

Install via npm, then add to the 'plugins' array in config. Example: plugins: [require('@tailwindcss/typography')].

Detailed Insights

Install via npm, then add to the 'plugins' array in config. Example: plugins: [require('@tailwindcss/typography')].

Module: customization
#107
What is a 'Tailwind CSS IntelliSense'?
Beginner

A VS Code extension that provides autocomplete, linting, and hover previews for Tailwind classes. Essential for productivity.

Detailed Insights

A VS Code extension that provides autocomplete, linting, and hover previews for Tailwind classes. Essential for productivity.

Module: customization
#108
How to add custom CSS without @apply?
Experience

Simply write normal CSS in your main file. Tailwind is just CSS, so it coexists perfectly with custom selectors.

Detailed Insights

Simply write normal CSS in your main file. Tailwind is just CSS, so it coexists perfectly with custom selectors.

Module: customization
#109
How to create custom utilities in config?
Advanced

Use the 'plugins' array with the 'addUtilities' function to define classes that don't fit the standard theme pattern.

Detailed Insights

Use the 'plugins' array with the 'addUtilities' function to define classes that don't fit the standard theme pattern.

Module: customization
#110
Explain 'Presets' in Tailwind config.
Advanced

Presets allow you to share a common configuration across multiple projects. You define a config and link it using the 'presets' key.

Detailed Insights

Presets allow you to share a common configuration across multiple projects. You define a config and link it using the 'presets' key.

Module: customization
#111
How to change the default prefix?
Advanced

Set 'prefix: "tw-"' in config. All generated classes will then require the prefix, e.g., 'tw-bg-blue-500'.

Detailed Insights

Set 'prefix: "tw-"' in config. All generated classes will then require the prefix, e.g., 'tw-bg-blue-500'.

Module: customization
#112
How to force Tailwind to always include certain classes?
Advanced

Use the 'safelist' option in config. This prevents Purge (Tailwind's scanning) from removing those classes even if they aren't found in files.

Detailed Insights

Use the 'safelist' option in config. This prevents Purge (Tailwind's scanning) from removing those classes even if they aren't found in files.

Module: customization
#113
How to handle RTL (Right-to-Left) in Tailwind?
Experience

Use logical properties like 'ms-4' (margin-start) and 'pe-2' (padding-end) which automatically swap based on direction, or use a 3rd party RTL plugin.

Detailed Insights

Use logical properties like 'ms-4' (margin-start) and 'pe-2' (padding-end) which automatically swap based on direction, or use a 3rd party RTL plugin.

Module: customization
#114
Explain the 'important' option in config.
Advanced

Setting 'important: true' or 'important: "#app"' automatically adds !important or a high-specificity selector to all Tailwind utilities.

Detailed Insights

Setting 'important: true' or 'important: "#app"' automatically adds !important or a high-specificity selector to all Tailwind utilities.

Module: customization
#115
How to add custom variants?
Advanced

Use the 'addVariant' function in a plugin. For example, to create a 'child-hover:' variant that styles direct children.

Detailed Insights

Use the 'addVariant' function in a plugin. For example, to create a 'child-hover:' variant that styles direct children.

Module: customization
#116
What is the 'Tailwind CLI'?
Beginner

A standalone tool that lets you compile Tailwind CSS without needed a complex build setup like Webpack or Vite.

Detailed Insights

A standalone tool that lets you compile Tailwind CSS without needed a complex build setup like Webpack or Vite.

Module: customization
#117
How to use Prettier with Tailwind?
Beginner

Install 'prettier-plugin-tailwindcss'. it automatically sorts your classes in a consistent, logical order.

Detailed Insights

Install 'prettier-plugin-tailwindcss'. it automatically sorts your classes in a consistent, logical order.

Module: customization
#118
Explain 'Negative values' in customization.
Experience

Tailwind automatically handles negative versions of theme values if you prefix them with a minus, e.g., '-m-4'.

Detailed Insights

Tailwind automatically handles negative versions of theme values if you prefix them with a minus, e.g., '-m-4'.

Module: customization
#119
How to use 'Theme' function in CSS?
Experience

In your CSS files, you can use 'theme('colors.blue.500')' to fetch values directly from your config.

Detailed Insights

In your CSS files, you can use 'theme('colors.blue.500')' to fetch values directly from your config.

Module: customization
#120
What is 'Full Config' export?
Advanced

You can import 'resolveConfig' from tailwindcss to get the final merged config object in your JS code (useful for shared constants).

Detailed Insights

You can import 'resolveConfig' from tailwindcss to get the final merged config object in your JS code (useful for shared constants).

Module: customization
#121
How to add custom shadows?
Experience

In theme.extend.boxShadow, add an entry like: 'neon': '0 0 5px #fff, 0 0 10px #f0f'.

Detailed Insights

In theme.extend.boxShadow, add an entry like: 'neon': '0 0 5px #fff, 0 0 10px #f0f'.

Module: customization
#122
Explain 'Screen' vs 'Container' customization.
Advanced

Screens define global breakpoints; Container customization defines the max-widths and centering for the .container class specifically.

Detailed Insights

Screens define global breakpoints; Container customization defines the max-widths and centering for the .container class specifically.

Module: customization
#123
How to use custom cursors?
Beginner

Use 'cursor-pointer', 'cursor-wait', or extend the 'cursor' section in config for custom image cursors.

Detailed Insights

Use 'cursor-pointer', 'cursor-wait', or extend the 'cursor' section in config for custom image cursors.

Module: customization
#124
How to add custom animations?
Advanced

Define 'keyframes' and then map them to an 'animation' value in the config file.

Detailed Insights

Define 'keyframes' and then map them to an 'animation' value in the config file.

Module: customization
#125
What is 'Core Plugins' option?
Advanced

Allows you to selectively disable built-in Tailwind features (like float or clear) to save bundle size.

Detailed Insights

Allows you to selectively disable built-in Tailwind features (like float or clear) to save bundle size.

Module: customization
#126
How to use Tailwind with CSS Modules?
Experience

You can use @apply inside CSS Modules, or combine utility classes with module classes in your components.

Detailed Insights

You can use @apply inside CSS Modules, or combine utility classes with module classes in your components.

Module: customization
#127
How to handle multiple Tailwind configs?
Advanced

Useful for monorepos. You specify the config path in your PostCSS setup or CLI command.

Detailed Insights

Useful for monorepos. You specify the config path in your PostCSS setup or CLI command.

Module: customization
#128
Explain 'Experimental' features.
Advanced

Features that aren't quite ready for a stable release but can be enabled in config for early testing.

Detailed Insights

Features that aren't quite ready for a stable release but can be enabled in config for early testing.

Module: customization
#129
How to customize the 'Gutter' size in Grid?
Beginner

Tailwind doesn't have a 'gutter' variable; you just use 'gap-{size}' utilities, which you can customize in the spacing section.

Detailed Insights

Tailwind doesn't have a 'gutter' variable; you just use 'gap-{size}' utilities, which you can customize in the spacing section.

Module: customization
#130
What is the 'Separator' option?
Advanced

Allows you to change the character used for modifiers from a colon to something else (e.g., '_') if needed for specific template languages.

Detailed Insights

Allows you to change the character used for modifiers from a colon to something else (e.g., '_') if needed for specific template languages.

Module: customization
#131
How to use custom 'Breakpoints' only for certain utilities?
Advanced

You can't do this easily with the default theme; breakpoints are usually global for all plugins.

Detailed Insights

You can't do this easily with the default theme; breakpoints are usually global for all plugins.

Module: customization
#132
How to add custom border-radius values?
Beginner

Extend 'borderRadius' in config. Adding '4xl': '2rem' creates 'rounded-4xl'.

Detailed Insights

Extend 'borderRadius' in config. Adding '4xl': '2rem' creates 'rounded-4xl'.

Module: customization
#133
Explain 'Box Shadow' coloring in BS5 vs Tailwind.
Experience

Tailwind 3.0+ introduced 'shadow-{color}/{opacity}' which allows for truly custom colored shadows easily.

Detailed Insights

Tailwind 3.0+ introduced 'shadow-{color}/{opacity}' which allows for truly custom colored shadows easily.

Module: customization
#134
How to use 'Typography' plugin customization?
Advanced

The '@tailwindcss/typography' plugin has its own 'typography' key in the config to change prose styles.

Detailed Insights

The '@tailwindcss/typography' plugin has its own 'typography' key in the config to change prose styles.

Module: customization
#135
What is the 'Custom Forms' history?
Advanced

Formerly a plugin that added classes, it's now a plugin that resets forms so they are easier to style with standard utilities.

Detailed Insights

Formerly a plugin that added classes, it's now a plugin that resets forms so they are easier to style with standard utilities.

Module: customization
#136
How to add custom Z-index values?
Beginner

Extend 'zIndex' in config: { '60': '60', 'max': '9999' }.

Detailed Insights

Extend 'zIndex' in config: { '60': '60', 'max': '9999' }.

Module: customization
#137
How to create a custom 'Ring' color?
Beginner

Extend 'ringColor' or simply add to 'colors' as it pulls from there automatically.

Detailed Insights

Extend 'ringColor' or simply add to 'colors' as it pulls from there automatically.

Module: customization
#138
Explain 'Transition Timing' customization.
Experience

Extend 'transitionTimingFunction' to add custom beziers like 'cubic-bezier(0.4, 0, 0.2, 1)'.

Detailed Insights

Extend 'transitionTimingFunction' to add custom beziers like 'cubic-bezier(0.4, 0, 0.2, 1)'.

Module: customization
#139
How to use 'Screens' with 'min' and 'max'?
Advanced

Breakpoints can be objects: 'mobile': { 'max': '639px' } vs standard 'min' behavior.

Detailed Insights

Breakpoints can be objects: 'mobile': { 'max': '639px' } vs standard 'min' behavior.

Module: customization
#140
How to add custom 'Fill' and 'Stroke' for SVG?
Experience

Extend 'fill' and 'stroke' in config or use current color with 'fill-current'.

Detailed Insights

Extend 'fill' and 'stroke' in config or use current color with 'fill-current'.

Module: customization
#141
What is the purpose of 'matchUtilities' in plugins?
Advanced

Allows creating utilities that support any value (including arbitrary values) dynamically.

Detailed Insights

Allows creating utilities that support any value (including arbitrary values) dynamically.

Module: customization
#142
How to exclude files from Tailwind scanning?
Advanced

In the 'content' array, use globs that don't match the files you want to ignore.

Detailed Insights

In the 'content' array, use globs that don't match the files you want to ignore.

Module: customization
#143
How to use Tailwind with SASS/SCSS?
Experience

It works, but you should avoid @apply inside complex loops or nested rules as it can significantly slow down builds.

Detailed Insights

It works, but you should avoid @apply inside complex loops or nested rules as it can significantly slow down builds.

Module: customization
#144
What is the 'JIT' (Just-In-Time) compiler history?
Advanced

Introduced in v2.1 as optional and made default in v3.0, it generates CSS on demand as you write classes, enabling arbitrary values and faster builds.

Detailed Insights

Introduced in v2.1 as optional and made default in v3.0, it generates CSS on demand as you write classes, enabling arbitrary values and faster builds.

Module: customization
#145
How to add a custom background-image?
Experience

Extend 'backgroundImage' in config: { 'hero': "url('/img/hero.jpg')" }. Use with 'bg-hero'.

Detailed Insights

Extend 'backgroundImage' in config: { 'hero': "url('/img/hero.jpg')" }. Use with 'bg-hero'.

Module: customization
#146
Explain 'Flex-Basis' customization.
Experience

You can add values like 'basis-1/7' or 'basis-sidebar' by extending the 'flexBasis' section.

Detailed Insights

You can add values like 'basis-1/7' or 'basis-sidebar' by extending the 'flexBasis' section.

Module: customization
#147
How to use 'Grid-Template-Columns' for specialized layouts?
Advanced

Extend 'gridTemplateColumns': { 'main': '200px 1fr 100px' }. Use with 'grid-cols-main'.

Detailed Insights

Extend 'gridTemplateColumns': { 'main': '200px 1fr 100px' }. Use with 'grid-cols-main'.

Module: customization
#148
How to add custom line-height values?
Beginner

Extend 'lineHeight' in config. Adding 'extra-loose': '2.5' creates 'leading-extra-loose'.

Detailed Insights

Extend 'lineHeight' in config. Adding 'extra-loose': '2.5' creates 'leading-extra-loose'.

Module: customization
#149
How to customize the 'Dark Mode' selector?
Advanced

You can specify a different selector than '.dark' using the array syntax: darkMode: ['class', '[data-mode="dark"]'].

Detailed Insights

You can specify a different selector than '.dark' using the array syntax: darkMode: ['class', '[data-mode="dark"]'].

Module: customization
#150
What is 'Tailwind Config Docs' trick?
Beginner

Adding a 'type' import in JS JSDoc comments allows for full IDE type checking of your config file.

Detailed Insights

Adding a 'type' import in JS JSDoc comments allows for full IDE type checking of your config file.

Module: customization
#151
How does Tailwind handle performance?
Advanced

By generating only the CSS used in your files, Tailwind keeps the production bundle incredibly small (often <10kb Gzipped), regardless of project size...

Detailed Insights

By generating only the CSS used in your files, Tailwind keeps the production bundle incredibly small (often <10kb Gzipped), regardless of project size.

Module: advanced
#152
Explain 'Twin.macro'.
Advanced

A popular library for CSS-in-JS that combines Tailwind utilities with Styled Components or Emotion.

Detailed Insights

A popular library for CSS-in-JS that combines Tailwind utilities with Styled Components or Emotion.

Module: advanced
#153
Tailwind with Next.js: Setup.
Experience

Next.js has built-in support. You just install tailwind via npm, initialize the config, and import tailwind directives into your global CSS file.

Detailed Insights

Next.js has built-in support. You just install tailwind via npm, initialize the config, and import tailwind directives into your global CSS file.

Module: advanced
#154
How to handle dynamic class names in Tailwind?
Experience

Don't use string concatenation like 'text-${color}-500'. Tailwind's scanner won't find it. Instead, use full class names: color === 'red' ? 'text-red-...

Detailed Insights

Don't use string concatenation like 'text-${color}-500'. Tailwind's scanner won't find it. Instead, use full class names: color === 'red' ? 'text-red-500' : 'text-blue-500'.

Module: advanced
#155
What is the 'Tailwind UI'?
Beginner

A set of premium, professional components built using Tailwind CSS by the framework's creators. It's paid but provides high-quality design patterns.

Detailed Insights

A set of premium, professional components built using Tailwind CSS by the framework's creators. It's paid but provides high-quality design patterns.

Module: advanced
#156
Explain 'CVA' (Class Variance Authority).
Advanced

A library often used with Tailwind to build type-safe UI components with variants (e.g., primary/secondary buttons of diff sizes).

Detailed Insights

A library often used with Tailwind to build type-safe UI components with variants (e.g., primary/secondary buttons of diff sizes).

Module: advanced
#157
Tailwind with Storybook.
Experience

Import the Tailwind CSS file into .storybook/preview.js to ensure utilities are available in your component stories.

Detailed Insights

Import the Tailwind CSS file into .storybook/preview.js to ensure utilities are available in your component stories.

Module: advanced
#158
Debugging Tailwind: Common issues.
Experience

Classes not applying? Check your config file path, ensure the file is in the 'content' list, and verify PostCSS is running.

Detailed Insights

Classes not applying? Check your config file path, ensure the file is in the 'content' list, and verify PostCSS is running.

Module: advanced
#159
How to use 'Tailwind with Webpack'?
Experience

Use 'postcss-loader' in your webpack config to process CSS files through Tailwind.

Detailed Insights

Use 'postcss-loader' in your webpack config to process CSS files through Tailwind.

Module: advanced
#160
Explain 'Tailwind with Vite' speed.
Advanced

Vite's HMR is incredibly fast with Tailwind because it only re-generates the CSS for changed classes, often under 50ms.

Detailed Insights

Vite's HMR is incredibly fast with Tailwind because it only re-generates the CSS for changed classes, often under 50ms.

Module: advanced
#161
What is 'Headless UI'?
Experience

A library of completely unstyled, accessible UI components (like Modals or Listboxes) designed to be styled with Tailwind CSS.

Detailed Insights

A library of completely unstyled, accessible UI components (like Modals or Listboxes) designed to be styled with Tailwind CSS.

Module: advanced
#162
How to extend 'content' to include 3rd party libs?
Advanced

Include node_modules paths in the content array. Example: './node_modules/@myorg/ui/**/*.js'.

Detailed Insights

Include node_modules paths in the content array. Example: './node_modules/@myorg/ui/**/*.js'.

Module: advanced
#163
Explain 'Tailwind Oxide' engine.
Advanced

The codename for Tailwind v4's high-performance engine written in Rust, significantly improving build speeds and simplification.

Detailed Insights

The codename for Tailwind v4's high-performance engine written in Rust, significantly improving build speeds and simplification.

Module: advanced
#164
How to use Tailwind for Email templates?
Advanced

Use tools like 'Maizzle' which build email templates using Tailwind and then inline the CSS automatically.

Detailed Insights

Use tools like 'Maizzle' which build email templates using Tailwind and then inline the CSS automatically.

Module: advanced
#165
Is Tailwind suitable for الكبير large-scale apps?
Beginner

Yes, it excels in large apps because it prevents CSS debt (no new CSS for new features) and ensures design consistency through the config.

Detailed Insights

Yes, it excels in large apps because it prevents CSS debt (no new CSS for new features) and ensures design consistency through the config.

Module: advanced
#166
What is 'DaisyUI'?
Beginner

A popular Tailwind plugin that provides component classes (like .btn, .card) using only utility classes under the hood.

Detailed Insights

A popular Tailwind plugin that provides component classes (like .btn, .card) using only utility classes under the hood.

Module: advanced
#167
How to use 'Tailwind Merge'?
Advanced

A utility function to merge Tailwind classes without style conflicts (e.g., 'p-4 p-8' becomes 'p-8').

Detailed Insights

A utility function to merge Tailwind classes without style conflicts (e.g., 'p-4 p-8' becomes 'p-8').

Module: advanced
#168
What is 'clsx' and why use it with Tailwind?
Experience

A tiny utility for conditionally joining class names together. Vital for clean component code.

Detailed Insights

A tiny utility for conditionally joining class names together. Vital for clean component code.

Module: advanced
#169
Tailwind 'Pre-bundling' for libraries.
Advanced

If building a component library, you can either ship raw classes (requiring user to have Tailwind) or ship pre-bundled CSS.

Detailed Insights

If building a component library, you can either ship raw classes (requiring user to have Tailwind) or ship pre-bundled CSS.

Module: advanced
#170
Explain 'Tailwind in Production' checklist.
Advanced

Ensure NODE_ENV is 'production', 'content' paths are correct, and use a minifier (usually cssnano through PostCSS).

Detailed Insights

Ensure NODE_ENV is 'production', 'content' paths are correct, and use a minifier (usually cssnano through PostCSS).

Module: advanced
#171
How to add 'Custom Logic' in Tailwind config?
Advanced

Since it's a JS file, you can calculate values dynamically based on environment variables or external data.

Detailed Insights

Since it's a JS file, you can calculate values dynamically based on environment variables or external data.

Module: advanced
#172
Explain 'Screen Reader' accessibility with Tailwind.
Experience

Tailwind doesn't provide accessibility by itself (it's just CSS). You must use proper HTML tags and 'sr-only' where needed.

Detailed Insights

Tailwind doesn't provide accessibility by itself (it's just CSS). You must use proper HTML tags and 'sr-only' where needed.

Module: advanced
#173
How to use 'Tailwind with WordPress'?
Experience

Typically using a build tool like Mix or Vite within the theme folder to generate the style.css file.

Detailed Insights

Typically using a build tool like Mix or Vite within the theme folder to generate the style.css file.

Module: advanced
#174
What is 'Tailwind CSS IntelliSense' config?
Advanced

You can create a .vscode/settings.json to customize how the extension works, like regex for class detection in other file types.

Detailed Insights

You can create a .vscode/settings.json to customize how the extension works, like regex for class detection in other file types.

Module: advanced
#175
Explain 'Static Analysis' of Tailwind classes.
Advanced

Tailwind doesn't run your code; it just reads text. It cannot handle complex JS logic inside class strings.

Detailed Insights

Tailwind doesn't run your code; it just reads text. It cannot handle complex JS logic inside class strings.

Module: advanced
#176
How to implement 'Print' styles?
Experience

Use the 'print:' modifier. Example: 'print:hidden' hides elements when printing the page.

Detailed Insights

Use the 'print:' modifier. Example: 'print:hidden' hides elements when printing the page.

Module: advanced
#177
What is 'Standardizing' a team with Tailwind?
Beginner

Standardization happens through the tailwind.config.js - it acts as the design system documentation for the whole team.

Detailed Insights

Standardization happens through the tailwind.config.js - it acts as the design system documentation for the whole team.

Module: advanced
#178
How to handle 'z-index' complexity?
Experience

Avoid high z-index values; use 'isolate' to create contexts and only use as much z-index as needed relative to siblings.

Detailed Insights

Avoid high z-index values; use 'isolate' to create contexts and only use as much z-index as needed relative to siblings.

Module: advanced
#179
What is 'Tailwind Components' community site?
Beginner

A crowdsourced platform where developers share custom components and snippets built with Tailwind.

Detailed Insights

A crowdsourced platform where developers share custom components and snippets built with Tailwind.

Module: advanced
#180
Can you use Tailwind with Shadow DOM?
Advanced

Yes, but you must inject the Tailwind CSS into the Shadow Root, as global styles don't pierce the shadow boundary.

Detailed Insights

Yes, but you must inject the Tailwind CSS into the Shadow Root, as global styles don't pierce the shadow boundary.

Module: advanced
#181
How to use 'Tailwind with Electron'?
Experience

Same as any web app; include the build step in your renderer process pipeline.

Detailed Insights

Same as any web app; include the build step in your renderer process pipeline.

Module: advanced
#182
Explain 'PostCSS Import' plugin importance.
Advanced

Crucial for splitting your CSS into multiple files. Tailwind handles @import better when this plugin is present.

Detailed Insights

Crucial for splitting your CSS into multiple files. Tailwind handles @import better when this plugin is present.

Module: advanced
#183
How to create a 'Responsive Navigation' without JS?
Advanced

Use a hidden checkbox, 'peer' modifiers, and CSS transitions. Very common with Tailwind.

Detailed Insights

Use a hidden checkbox, 'peer' modifiers, and CSS transitions. Very common with Tailwind.

Module: advanced
#184
What is 'Heroicons'?
Beginner

A set of beautiful SVG icons from the makers of Tailwind CSS, designed to look great with the framework's styling.

Detailed Insights

A set of beautiful SVG icons from the makers of Tailwind CSS, designed to look great with the framework's styling.

Module: advanced
#185
How to 'Theming' and 'Multi-theming'?
Advanced

Using CSS variables in the config and then changing those variables on a parent element based on a class (e.g., .theme-pro, .theme-eco).

Detailed Insights

Using CSS variables in the config and then changing those variables on a parent element based on a class (e.g., .theme-pro, .theme-eco).

Module: advanced
#186
Explain 'Tailwind v3.0' major changes.
Advanced

JIT by default, scroll snap, multi-column layout, accent-color, colored shadows, and aspect-ratio native support.

Detailed Insights

JIT by default, scroll snap, multi-column layout, accent-color, colored shadows, and aspect-ratio native support.

Module: advanced
#187
How to 'Exclude' core plugins in v3?
Advanced

Use the 'corePlugins' object in config to set specific features to false.

Detailed Insights

Use the 'corePlugins' object in config to set specific features to false.

Module: advanced
#188
What is the 'Preflight' CSS source?
Advanced

It's available on GitHub as modern-normalize.css with additional tweaks from the Tailwind team.

Detailed Insights

It's available on GitHub as modern-normalize.css with additional tweaks from the Tailwind team.

Module: advanced
#189
How to use 'Tailwind with Playwright'?
Experience

Use the 'data-testid' approach for selectors. Don't select by Tailwind classes as they are design-focused, not functional.

Detailed Insights

Use the 'data-testid' approach for selectors. Don't select by Tailwind classes as they are design-focused, not functional.

Module: advanced
#190
What is 'Headless Components' trend?
Beginner

Moving away from pre-styled UI (MUI, AntD) towards functional-only UI (Radix, HeadlessUI) styled with Tailwind.

Detailed Insights

Moving away from pre-styled UI (MUI, AntD) towards functional-only UI (Radix, HeadlessUI) styled with Tailwind.

Module: advanced
#191
How to use 'Container Query' experimental support?
Advanced

Add the plugin and use Classes like '@[400px]:grid-cols-2'.

Detailed Insights

Add the plugin and use Classes like '@[400px]:grid-cols-2'.

Module: advanced
#192
Explain 'Tailwind with Shopify/Liquid'.
Experience

Use the Tailwind CLI to watch.liquid files and output a theme.css.asset file.

Detailed Insights

Use the Tailwind CLI to watch.liquid files and output a theme.css.asset file.

Module: advanced
#193
How to 'Minify' Tailwind CSS?
Experience

Typically handled by cssnano or the built-in minification in tools like Vite and Next.js.

Detailed Insights

Typically handled by cssnano or the built-in minification in tools like Vite and Next.js.

Module: advanced
#194
What is 'Utility specificity' rules?
Advanced

Tailwind utilities all have the same specificity (0,1,0). The order they appear in the CSS file determines who wins (which is why hover: always overri...

Detailed Insights

Tailwind utilities all have the same specificity (0,1,0). The order they appear in the CSS file determines who wins (which is why hover: always overrides base).

Module: advanced
#195
How to add 'Custom Directives'?
Advanced

This isn't supported directly, but but you can create custom PostCSS plugins to handle new @ rules.

Detailed Insights

This isn't supported directly, but but you can create custom PostCSS plugins to handle new @ rules.

Module: advanced
#196
Explain 'Tailwind with Docker'.
Experience

Ensure the build step is included in your Dockerfile to generate the production CSS bundle.

Detailed Insights

Ensure the build step is included in your Dockerfile to generate the production CSS bundle.

Module: advanced
#197
How to use 'Tailwind with Styled Components'?
Advanced

Use the 'twin.macro' library which allows 'tw`flex p-4`' syntax inside styled components.

Detailed Insights

Use the 'twin.macro' library which allows 'tw`flex p-4`' syntax inside styled components.

Module: advanced
#198
What is 'Tailwind CSS v3.3' major feature?
Advanced

Extended color palette (950 level), ESM/TypeScript config support, and line-clamp in core.

Detailed Insights

Extended color palette (950 level), ESM/TypeScript config support, and line-clamp in core.

Module: advanced
#199
How to 'Lint' Tailwind CSS?
Experience

Use 'eslint-plugin-tailwindcss' to catch typos and enforce best practices.

Detailed Insights

Use 'eslint-plugin-tailwindcss' to catch typos and enforce best practices.

Module: advanced
#200
Explain 'Responsive Hover' problem.
Advanced

On touch devices, 'hover' styles can stick. Modern Tailwind supports 'hover:can-hover:...' to only apply on mouse devices.

Detailed Insights

On touch devices, 'hover' styles can stick. Modern Tailwind supports 'hover:can-hover:...' to only apply on mouse devices.

Module: advanced

The Utility Standard

Get weekly Tailwind tips and tricks delivered straight to your inbox.