Skip to main content

setDOMStyleObject

function

Applies a style object to a DOM style declaration using `CSSStyleDeclaration.setProperty()`. Property names are expected to be kebab-case, such as `font-size`, and values are expected to include explicit units where needed, such as `12px`.

function setDOMStyleObject(domStyle: CSSStyleDeclaration, styleObject: Record<string, string | null | undefined>): void

Import

import { setDOMStyleObject } from '@modular/sdk/editor';