-
Notifications
You must be signed in to change notification settings - Fork 71
Swatches
Teya Veselinova edited this page Apr 14, 2022
·
7 revisions
With the introduction of Kendo UI Theme Tasks (on NPM and on GitHub), you now have the option to create color variants of the themes (swatches).
A swatch is a set of variables which customizes the appearance of the theme and is useful when creating multiple, persistent theme variations. Each theme may contain multiple swatches.
Each swatch is placed in a separate JSON config file in packages/<THEME_NAME>/lib/swatches
folder and is defined by the kendo-swatch json schema part of our kendo-theme-tasks package.
- Clone the kendo-themes GitHub repository.
- Install the node-gyp package.
- Install the dependencies for all themes with
npm install && npm run bootstrap
.
-
From the root of the repository run
npm run sass:swatches
-
Include one of the compiled CSS swatch files(
packages/<THEME_NAME>/dist/SWATCH_NAME.css
) in your project.
- Create a new
<THEME_NAME>-<SWATCH_NAME>.json
file in thepackages/<THEME_NAME>/lib/swatches
folder. - Follow the already existing
(<THEME_NAME>-main.json
schema for customizing the variables- e.g default-main.json swatch - Run
npm run sass:swatches
task from the root of the repository. - Include one of the compiled CSS swatch files(
packages/<THEME_NAME>/dist/SWATCH_NAME.css
) in your project.