formatMarginStylesVar
Commons
stable
Build an array of CSS margin declarations from a 1- or 4-value shorthand array, using logical block/inline properties (margin-block-start, etc.).
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- valuesrequiredArray<string>
- 1 value → all sides (margin shorthand), 4 values → block-start, inline-end, block-end, inline-start (CSS logical order).
API
Return value
The value returned by this util.
- Array of CSS declaration strings ready to be injected as inline style entries.
Usage
Examples
Ready-to-paste usage snippets.
Generate margin declarations