Get style property
style.getProperty(prop, options?)
Retrieve the value of a specific css property in a Style object.
Syntax
Parameters
-
prop: StyleProperty - The property to get. See the Style Properties reference for a list of supported properties. -
options: An object that lets you filter properties by breakpoint and/or pseudo-state.
-
BreakpointId: Identifies the responsive breakpoint to get styles for. -
PseudoStateKey: Specifies a CSS pseudo-class to get styles for.
-
Returns
Promise<PropertyMap[p] | Variable | null>
Returns a Promise that resolves to:
- PropertyMap[p] - The value of the provided style property, if one exists.
- A Variable representing the value of the provided style property, if a variable is used as the value of the provided style property.
null- If value doesn’t exist for the provided style property, this method will returnnull.
Example
Designer Ability
Checks for authorization only