~/lightning

CSS Custom Properties

Lightningat SmashingConf Live 2020 · 2020-08-20..08-21· [css, web-platform]
slides:none on file

Shows how CSS custom properties act as live, updatable variables used for theming, layout and animation: implements dark mode by redefining five root variables with prefers-color-scheme, builds a 24‑column grid driven by a --cols property, computes complementary HSL colors by adding 180°, and positions/animates text and elements along an offset-path using per‑element index variables. Demos use JavaScript via element.style.setProperty, the library splitting.js, Houdini-registered properties for smooth gradient transitions, and a working zigzag generator and Fibonacci layout. IE11 requires polyfills.

AI-written summary · about

  1. 0:00Introduction
  2. 1:04What are custom properties
  3. 4:13Dynamic nature of custom properties
  4. 6:16Dark mode with custom properties
  5. 7:40Vertical rhythm and spacing
  6. 9:51HSL color theming
  7. 11:37Relative custom properties
  8. 13:03Scoped custom properties
  9. 14:51Custom properties with CSS Grid
  10. 16:17Feature queries and support
  11. 16:39Staggered animations
  12. 17:44Progress visualization
  13. 19:09Text animations
  14. 20:53CSS Motion Path basics
  15. 22:19Positioning elements on paths
  16. 24:25Advanced motion path demos
  17. 25:30JavaScript manipulation of properties
  18. 27:15Inspiration and resources
  19. 27:56Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.