Skip to content

Commit

Permalink
💬 Change behaviour of namedColor to only allow LWT color names
Browse files Browse the repository at this point in the history
  • Loading branch information
kierandrewett committed Dec 28, 2023
1 parent 2d2341e commit dcbb03d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ export const BrowserCustomizableAttributePrimitives = {
return `var(--${value})`;
}

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

/**
Expand Down

0 comments on commit dcbb03d

Please sign in to comment.