DiviArea.Utils.getStyleDef()

DiviArea.Utils.getStyleDef(element, prop, ignore)

Returns the defined CSS value for the given property of an element.

This defined style is not resloved, i.e., it will return “auto” instead of a specific value (like “262px”) when the CSS rule is set to “auto”.

Params

element HTMLElement|string, required
An HTMLElement, or an Area ID.
prop string, required
The CSS property to find, e.g. “padding-left”.
ignore array, required
List of CSS selectors to ignore, e.g. [".et_pb_section"].

Returns

A string with the style definition, or an empty string when the style is not defined.

Notes

No notes

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Get in touch with us