Like if we wanted to know the padding of an element, classically we’d do:
var el = document.querySelector(“#thing");
var style = window.getComputedStyle(el);
And we’d get "20px" as a string or whatever it is.
One of these new API’s lets us pull it off like this:…
The post Working With the new CSS Typed Object Model appeared first on CSS-Tricks.