3 ms·
> Another things CSS needs is some way to analyze it from scripts. It's amazing that there is no way to query/modify CSS rules from JS. There is: document.styl
by Izkata 8y ago
> Another things CSS needs is some way to analyze it from scripts. It's amazing that there is no way to query/modify CSS rules from JS.
There is: document.styleSheets
It's existed for years, I remember fiddling with it in 2011 to dynamically change width/height of elements by changing the css rule from javascript.
http://www.javascriptkit.com/dhtmltutors/externalcss3.shtml http://www.javascriptkit.com/dhtmltutors/externalcss3.shtml