0
0
Tailwindmarkup~5 mins

Flex basis and sizing in Tailwind - Cheat Sheet & Quick Revision

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

flex-basis sets the initial main size of a flex item before free space is distributed. It defines the starting width or height depending on flex direction.

Click to reveal answer
beginner
How do you set flex-basis to 50% using Tailwind CSS?

Use the class basis-1/2 to set flex-basis to 50% of the parent's size.

Click to reveal answer
intermediate
What is the difference between flex-grow and flex-basis?

flex-basis sets the starting size of a flex item.<br>flex-grow controls how much the item can grow to fill extra space.

Click to reveal answer
beginner
Which Tailwind class sets <code>flex-basis</code> to <code>auto</code>?

The class basis-auto sets flex-basis to auto, meaning the item sizes based on its content.

Click to reveal answer
intermediate
If you want a flex item to never shrink smaller than 100px, which Tailwind class helps with sizing?

Use min-w-[100px] to set a minimum width of 100 pixels, preventing the item from shrinking below that size.

Click to reveal answer
Which Tailwind class sets flex-basis to 25%?
Abasis-1/4
Bbasis-1/2
Cbasis-1/3
Dbasis-auto
What does basis-auto do in Tailwind CSS?
ASets flex-basis to auto, sizing by content
BSets flex-basis to 0
CSets flex-grow to 1
DSets flex-shrink to 0
If a flex item has basis-1/2 and grow, what happens when extra space is available?
AIt stays at 50% width
BIt shrinks below 50%
CIt grows larger than 50%
DIt disappears
Which property controls the minimum size a flex item can shrink to?
Aflex-basis
Bmin-width or min-height
Cflex-grow
Dflex-shrink
What is the default value of flex-basis if not set?
A0
B100%
Cnone
Dauto
Explain how flex-basis works in a flex container and how Tailwind CSS helps set it.
Think about the starting size of a flex item before it grows or shrinks.
You got /4 concepts.
    Describe how you can control the minimum size of a flex item using Tailwind CSS.
    Minimum size is not flex-basis but a separate CSS property.
    You got /3 concepts.