0
0
Tailwindmarkup~5 mins

Flex grow and shrink in Tailwind - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does flex-grow do in a flex container?

flex-grow controls how much a flex item will grow relative to the other items when there is extra space in the container.

If set to 1, the item can grow to fill available space. If 0, it won't grow.

Click to reveal answer
beginner
What is the effect of flex-shrink on a flex item?

flex-shrink controls how much a flex item will shrink relative to others when the container is too small.

If set to 1, the item can shrink. If 0, it will not shrink and may cause overflow.

Click to reveal answer
beginner
How do you apply flex-grow and flex-shrink using Tailwind CSS classes?

Use grow for flex-grow: 1; and grow-0 for flex-grow: 0;.

Use shrink for flex-shrink: 1; and shrink-0 for flex-shrink: 0;.

Click to reveal answer
beginner
What happens if all flex items have flex-grow: 1?

All items will grow equally to fill the available space in the flex container.

This means they share extra space evenly.

Click to reveal answer
intermediate
Why might you set flex-shrink: 0 on a flex item?

To prevent the item from shrinking smaller than its content when the container is too small.

This helps keep important content visible and avoids unwanted squishing.

Click to reveal answer
Which Tailwind class makes a flex item grow to fill extra space?
Agrow
Bshrink
Cflex-none
Dflex-auto
What does shrink-0 do in Tailwind CSS?
ARemoves flex behavior
BAllows the item to shrink
CMakes the item grow
DPrevents the item from shrinking
If a flex container has extra space and one item has flex-grow: 2 and another flex-grow: 1, what happens?
ABoth grow equally
BThe first item grows twice as much as the second
COnly the second item grows
DNeither item grows
Which Tailwind class prevents a flex item from growing?
Agrow-0
Bgrow
Cshrink
Dflex-1
Why is controlling flex-shrink important in responsive design?
ATo make items grow bigger on large screens
BTo add margins
CTo control how items shrink on small screens
DTo change text color
Explain how flex-grow and flex-shrink work together in a flex container.
Think about how items behave when the container is bigger or smaller than their total size.
You got /3 concepts.
    Describe how you would use Tailwind classes to make one flex item grow and another not grow or shrink.
    Remember the Tailwind classes for grow and shrink control.
    You got /3 concepts.