~/talk

Supporting Old Browsers in CSS-in-JS via AST Transformations

TalkinRussianat PiterJS conf 2019 · on Saturday, 2019-09-07· [javascript, web-platform]
links:none on file
slides:none on file

The talk describes building a custom Babel plugin to add backward compatibility for CSS variables used with styled-components so older browsers (especially IE11) get fallback properties automatically. It explains working with JavaScript AST transformations to detect styled-components CSS and inject or generate the necessary fallback CSS instead of doing it manually.

AI-written summary · about

  1. 0:00Introduction
  2. 0:27Speaker context
  3. 1:08Old browser support problem
  4. 2:13AST as solution tool
  5. 3:38What is AST and how to use
  6. 10:10Finding CSS variables in AST
  7. 10:32Babel plugin solution
  8. 12:40How Babel plugins work
  9. 13:45Visitors in Babel plugins
  10. 17:37Plugin task setup
  11. 18:41Building CSS variable map
  12. 21:33Finding variables in styled-components
  13. 26:29Transforming variables in AST
  14. 29:37transformElement function
  15. 36:44Plugin testing
  16. 37:48Summary and recommendations
  17. 38:56Q&A
~/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.