Customizing SCSS
Modify Existing Colorscheme
If you want to modify an existing colorscheme, it's not advised to make changes directly to the SCSS files. In case the templates are updated in the future, your changes won't be retained in the updated files. Instead do this steps:
-
Navigate to
luxize-leather-shop/scss/directory, and then createcolorsheme-modifier.scss -
Choose which colorscheme between
leather-shop,leather-shop-color-2,leather-shop-color-3you want to modify.new-colorscheme.scss -
Let's say you choose
luxize-leather-shop/scss/leather-shop.scss. Now Open (Edit) the file in your IDE/Text Editor. -
At the top of the file, add this line of code:
@import "colorsheme-modifier"; // Variables // // Prefix for :root CSS variables -
Now, you just have to type variable that you want to override inside
colorsheme-modifier.scss. As for example you want to change the$primarycolor then all you need to do is opencolorsheme-modifier.scssand just type this line of code:$primary: #ffcc00 !default; -
On your terminal, run
npm run cssornpm run startto recompile scss files into css.
Creating Colorscheme
-
Navigate to
luxize-leather-shop/scss/and Create new file. For example we named itnew-colorscheme.scss -
Open
new-colorscheme.scssand add these lines to include all bootstrap and luxize components.// Variables // // ------ you can put your colorscheme configuration here // IMPORTS // Importing luxize @import "luxize/luxize"; -
Edit
luxize-leather-shop/package.json -
Inside:
"scripts"bracket "{ ... }", add these 3 lines below"css-prefix-new-leather-shop": "postcss --replace assets/css/luxize-new-leather-shop.css --use autoprefixer --map", "css-compile-new-leather-shop": "sass scss/new-leather-shop.scss assets/css/luxize-new-leather-shop.css", "css-minify-new-leather-shop": "./node_modules/.bin/cleancss --input-source-map assets/css/luxize-new-leather-shop.css.map --with-rebase --output assets/css/luxize-new-leather-shop.min.css assets/css/luxize-new-leather-shop.css", -
Back to your terminal, run
npm startto start the build tool -
link
luxize-new-leather-shop.cssto yourhtmlfiles by replacing".../luxize-leather-shop.css"to".../luxize-new-leather-shop.css"<link rel="stylesheet" type="text/css" href="../assets/css/new-leather-shop.css">