In my vite config, I have specified:
wordpressThemeJson({
disableTailwindColors: false,
}),
While this works, my alias colors – the ones I use for semantic meaning – naturally reference the css prop. Therefore, the Wordpress editor doesn’t seem to understand them because they are resolved to a specific tokenized value. The result is a color palette that displays a bunch of black (empty) swatches.
By example:
settings.color.palette: [ {
"name": "Primary",
"slug": "primary",
"color": "var(--color-pink)"
}]
This will return visually as an empty swatch because Wordpress is looking for var:preset|color|pink
In any case, if I choose the empty swatch, it will appear correctly in the content area. So, it’s not like the color value is null.
Is there a workaround to get these swatches to display as intended? Or is this a question for the WP devs?