4 ms·
I don't understand that use case. If you're happy using a JS value to update a style, what's wrong with just updating the style in JS? If you're concerned about
by onion2k 11y ago
I don't understand that use case. If you're happy using a JS value to update a style, what's wrong with just updating the style in JS? If you're concerned about performance then you can obviously do things like debouncing anything that changes the style, or you could use a MediaQueryListListener to fire an event your JS listens to when a user crosses over a media query breakpoint.
While it'll be fun to manipulate CSS properties using JS values, it doesn't seem necessary.
- philh 11y agoIt seems like this would let you update lots of styles simultaneously, without having to keep track of exactly which styles they are.