A. A medium-sized outer shadow with padding around the content
B. A medium-sized inner shadow inside the element with padding
C. No shadow visible because inner and outer shadows cancel out
D. A large outer shadow with no padding
Solution
Step 1: Analyze the classes shadow-inner and shadow-md
shadow-inner adds an inner shadow inside the element. shadow-md adds a medium outer shadow. Since shadow-md comes after shadow-inner in the class attribute, Tailwind applies it later and it overrides the box-shadow property, resulting in a medium outer shadow.
Step 2: Consider padding and shadow layering
The p-4 adds padding inside the element around the content.
Final Answer:
A medium-sized outer shadow with padding around the content -> Option A
Quick Check:
shadow-md overrides as last shadow class [OK]
Hint: Last shadow class in class attribute wins [OK]
Common Mistakes:
Assuming both inner and outer shadows show simultaneously
Ignoring padding effect on shadow placement
Thinking shadows cancel each other out
4. You want to add a small shadow around a button but accidentally use shadow-inner instead of shadow-sm. What is the main visual difference?
medium
A. The button will have a small outer shadow as intended
B. The button will have a shadow inside its edges, not outside
C. No shadow will appear on the button
D. The button's shadow will be very large and blurry
Solution
Step 1: Understand shadow-inner vs shadow-sm
shadow-inner adds a shadow inside the element edges, creating an inset effect. shadow-sm adds a small outer shadow around the element.
Step 2: Identify the visual impact of using shadow-inner
Using shadow-inner instead of shadow-sm means the shadow appears inside the button edges, not outside, changing the intended look.
Final Answer:
The button will have a shadow inside its edges, not outside -> Option B
Quick Check:
shadow-inner = inside shadow, not outside [OK]
Hint: shadow-inner means inside shadow, not outside [OK]
Common Mistakes:
Thinking shadow-inner adds outer shadow
Expecting no shadow to appear
Confusing shadow sizes with shadow placement
5. You want a card with a subtle shadow that disappears on small screens but appears on medium and larger screens. Which Tailwind classes achieve this?
hard
A. shadow-sm md:shadow-none
B. shadow-md sm:shadow-none
C. shadow-inner md:shadow-lg
D. shadow-none md:shadow-sm
Solution
Step 1: Understand responsive prefixes in Tailwind
Classes prefixed with md: apply at medium screen sizes and above. Without prefix, classes apply to all screen sizes.
Step 2: Identify the correct class combination
shadow-none md:shadow-sm means no shadow on small screens, and a small shadow starting at medium screens. This matches the requirement.
Step 3: Check other options
shadow-sm md:shadow-none reverses the logic, showing shadow on small screens and none on medium. shadow-md sm:shadow-none uses sm: which applies at small screens, not medium. shadow-inner md:shadow-lg uses shadow-inner and large shadow which is not subtle.
Final Answer:
shadow-none md:shadow-sm -> Option D
Quick Check:
Use shadow-none then md:shadow-sm for responsive shadows [OK]
Hint: Use shadow-none then md:shadow-sm for responsive shadows [OK]
Common Mistakes:
Mixing up responsive prefixes like sm: and md:
Applying shadow classes in wrong order
Using inner shadows instead of outer for subtle effect