Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add new css and js file in stencil theme

Tags:

bigcommerce

enter image description hereHow can i add new css and js file in my BC Stencil Theme ?

and i cant find my all theme folder in cyberduck! my theme name is Cornerstone Light.

like image 405
Hitesh Sharma Avatar asked Oct 25 '25 17:10

Hitesh Sharma


1 Answers

The legacy theme platform (Blueprint) used Cyberduck to upload theme files, but Stencil uses Stencil CLI developer tools. If your store has a Stencil theme applied, you won't see a template folder in WebDAV.

First, install the prerequisites for your OS and install Stencil CLI: https://stencil.bigcommerce.com/docs/installing-and-launching-stencil-1

Download your theme so you can work on it locally. CSS files can be added to assets/scss and js files can be installed with a package manager like npm, or uploaded to assets/js.

After uploading your custom.scss file to the assets/scss directory, you can import it into the default scss file (theme.scss) with an @import statement:

@import "custom";

Here are links to the documentation on adding CSS and js files to your theme: https://stencil.bigcommerce.com/docs/custom-sass-functions#Compiling https://stencil.bigcommerce.com/docs/js-101

You might also find this BC Community discussion helpful: https://forum.bigcommerce.com/s/question/0D51B00003sRDg7SAG/custom-css-in-big-commerce

like image 184
Karen White Avatar answered Oct 29 '25 21:10

Karen White



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!