1 | import { Color } from '../../color';
|
2 | import { parseCSSShorthand } from './css-utils';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export function parseCSSShadow(value) {
|
12 | const data = parseCSSShorthand(value);
|
13 | if (!data) {
|
14 | return null;
|
15 | }
|
16 | const [offsetX, offsetY, blurRadius, spreadRadius] = data.values;
|
17 | return {
|
18 | inset: data.inset,
|
19 | offsetX: offsetX,
|
20 | offsetY: offsetY,
|
21 | blurRadius: blurRadius,
|
22 | spreadRadius: spreadRadius,
|
23 | color: data.color ? new Color(data.color) : undefined,
|
24 | };
|
25 | }
|
26 |
|
\ | No newline at end of file |