0
0
Tailwindmarkup~10 mins

Drop shadow on irregular shapes in Tailwind - Browser Rendering Trace

Choose your learning style9 modes available
Render Flow - Drop shadow on irregular shapes
Read HTML element
Apply Tailwind classes
Parse shadow utilities
Calculate shape boundaries
Render drop shadow following shape edges
Composite shadow with element
The browser reads the HTML and Tailwind classes, calculates the shape's edges including irregular borders or clip paths, then renders the drop shadow following those edges before compositing the final image.
Render Steps - 3 Steps
Code Added:<div class="w-40 h-40 bg-blue-500"></div>
Before


[__________]
[          ]
[          ]
[__________]

(empty space, no shape)
After


[██████████]
[██████████]
[██████████]
[██████████]

A solid blue square block
Adding a div with width and height 10rem and blue background creates a solid square shape.
🔧 Browser Action:Creates DOM node and paints a blue rectangle
Code Sample
A blue circle with a large drop shadow that follows the circle's curved edges.
Tailwind
<div class="w-40 h-40 bg-blue-500 rounded-full shadow-lg"></div>
Render Quiz - 3 Questions
Test your understanding
After applying step 2 (rounded-full), what shape do you see?
AA perfect circle with smooth edges
BA square with sharp corners
CA rectangle with rounded corners
DAn ellipse with uneven edges
Common Confusions - 2 Topics
Why does the shadow not look circular even though I used rounded-full?
If the element's width and height are not equal, rounded-full creates an ellipse, so the shadow follows that ellipse shape, not a perfect circle. See render_steps 2.
💡 Ensure width and height are equal for a perfect circle shape and shadow.
Why does the shadow appear clipped or cut off?
The container or parent element might have overflow hidden or insufficient space, clipping the shadow outside the element's box. Shadows extend beyond the element's edges. See render_steps 3.
💡 Allow enough space around the element or avoid overflow:hidden on parents.
Property Reference
PropertyValue AppliedEffect on ShadowCommon Use
shadow-smsmall shadowCreates a subtle shadow with small blurLight depth effect
shadowdefault shadowAdds moderate shadow with blur and offsetStandard shadow for elevation
shadow-lglarge shadowCreates a bigger, softer shadow with more blurStrong depth and focus
rounded-fullfull border radiusShapes element as circle or ellipse, shadow follows curveCircular buttons or avatars
rounded-noneno border radiusSharp corners, shadow follows square edgesBoxes and cards
Concept Snapshot
Drop shadows in Tailwind use shadow utilities like shadow-lg for size. Rounded-full makes shapes circular, so shadows follow curved edges. Shadows extend beyond element edges; parent overflow can clip them. Equal width and height ensure perfect circle shape and shadow. Use shadow classes to add depth and focus visually.