CSSStyleDeclaration
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
// ⭐️ style.prop(propName[,val])
//
// get:
// • style.paddingLeft // get DOM style prop
// • style.prop('padding-left') // get CSS prop ⭐️
// • style.prop('--css-var') // get CSS var ⭐️
//
// set:
// • style.prop('padding-left', '8px') // set CSS prop ⭐️
// • style.prop('--css-var', '4px') // set CSS var ⭐️
// • style.paddingLeft = '8px' // set DOM style prop
CSSStyleDeclaration.prototype