3 ms·
I'm not quite sure what you're asking about the 'two main problems of CSS' - can you explain more about what's problematic about defining 'local styles' or upda
by err4nt 7y ago
I'm not quite sure what you're asking about the 'two main problems of CSS' - can you explain more about what's problematic about defining 'local styles' or updating styles dynamically?
CSS custom properties, which already do have browser support, are a wonderful example of allowing JS to set values that CSS is able to take and use dynamically - check out libraries like Splitting.js or ScrollMagic for examples of applications of that.
Houdini worklets (pluggable Layout, Paint, Animation worklets) are definitely coming - this is what's currently being worked on as well as the 'Typed Object Model' for CSS where they're tightening the bolts and helping JS become aware of the different values and types inside the CSS language.
Also, when looking at support, keep in mind that as of Jan 15th, Edge will have the same support as Chrome :D