WebCraft

TAG · surface

Surfaces in CSS: shadows, colour and glass

Layered shadows, drop shadows, frosted glass, colour mixing and dark mode tokens, each rendered live. 10 elements, each rendered live with its source and the one thing that breaks it.

  1. A clip path that can be animated clip-path: shape()
  2. Corners that are not arcs corner-shape
  3. A shadow that knows the shape filter: drop-shadow()
  4. Four faint shadows beat one dark one box-shadow ×4
  5. Five colours out of one token oklch(from …)
  6. The same two colours, mixed two ways color-mix()
  7. Type that inverts itself over anything mix-blend-mode: difference
  8. One declaration that covers both themes light-dark()
  9. A gradient border that keeps its corners background + padding
  10. Frosted glass over anything backdrop-filter