Skip to content

Commit dcbb03d

Browse files
committed
💬 Change behaviour of namedColor to only allow LWT color names
1 parent 2d2341e commit dcbb03d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎components/customizableui/BrowserCustomizableAttributePrimitives.sys.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ export const BrowserCustomizableAttributePrimitives = {
152152
return `var(--${value})`;
153153
}
154154

155-
return BrowserCustomizableAttributePrimitives.color(attribute)(value);
155+
throw new Error(
156+
`Attribute '${attribute}' does not use a valid or supported named color, got '${value}'.`
157+
);
156158
},
157159

158160
/**

0 commit comments

Comments
 (0)