MCPcopy Create free account
hub / github.com/webstudio-is/webstudio / getRawDeclarationValue

Function getRawDeclarationValue

packages/css-data/src/parse-css.ts:642–651  ·  view source on GitHub ↗
(
  css: string,
  declaration: csstree.Declaration
)

Source from the content-addressed store, hash-verified

640};
641
642const 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
653const normalizeCustomPropertyValue = (value: string) => {
654 if (value === "") {

Callers 2

enterFunction · 0.85
leaveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected