Challenge - 5 Problems
Tailwind JIT Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
How does Tailwind JIT mode generate styles?
Tailwind CSS uses JIT mode to create styles. What best describes how it works?
Attempts:
2 left
💡 Hint
Think about how Tailwind avoids creating unused CSS.
✗ Incorrect
JIT mode scans your files and generates CSS only for the classes you actually use. This makes the CSS file smaller and faster.
📝 Syntax
intermediate2:00remaining
Which Tailwind config enables JIT mode?
You want to enable JIT mode in Tailwind CSS. Which config snippet is correct?
Attempts:
2 left
💡 Hint
Look for the correct property name and value to enable JIT.
✗ Incorrect
To enable JIT mode, you set mode: 'jit' in the Tailwind config and specify the content files.
❓ rendering
advanced2:00remaining
What is the rendered output of this Tailwind JIT example?
Given this HTML snippet using Tailwind classes with JIT mode enabled, what CSS color will the text have?
Tailwind
<p class="text-red-500 hover:text-blue-700">Hello World</p>Attempts:
2 left
💡 Hint
Think about how Tailwind generates hover styles on demand.
✗ Incorrect
Tailwind JIT generates styles for text-red-500 and hover:text-blue-700. So the text is red normally and blue on hover.
❓ selector
advanced2:00remaining
Which Tailwind class triggers JIT to generate a 3rem margin?
You want to add a margin of 3rem using Tailwind JIT. Which class name will generate this margin?
Attempts:
2 left
💡 Hint
Tailwind spacing scale uses multiples of 0.25rem. Calculate 3rem in this scale.
✗ Incorrect
Tailwind spacing scale: 1 = 0.25rem, so 12 × 0.25rem = 3rem. Therefore, m-12 sets margin to 3rem.
❓ accessibility
expert3:00remaining
How does Tailwind JIT help maintain accessibility with dynamic classes?
When using Tailwind JIT with dynamic class names (e.g.,
text-${color}-500), what must you do to ensure accessibility and correct CSS generation?Attempts:
2 left
💡 Hint
Think about how JIT scans files to find classes.
✗ Incorrect
Tailwind JIT scans your files for class names. Dynamic classes must be listed or included in safelist to generate CSS, ensuring styles and accessibility features are present.