A. Missing underscores between row heights inside brackets.
B. Using square brackets is not allowed in Tailwind.
C. The grid class is missing.
D. The gap class is required with grid-rows.
Solution
Step 1: Check custom row heights syntax
Custom heights inside square brackets must use underscores (_) to separate values, not spaces.
Step 2: Identify the error
The code uses spaces instead of underscores between 100px, 200px, and auto, causing invalid syntax.
Final Answer:
Missing underscores between row heights inside brackets. -> Option A
Quick Check:
Use underscores in grid-rows-[...] [OK]
Hint: Use underscores, not spaces, inside square brackets [OK]
Common Mistakes:
Using spaces instead of underscores
Forgetting to add grid class
Thinking gap is mandatory
5. You want a grid with 3 rows where the first row is 150px tall, the second row is twice as tall as the first, and the third row fills the remaining space. Which Tailwind class correctly defines these rows?
hard
A. grid-rows-[150px_150px_1fr]
B. grid-rows-[150px_300px_1fr]
C. grid-rows-[150px_2fr_auto]
D. grid-rows-[150px_300px_auto]
Solution
Step 1: Translate requirements to CSS grid units
The first row is 150px, the second row twice that is 300px, and the third fills remaining space using fractional unit.
Step 2: Match Tailwind syntax
Tailwind allows custom row heights with grid-rows-[...] using underscores. The third row uses 1fr to fill leftover space.
Step 3: Check options
grid-rows-[150px_300px_1fr] matches exactly: 150px_300px_1fr. grid-rows-[150px_300px_auto] uses auto which doesn't fill remaining space. grid-rows-[150px_2fr_auto] uses 2fr incorrectly for second row. grid-rows-[150px_150px_1fr] has equal second row height.
Final Answer:
grid-rows-[150px_300px_1fr] -> Option B
Quick Check:
Use fixed px and fr units for flexible rows [OK]
Hint: Use px for fixed, fr for flexible row heights [OK]
Common Mistakes:
Using auto instead of fr for flexible space
Wrong units for double height
Mixing fr and px incorrectly
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.