~/talk

Make the Web Brighter with the CSS Paint API

Talkat FrontEnd Con 2018 · 2018-12-04..12-05· [css, web-platform]
slides:none on file

Explains how to replace images and DOM hacks with small JavaScript paint modules that run on the browser paint stage: author builds paint worklet classes with a paint(context, geometry, props) method, registers them via registerPaint, and loads them with CSS paint(name). Demos include procedural backgrounds (worklet ~800 bytes vs tens of kilobyte JPEGs), ripple buttons that remove extra spans, star ratings, QR-code and chart renderers, JSON-fed bar charts, and animations using requestAnimationFrame and custom property types; works in Chrome 65+ and Safari tech preview with safe fallbacks.

AI-written summary · about

  1. 0:00Start
  2. 3:37CSS Engine Internals
  3. 4:07Polyfill with JS
  4. 5:06Compile-time Polyfill
  5. 9:04CSS Fallback
  6. 9:39How to create Custom Paint?
  7. 10:08Declare a custom paint class
  8. 10:38Register paint
  9. 10:54Load worklet
  10. 11:37Paint Hello World
  11. 12:58CSS Paint + variables
  12. 14:11CSS Paint + arguments
  13. 15:33CSS Paint + alpha
  14. 16:14chrome://flags/#enable-experimental-web-platform-feature
  15. 16:45Generative Backgrounds
  16. 18:02Material Background
  17. 19:21Safe the DOM
  18. 20:31QR Code
  19. 22:28Circle Chart
  20. 22:40Bar Chart
  21. 24:12Request Animation Frame
  22. 25:55Custom Properties Level 2
  23. 29:07Awesome Houdini
~/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.