For example, we need to access body
's padding-right
let el = document.querySelector('body');
let style = window.getComputedStyle(el);
Thanks to this explanations, it's clear that it could be safely done by:
style.paddingRight
or
style.getPropertyValue('padding-right')
But, it seems that this also works fine:
style['padding-right']
Is there are any differences? Thx