I try to customize Keystonejs Admin UI theme: change primary colors, etc.
So I'm going to override keystone.less which is located in node_modules:
.
|____node_modules
| |____keystone
| | |____public
| | | |____styles
| | | | |____keystone.less
|____public
| |____styles
| | |____keystone.less // This will overwrite the UI
New keystone.less content:
// Elemental
// ------------------------------
@import "@{elementalPath}/less/elemental.less";
// KEYSTONE VARIABLES
@import "../../node_modules/keystone/admin/public/styles/variables.less";
// KEYSTONE AUTH
@import "../../node_modules/keystone/admin/public/styles/auth.less";
// KEYSTONE SETUP
@import "../../node_modules/keystone/admin/public/styles/keystone/animation.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/base.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/dashboard.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/forms.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/navigation.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/tables.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/utils.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/list.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/list-dropzone.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/item.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/toolbar.less";
// COMPONENTS
@import "../../node_modules/keystone/admin/public/styles/keystone/wysiwyg.less";
@import "../../node_modules/keystone/admin/public/styles/keystone/popout.less";
// REACT FIELDS
@import "../../node_modules/keystone/admin/public/styles/react/react.less";
@gray-base: #000;
@gray-darker: lighten(@gray-base, 13.5%); // #222
@gray-dark: lighten(@gray-base, 20%); // #333
@gray: lighten(@gray-base, 33.5%); // #555
@gray-light: lighten(@gray-base, 46.7%); // #777
@gray-lighter: lighten(@gray-base, 93.5%); // #eee
@brand-primary: darken(#d326f6, 6.5%); // #337ab7
@brand-success: #5cb85c;
@brand-info: #d326f6;
@brand-warning: #f0ad4e;
@brand-danger: #d9534f;
@navbar-default-color: green;
.primary-navbar {
background-color: #d326f6;
color: #d326f6;
padding-bottom: .5em;
padding-top: .5em;
}
I added less dependency in package.json:
"less": "2.7.2"
As described in doc:
If you want Keystone to automatically compile .less files into .css files, set this value to the same path as the static option. When this option is set, any requests to a .css or .min.css file will first check for a .less file with the same name, and if one is found, the css file will be generated.
So I added option to keystone.init:
'less': ['public', 'public-app'],
But when I build and deploy application I cannot see any changes in keystone.min.css
No changes in styles.
What have I missed?