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
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- valuesrequisArray<string>
- Shorthand values. 1 value → all sides, 2 values → block + inline, 4 values → start/end per axis.
- typerequisstring
- The border sub-property to target: 'width', 'color', or 'style'.
API
Valeur de retour
La valeur retournée par cet util.
- Array of CSS declaration strings ready to be injected as inline style entries.
Usage
Exemples
Extraits de code prêts à coller.
Generate border-width declarations