SlideShare a Scribd company logo
The Advantages of Using
SASS (and how about
gulp?)
Andy Stitt
Deliberate Media Solutions
Agenda
- What is SASS?
- Why use SASS?
- Introduction to Gulp
- Installing Gulp and all necessary components needed to compile SASS
- BONUS: using Gulp to minify the CSS for your live site
What is SASS?
- Stands for Syntactically Awesome Style Sheets
- Breaks up CSS into modular code
- In English: instead of one super long stylesheet, you can have several shorter
stylesheets that combine into one
Why SASS?
- Easier to maintain styles when they are broken up into components instead of
one long document
- Use of variables and nesting makes it more efficient to write code
- Easier to maintain your codebase over time
- Saves you time and money
Why not SASS?
- When it’s too heavy for the job, AKA smaller stylesheets
- If you mostly customize commercial/off-the-shelf themes
Breakdown of SASS
-- main theme folder
style.css
--scss
style.scss
--partials
_variables.scss
_header.scss
_content.scss
_footer.scss
Breakdown of SASS
_variables.scss
_header.scss
_content.scss
_footer.scss
style.scss style.css
Variables and Nesting
- SASS allows you to store values in variables, i.e. $blue instead of #000ff
- You can also do nesting with your CSS:
header {
h1 {
values here header h1 {values here}
} header h2 {values here}
h2 {
values here
}
}
SASS Compiling
- It doesn’t just magically all come together
- Compile code from partial files into main SASS file
- Many different options for SASS compilers
- If you absolutely will not ever ever ever use the command line but still want to
use SASS: https://incident57.com/codekit/
- If you want to get your command line feet wet: use Gulp!
Intro to Gulp
- Gulp is a task runner
- In English: it does certain things that happen during the development process,
such as compiling SASS and minifying CSS and JavaScript
- Set it up to do these things in advance and do all the things with one
command
Install Node.js
- Before you can install Gulp, you must install Node.js first:
https://nodejs.org/en/
- Node Package Manager (NPM) will allow you to install Gulp and all of its
component parts
Install Gulp
- Open up your command line tool
- First, install gulp globally: $ npm install --global gulp-cli
- Then, go to your project directory: $ cd your-project-directory
- Then, initialize your project directory: $ npm init
- Then, install gulp in your project devDependencies:
$ npm install --save-dev gulp
- Then, create gulpfile.js
- Then, run gulp: $ gulp
Source: https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md
Install Gulp Sass and Gulp Clean CSS
- $ npm install --save-dev gulp-sass
- $ npm install --save-dev gulp-clean-css
- Gulp Sass is the SASS compiler, and Gulp Clean CSS is the minifier
Why minify CSS?
- Smaller CSS files = faster website load time
- Faster website load time = happier website visitors
Live demo
Summary
- Use SASS to make a larger CSS codebase more manageable
- Use Gulp to compile the SASS and minify the CSS
- Don’t be terrified of the command line
Resources
- Introduction to SASS and Gulp: https://github.com/andystitt829/phillywp
- A SASS-ified version of the TwentySixteen theme:
https://github.com/andystitt829/twentysixteen-sassified
- Separated the component parts of TwentySixteen according to the table of
contents
Questions?
- https://deliberatemediasolutions.com
- andy@andystitt.com
- Twitter: @andywpdev

More Related Content

PPTX
Top NoSQL Data Modeling Mistakes
PPTX
NoSQL Data Modeling 101
PDF
Bash Script Disk Space Utilization Report and EMail
PDF
Accelerate Ceph performance via SPDK related techniques
PDF
ProxySQL - High Performance and HA Proxy for MySQL
PDF
ClickHouse Monitoring 101: What to monitor and how
PDF
MySQL GTID 시작하기
PPT
Understanding MySQL Performance through Benchmarking
Top NoSQL Data Modeling Mistakes
NoSQL Data Modeling 101
Bash Script Disk Space Utilization Report and EMail
Accelerate Ceph performance via SPDK related techniques
ProxySQL - High Performance and HA Proxy for MySQL
ClickHouse Monitoring 101: What to monitor and how
MySQL GTID 시작하기
Understanding MySQL Performance through Benchmarking

Similar to The Advantages of Using SASS and Gulp (20)

PPTX
Syntactically Awesome Stylesheet - A workshop by Citytech Software
PPTX
Sass: Introduction
PDF
SASS, Compass, Gulp, Greensock
PPT
UNIT 3.ppt
PDF
Assembling Sass
PDF
October 2014 - USG Rock Eagle - Sass 101
PPTX
Gulp and bower Implementation
PDF
The World of Stylesheet Languages
PDF
Sass that CSS
PDF
What makes Sass so Syntactically Awesome?
PPTX
SASS Lecture
PPTX
Syntactically awesome stylesheets (Sass)
PDF
Sass Essentials
PPTX
Introducing grunt, npm and sass
PDF
Getting SASSy with front end development
PDF
CSS with superpowers - SASS!
 
PPTX
Introduction to sass
PPTX
Sass:-Syntactically Awesome Stylesheet by Shafeeq
PDF
Fasten RWD Development with Sass
PPTX
Bliblidotcom - SASS Introduction
Syntactically Awesome Stylesheet - A workshop by Citytech Software
Sass: Introduction
SASS, Compass, Gulp, Greensock
UNIT 3.ppt
Assembling Sass
October 2014 - USG Rock Eagle - Sass 101
Gulp and bower Implementation
The World of Stylesheet Languages
Sass that CSS
What makes Sass so Syntactically Awesome?
SASS Lecture
Syntactically awesome stylesheets (Sass)
Sass Essentials
Introducing grunt, npm and sass
Getting SASSy with front end development
CSS with superpowers - SASS!
 
Introduction to sass
Sass:-Syntactically Awesome Stylesheet by Shafeeq
Fasten RWD Development with Sass
Bliblidotcom - SASS Introduction
Ad

More from Andrew Stitt, MBA (7)

PDF
Making State Government Accessible and Responding to COVID-19
PPTX
How to Turn Your Nonprofit WordPress Website into a Fundraising Tool
PDF
How to Use WordPress to Build Your Nonprofit Website
PPTX
Using Google Analytics for Better WordPress Website Data and Analysis
PPTX
How to Manage at Work When You're a Tech Department of One
PDF
The Recipe for a Dynamite Nonprofit WordPress Website
PDF
Six Weeks Into WordPress Freelancing
Making State Government Accessible and Responding to COVID-19
How to Turn Your Nonprofit WordPress Website into a Fundraising Tool
How to Use WordPress to Build Your Nonprofit Website
Using Google Analytics for Better WordPress Website Data and Analysis
How to Manage at Work When You're a Tech Department of One
The Recipe for a Dynamite Nonprofit WordPress Website
Six Weeks Into WordPress Freelancing
Ad

Recently uploaded (20)

PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
AI in Product Development-omnex systems
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Wondershare Filmora 15 Crack With Activation Key [2025
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How Creative Agencies Leverage Project Management Software.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Softaken Excel to vCard Converter Software.pdf
Digital Strategies for Manufacturing Companies
Upgrade and Innovation Strategies for SAP ERP Customers
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Design an Analysis of Algorithms I-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
How to Migrate SBCGlobal Email to Yahoo Easily
AI in Product Development-omnex systems
CHAPTER 2 - PM Management and IT Context
Essential Infomation Tech presentation.pptx
Reimagine Home Health with the Power of Agentic AI​
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...

The Advantages of Using SASS and Gulp

  • 1. The Advantages of Using SASS (and how about gulp?) Andy Stitt Deliberate Media Solutions
  • 2. Agenda - What is SASS? - Why use SASS? - Introduction to Gulp - Installing Gulp and all necessary components needed to compile SASS - BONUS: using Gulp to minify the CSS for your live site
  • 3. What is SASS? - Stands for Syntactically Awesome Style Sheets - Breaks up CSS into modular code - In English: instead of one super long stylesheet, you can have several shorter stylesheets that combine into one
  • 4. Why SASS? - Easier to maintain styles when they are broken up into components instead of one long document - Use of variables and nesting makes it more efficient to write code - Easier to maintain your codebase over time - Saves you time and money
  • 5. Why not SASS? - When it’s too heavy for the job, AKA smaller stylesheets - If you mostly customize commercial/off-the-shelf themes
  • 6. Breakdown of SASS -- main theme folder style.css --scss style.scss --partials _variables.scss _header.scss _content.scss _footer.scss
  • 8. Variables and Nesting - SASS allows you to store values in variables, i.e. $blue instead of #000ff - You can also do nesting with your CSS: header { h1 { values here header h1 {values here} } header h2 {values here} h2 { values here } }
  • 9. SASS Compiling - It doesn’t just magically all come together - Compile code from partial files into main SASS file - Many different options for SASS compilers - If you absolutely will not ever ever ever use the command line but still want to use SASS: https://incident57.com/codekit/ - If you want to get your command line feet wet: use Gulp!
  • 10. Intro to Gulp - Gulp is a task runner - In English: it does certain things that happen during the development process, such as compiling SASS and minifying CSS and JavaScript - Set it up to do these things in advance and do all the things with one command
  • 11. Install Node.js - Before you can install Gulp, you must install Node.js first: https://nodejs.org/en/ - Node Package Manager (NPM) will allow you to install Gulp and all of its component parts
  • 12. Install Gulp - Open up your command line tool - First, install gulp globally: $ npm install --global gulp-cli - Then, go to your project directory: $ cd your-project-directory - Then, initialize your project directory: $ npm init - Then, install gulp in your project devDependencies: $ npm install --save-dev gulp - Then, create gulpfile.js - Then, run gulp: $ gulp Source: https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md
  • 13. Install Gulp Sass and Gulp Clean CSS - $ npm install --save-dev gulp-sass - $ npm install --save-dev gulp-clean-css - Gulp Sass is the SASS compiler, and Gulp Clean CSS is the minifier
  • 14. Why minify CSS? - Smaller CSS files = faster website load time - Faster website load time = happier website visitors
  • 16. Summary - Use SASS to make a larger CSS codebase more manageable - Use Gulp to compile the SASS and minify the CSS - Don’t be terrified of the command line
  • 17. Resources - Introduction to SASS and Gulp: https://github.com/andystitt829/phillywp - A SASS-ified version of the TwentySixteen theme: https://github.com/andystitt829/twentysixteen-sassified - Separated the component parts of TwentySixteen according to the table of contents