Hello,
When I change the primary color of the creator theme, nothing seems to happen but when I change the individual elements (commented out lines) it works well.
Codecreator.applyCreatorTheme({
...themes.DefaultLight,
cssVariables: {
...themes.DefaultLight.cssVariables,
// "--ctr-toolbox-item-icon-color": color,
// "--ctr-button-text-color": color,
// "--sjs-special-background": color + "04",
// "--ctr-list-item-icon-color": color,
// "--ctr-menu-item-border-color-selected": color,
// "--ctr-page-banner-background-color": color + "a5",
"--sjs-primary-backcolor": color,
"--primary": color,
},
});
Hello,
A new creator theme doesn't include a primary variable. You can review a list of theme variables at predefined-themes/default/light.css.
Please elaborate on your goal so that I can assist you further.
Thanks
Hello Jane,
My goal is to replace the green color globally across the creator without having to override each of the individual color classes. Inspecting the elements led me to the primary css classes i mentioned.
Is there a way to do override the color?
Hello,
Thank you for the clarification.
Please try to update the following CSS variables:
const color = "rgba(255, 182, 193, 1)"; const colorLight = "rgba(255, 220, 230, 0.3)"; creator.applyCreatorTheme({ ...SurveyCreatorTheme.DefaultLight, cssVariables: { ...SurveyCreatorTheme.DefaultLight.cssVariables, "--sjs-primary-background-500": color, "--sjs-primary-background-400": color, "--sjs-secondary-background-500": color, "--sjs-semantic-green-background-500": color, "--sjs-secondary-background-25": color, "--sjs-special-background": colorLight }, });
Let me know if it works for you.