UNPKG

519 BJavaScriptView Raw
1import { Color } from '../../color';
2import { parseCSSShorthand } from './css-utils';
3/**
4 * Parse a string into StrokeCSSValues
5 * https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-stroke
6 * @param value
7 */
8export function parseCSSStroke(value) {
9 const data = parseCSSShorthand(value);
10 if (!data) {
11 return null;
12 }
13 const [width] = data.values;
14 return {
15 width,
16 color: data.color ? new Color(data.color) : undefined,
17 };
18}
19//# sourceMappingURL=css-stroke.js.map
\No newline at end of file