Syntactically Awesome Stylesheets
// Compile SCSS into CSS gulp.task('styles', function() { return gulp.src('./assets/styles/style.scss') .pipe(gulp.dest('./_site/assets/css')) .pipe(sass()) });
// Compile SCSS into CSS & auto-inject into browsers gulp.task('styles', function() { return gulp.src('./styles/style.scss') .pipe(sass()) .pipe(autoprefixer({ browsers: ['last 2 versions'] })) .pipe(nano({discardComments: {removeAll: true}})) .pipe(gulp.dest('./_site/assets/css')) .pipe(browserSync.stream()); });
... loaders: [ { test: /\.scss$/, loader: 'style!css!sass' } ] ...
... loaders: [ { test: /\.scss$/, loader: 'style!css?modules&importLoaders=2&sourceMap! autoprefixer?browsers=last 2 version!sass?outputStyle=expanded&sourceMap' } ] ...
See the Pen Intro to Sass by Devan Huapaya (@imdevan) on CodePen.
See the Pen Intro to Sass - Nesting by Devan Huapaya (@imdevan) on CodePen.
See the Pen Intro to Sass - Ampersand by Devan Huapaya (@imdevan) on CodePen.
See the Pen Intro to Sass - Media Queries by Devan Huapaya (@imdevan) on CodePen.
See the Pen Intro to Sass - Mixins by Devan Huapaya (@imdevan) on CodePen.
See the Pen Intro to Sass - Maps & Loops by Devan Huapaya (@imdevan) on CodePen.
See the Pen Intro to Sass - Math Operators by Devan Huapaya (@imdevan) on CodePen.
See the Pen Intro to Sass - Color Functions by Devan Huapaya (@imdevan) on CodePen.
Within Main.scss
@import 'layout/flex'; @import 'layout/grid'; @import 'components/typography'; @import 'components/buttons'; @import 'utility/margins'; @import 'utility/padding';