Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is a drop shadow in web design?
A drop shadow is a visual effect that adds a shadow behind an element to create depth and make it stand out from the background.
Click to reveal answer
beginner
How do you apply a basic drop shadow using Tailwind CSS?
Use the shadow utility class, for example: <div class="shadow">Content</div> adds a default drop shadow.
Click to reveal answer
intermediate
Why are drop shadows tricky on irregular shapes?
Because drop shadows follow the shape's bounding box by default, not the actual shape edges, so shadows may appear as rectangles or squares around irregular shapes.
Click to reveal answer
intermediate
How can you create a drop shadow that follows an irregular shape in Tailwind CSS?
Use filter drop-shadow utilities combined with transparent backgrounds or SVG shapes. The drop-shadow filter applies shadow based on the visible shape edges, not the bounding box.
Click to reveal answer
intermediate
What role does the filter drop-shadow utility play compared to the shadow utility in Tailwind?
shadow adds a shadow to the element's box, while filter drop-shadow applies a shadow to the visible pixels of the element, which is better for irregular shapes.
Click to reveal answer
Which Tailwind class adds a basic drop shadow to an element's bounding box?
Ashadow
Bdrop-shadow
Cfilter
Dshadow-box
✗ Incorrect
The shadow class adds a shadow to the element's bounding box.
Which Tailwind utility applies a shadow based on the visible shape edges, ideal for irregular shapes?
Ashadow-inner
Bshadow
Cshadow-lg
Ddrop-shadow
✗ Incorrect
The drop-shadow filter applies shadow based on the visible pixels, perfect for irregular shapes.
Why might a drop shadow look like a rectangle around an irregular shape when using the shadow class?
ABecause the element has no background
BBecause the shadow color is wrong
CBecause the shadow follows the element's bounding box, not the shape edges
DBecause the shadow is disabled by default
✗ Incorrect
The shadow class shadows the bounding box, which is rectangular even if the shape is irregular.
Which CSS property does Tailwind's drop-shadow utility use under the hood?
Afilter: drop-shadow()
Bbackground-shadow
Ctext-shadow
Dbox-shadow
✗ Incorrect
Tailwind's drop-shadow uses the CSS filter: drop-shadow() property.
To create a drop shadow on an SVG irregular shape using Tailwind, which utility is best?
Ashadow
Bdrop-shadow
Cshadow-md
Dshadow-none
✗ Incorrect
The drop-shadow filter works well with SVG shapes to follow their edges.
Explain how drop shadows behave differently on regular rectangular shapes versus irregular shapes in Tailwind CSS.
Think about how the shadow follows the shape's outline.
You got /3 concepts.
Describe how you would add a drop shadow to an irregular shape using Tailwind CSS and why you would choose that method.
Consider the difference between box-shadow and filter drop-shadow.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of using a drop shadow on irregular shapes in Tailwind CSS?
easy
A. To add depth and make the shape stand out visually
B. To change the shape's color
C. To make the shape larger
D. To remove the shape's border
Solution
Step 1: Understand drop shadow effect
Drop shadows create a shadow behind an element, giving it a sense of depth.
Step 2: Apply to irregular shapes
Using drop shadows on irregular shapes helps them visually pop from the background.
Final Answer:
To add depth and make the shape stand out visually -> Option A
Quick Check:
Drop shadow purpose = add depth [OK]
Hint: Drop shadows make shapes look lifted and clear [OK]
Common Mistakes:
Thinking drop shadows change color
Confusing drop shadows with resizing
Assuming drop shadows remove borders
2. Which Tailwind CSS class correctly applies a custom drop shadow with a blur radius of 5px and offset of 3px 3px?
easy
A. drop-shadow-3-3-5
B. shadow-3px-3px-5px
C. shadow-custom(3px,3px,5px)
D. shadow-[drop-shadow(3px_3px_5px_rgba(0,0,0,0.5))]
Solution
Step 1: Recognize Tailwind custom shadow syntax
Tailwind uses square brackets for custom CSS values, e.g., shadow-[drop-shadow(...)]
Step 2: Match the correct CSS drop-shadow format
The correct CSS function is drop-shadow(offsetX offsetY blurRadius color), here 3px 3px 5px rgba(0,0,0,0.5)
Final Answer:
shadow-[drop-shadow(3px_3px_5px_rgba(0,0,0,0.5))] -> Option D
Quick Check:
Custom drop shadow syntax = shadow-[drop-shadow(...)] [OK]
Hint: Use square brackets with drop-shadow(...) inside shadow- class [OK]
B. A blue diamond shape with a soft shadow offset to bottom-right
C. A blue circle with a sharp shadow
D. A blue triangle with a shadow on top-left
Solution
Step 1: Analyze clip-path polygon points
The polygon points create a diamond shape by connecting top, right, bottom, and left midpoints.
Step 2: Understand drop shadow parameters
The drop shadow is offset 4px right and 4px down with a 6px blur and semi-transparent black color, creating a soft shadow bottom-right.
Final Answer:
A blue diamond shape with a soft shadow offset to bottom-right -> Option B
Quick Check:
clip-path diamond + drop shadow offset = diamond with shadow [OK]
Hint: Polygon points define shape; drop-shadow offsets shadow direction [OK]
Common Mistakes:
Ignoring clip-path shape and expecting a square
Confusing shadow offset direction
Assuming circle shape from polygon
4. You wrote this Tailwind class for an irregular shape shadow: shadow-[drop-shadow(5px 5px 10px rgba(0,0,0,0.3))] But the shadow does not appear. What is the likely issue?
medium
A. Spaces inside square brackets should be replaced with underscores
B. The rgba color is invalid
C. Drop shadow does not work with clip-path
D. The shadow class must be placed on a parent element
Solution
Step 1: Check Tailwind custom class syntax
Tailwind requires no spaces inside square brackets for custom values; spaces must be replaced with underscores.
Step 2: Confirm correct syntax for drop-shadow
Correct syntax is shadow-[drop-shadow(5px_5px_10px_rgba(0,0,0,0.3))] with underscores instead of spaces.
Final Answer:
Spaces inside square brackets should be replaced with underscores -> Option A
Quick Check:
Custom class spaces = underscores [OK]
Hint: Replace spaces with underscores inside custom bracket classes [OK]
Common Mistakes:
Leaving spaces inside square brackets
Assuming rgba color is wrong
Thinking drop shadow can't be used with clip-path
5. You want to create a star shape with a drop shadow using Tailwind CSS. Which combination of classes correctly applies a star clip-path and a subtle drop shadow offset to the bottom-right?
hard
A. clip-path-star shadow-[drop-shadow(4px_4px_10px_rgba(0,0,0,0.5))]
B. clip-star shadow-drop(2px_2px_4px_rgba(0,0,0,0.25))
C. clip-path-[polygon(50%_0%,61%_35%,98%_35%,68%_57%,79%_91%,50%_70%,21%_91%,32%_57%,2%_35%,39%_35%)] shadow-[drop-shadow(2px_2px_4px_rgba(0,0,0,0.25))]
D. clip-polygon-star shadow-[drop-shadow(0_0_0_rgba(0,0,0,0))]
Solution
Step 1: Identify correct clip-path polygon for star
The polygon points in clip-path-[polygon(50%_0%,61%_35%,98%_35%,68%_57%,79%_91%,50%_70%,21%_91%,32%_57%,2%_35%,39%_35%)] shadow-[drop-shadow(2px_2px_4px_rgba(0,0,0,0.25))] define a star shape using percentages and underscores for spaces.
Step 2: Check drop shadow syntax and subtlety
clip-path-[polygon(50%_0%,61%_35%,98%_35%,68%_57%,79%_91%,50%_70%,21%_91%,32%_57%,2%_35%,39%_35%)] shadow-[drop-shadow(2px_2px_4px_rgba(0,0,0,0.25))] uses shadow-[drop-shadow(2px_2px_4px_rgba(0,0,0,0.25))], a subtle shadow offset bottom-right with correct syntax.
Final Answer:
clip-path-polygon star with subtle drop shadow using underscores -> Option C
Quick Check:
Star shape + correct drop shadow syntax = clip-path-[polygon(50%_0%,61%_35%,98%_35%,68%_57%,79%_91%,50%_70%,21%_91%,32%_57%,2%_35%,39%_35%)] shadow-[drop-shadow(2px_2px_4px_rgba(0,0,0,0.25))] [OK]
Hint: Use polygon points with underscores and subtle rgba shadow [OK]