Skip to content

modestfake/SCSS-Starter-Kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCSS-Starter-Kit

Installation

  1. Make sure you have the latest Node.js LTS installed. Download
  2. Open the command line and install Gulp CLI globally ones if not installed yet. Use npm install gulp-cli -g.
  3. cd into your project folder in command line where package.json file located or open the folder in your explorer, right mouse click with pressed Shift key and choose Open command line here.
  4. Install all dependencies with npm install.
  5. Change variable path if you need. For example, I use this path for OpenCart:
const path = './catalog/view/theme/default/stylesheet/';
  1. Repeat steps 3, 4 and 5 in every project.

Usage

  • For development run gulp in your project where gulpfile.js is located. It runs watch task and generates a new style.css with sourcemaps whenever you change and save .scss files. Autoprefixer is disabled.
  • For production run gulp build in the command line. It removes sourcemaps, turns on autoprefixer.

Also you can use your IDE panel. PHPStorm has a good one. Just double click the task name to run it or press ▶️ button to run the default one.

Styles structure

styles (or your path)
├── css
|    ├─ style.css
|    └─ style.css.map
└── scss
     ├─ helpers
     ├─ folder1
     └─ folder2
     main.scss

Other instructions

Naming pattern for .scss files
_variables.scss
_buttons.scss
How to include these files in main.scss
@import 'variables.scss';
@import 'buttons.scss';

⚠️ Notice! Order matters.

About

Boilerplate with SCSS and Gulp

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published