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?
✗ 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?
✗ 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?✗ 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?✗ 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?
✗ 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.