Function
getRawDeclarationValue
(
css: string,
declaration: csstree.Declaration
)
Source from the content-addressed store, hash-verified
| 640 | }; |
| 641 | |
| 642 | const getRawDeclarationValue = ( |
| 643 | css: string, |
| 644 | declaration: csstree.Declaration |
| 645 | ) => { |
| 646 | const loc = declaration.value.loc; |
| 647 | if (loc === null) { |
| 648 | return; |
| 649 | } |
| 650 | return css.slice(loc.start.offset, loc.end.offset).trim(); |
| 651 | }; |
| 652 | |
| 653 | const normalizeCustomPropertyValue = (value: string) => { |
| 654 | if (value === "") { |
Tested by
no test coverage detected