Custom Sass Functions
Custom Sass functions
Note
The config.json file is the main configuration file for Stencil themes and exists in the theme root directory. Use Stencil CLI to edit this file.
Compiling custom Sass files
If you want to add your own custom Sass files to a theme, initiate auto-compilation of those files by including the associated tag in your HTML markup. Doing this is useful for isolating your custom styles. Cornerstone’s Sass file is named /assets/scss/theme.scss.
To add a custom Sass file, place it at this path location, using an arbitrary filename prefix as shown:
/assets/scss/foobar.scssNext, import the custom file into theme.scss.
Finally, ensure {{stylesheet '/assets/css/theme.scss'}} is located in templates/layout/base.html/.
While stencil start is running, it will recompile your custom Sass files to the specified {theme-name}/assets/css/theme.scss file (note that this object file’s name is always the same, and is independent of your custom Sass file’s names).
Before you customize
The Stencil framework is designed to support your incorporation of custom Sass files/frameworks. However, BigCommerce does not offer technical assistance on substitutions for, or customized versions of, Stencil’s default dependencies.