Home
Bookmarks
Leagues
LEARN
Courses
Career Paths
Assessments
Tutorials
Arcade
Glossary
GROW
Certifications
Log in
Glossary
Log inSign up
Courses/UX Design Foundations/Intro to Shadows/
Exercise #2

Deconstructing CSS Box-Shadow Properties

In CSS and design tooling, box-shadow is defined by five parameters:

box-shadow: <x-offset> <y-offset> <blur-radius> <spread-radius> <color>;
  1. X-Offset: Horizontal displacement (typically 0px in UI to preserve centered lighting).
  2. Y-Offset: Vertical displacement. Higher values indicate higher elevation above the canvas.
  3. Blur Radius: How softly the shadow feathers out. Higher elevation equals a larger, softer blur.
  4. Spread Radius: Expands or contracts the shadow footprint before blurring. Negative spread helps keep deep shadows from looking unnaturally oversized.
  5. Color & Alpha: Must always use transparent alpha channels (rgba(0,0,0, 0.08)), never opaque grays.

Topics

The Physics of Light: Virtual Sunlight & Ambient Occlusion
Deconstructing CSS Box-Shadow Properties
Layered Shadows: Avoiding the Muddy Black Anti-Pattern
Elevation Hierarchy and Design System Tokens
Shadows in Dark Mode: Tonal Elevation vs. Opacity
Cognitive Affordance: Communicating Interactivity and Drag States
design
UX Design

From lesson

11

Intro to Shadows

Level 3 · Elements of Design II

Top contributors

Community contribution details will appear here once real learner activity is available.

Share