formatBorderStylesVar
Commons
stable
Build an array of CSS border shorthand declarations (border-width, border-color, or border-style) from a 1-, 2-, or 4-value shorthand array, using logical block/inline properties.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- valuesrequiredArray<string>
- Shorthand values. 1 value → all sides, 2 values → block + inline, 4 values → start/end per axis.
- typerequiredstring
- The border sub-property to target: 'width', 'color', or 'style'.
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 border-width declarations