Skip to content

jackniu/sass-guidelines

 
 

Repository files navigation

Sass Guidelines

An opinionated styleguide for writing sane, maintainable and scalable Sass.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

The code for this project is licensed under MIT. The content for this project is licensed by Creative Commons Attribution 4.0 International.

Local development

bundle install
npm install
npm start
# http://localhost:4000

npm tasks

  • start: runs the build task and then the watch task. It is used when cloning the project for the first time in order to work on it. After the first time, you can run the watch task only.
  • watch: runs Jekyll in development mode (local environment, file watcher, dev config, incremental build).
  • build: runs the icons, js:build tasks. npm automatically executes the postbuild task after the build task. The postbuild task runs the bin/testbuild Bash script. This script makes sure the build happened correctly.
  • icons: Generates _includes/sprite.svg. npm automatically executes the preicons task before the icons task. The preicons task runs svgo to optimise SVG files before building the sprite.
  • css:critical: Generates _includes/critical.css.
  • js:build: Runs the js:lint, js:vendors, js:main, js:utilities tasks.
  • js:vendors: Copies third-party vendor scripts into the JavaScript folder (accessible-modal-dialog, blingdotjs, picturefill). The picturefill.min.js is not copied in the vendor folder because it is being included in the <head> instead of being bundled in the main JavaScript file like other vendors. npm automatically executes this task after npm install.
  • js:utilities: Generates _includes/utilities.js from third-party vendor scripts (loadCSS, woff2-feature-test, OptimizedWebfontLoading). These utilities are being inlined in the <head> instead of being bundled in the main JavaScript file.
  • js:main: Generates the minified main JavaScript file with rollup.
  • js:lint: Runs semistandard on the JavaScript source folder.

About

Guidelines for writing sane, maintainable and scalable Sass.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 89.2%
  • CSS 7.5%
  • JavaScript 2.3%
  • Other 1.0%