setStyles
setStyles(
element,styles):void
Defined in: core/dom/styles.ts:90
Sets inline styles on an element.
Properties are DOM names, in camelCase: marginLeft, not margin-left. They are
assigned to element.style as they are. (style.setProperty needs hyphenated names
and silently ignores camelCase ones.)
Parameters
Section titled “Parameters”element
Section titled “element”HTMLElement
Element to style.
styles
Section titled “styles”Property names and values.
Returns
Section titled “Returns”void
Example
Section titled “Example”setStyles(tooltip, { top: '20px', marginLeft: '5px' });setStyles(tooltip, { marginLeft: null }); // clears it