Sass Tooling!
Or How to StaySane When WorkingWith Sass
Sass tooling!
We are goingto cover:
compiling
linting
debugging
Sass tooling!
We are notgoingto cover:
syntax
commentblocks
how you should use mixins
the Lostfinale
whether or notthis is alladream
Sass tooling!
RTFM?
Yeah. Read them. For sure.
Sass tooling!
Compilation
Sass tooling!
There are non-Rubycompilers for Sass ( and
).
LibSass node-
sass
Theyare notcovered in this guide because theyare notat
feature paritywith the Rubyimplementation, buttheycan
compile literallyorders of magnitude faster.
Sass tooling!
Startbycreatinga.ruby-versionfile thatcontains the
version of Rubythatyou are usingfor Sass compilation:
2.1.2
This tells and to change to thatversion of Ruby
when you cd into the directorycontainingthe .ruby-
versionfile.
RVM rbenv
Create aGemfileto specifywhich version of Sass to use:
source'https://rubygems.org'
gem'sass','3.3.13'
Use the version number displayed when you run:
$geminstallsass
Now, once you run bundle installin this directory, all
contributors willbe usingthe same version of Rubyand
Sass.
Using the Sass CLI to compile your sass!
Simplestoption for Sass compilation:
$sass{pathtoyourSass}:{pathtowhereyouwantCSS}
These paths to Sass and CSS can be individualfiles or
entire directories!
You can also setSass to watch for changes:
$sass--watch{pathtoyourSass}:{pathtowhereyouwantCSS}
And you can specifywhich style to compile to:
$sass--watch--stylecompressed{pathtoyourSass}:{pathtowhereyouwantCSS}
Sass tooling!
Create asassfile to compile your Sass. Putthe command
thatyou've been usingto compile Sass in this file and, to
give yourself proper permissions, run:
$touchsass
$chmodu+rwx./sass
$echo"sass--watch--stylecompressed{pathtoyourSass}:{pathtowhereyouwantCSS}"
Now you can compile your Sass byrunning:
$./sass
Boom.
Create a.gitignorefile to tellGitto ignore the sass-
cache:
.sass-cache
.sass-cache/is an idiot. You don'tneed to version
track it.
Sass tooling!
Linting
Sass tooling!
Use to lintyour Sass:scss-lint
$geminstallscss-lint
$scss-lint{pathtoyourSassdir}
Sass tooling!
Use (Sublime Text) or (Atom) to lint
your Sass as you write it
SublimeLinter Linter
Use to setup awebhook to rejectunlinted
Sass
overcommit
Use .scss-lint.ymlto configure scss-lint:
linters:
PropertySortOrder:
enabled:false
Sourcemaps
Sass tooling!
In Chrome, open about:flagsand check Enable
Developer Tools experiments
Sass tooling!
In the devtools settings menu, click the Experiments tab
and check Enable frameworks debuggingsupport
In the devtools settings menu, click the Generaltagand
check Auto-reload generated CSS
Sass tooling!
Note thatthis mightnotdo anything. If your sourcemap
contains arelative url, Chrome can'thandle it. The Sass
team is wontfixingthis, butthe Chrome team is working
on it. Sometimes itworks though. I don'tknow.
Now run sass with the --sourcemapflagto generate
sourcemaps:
$sass--watch--stylecompressed--sourcemap{pathtoyourSassfilewithyourimports}:{
Open the Sources tab in the devtools, rightclick the
whiteness, click Add Folder to Workspace and selectyour
project's directory
Sass tooling!
Rightclick your .cssand selectMap to File System
Resource... then selectyour .scssor .sassand follow
the promptto reload the devtools
Sass tooling!
Sass tooling!

More Related Content

ODT
Document install arubaito
PDF
"ยอดขายพุ่งด้วยโซเชียลมีเดีย" SME Webinar สัมมนาออนไลน์
PPTX
MFA Symposium June 2013
PPTX
Rm box 2
PPSX
Presentation Founderpay
PDF
A byte of python (2005)
PPSX
Presentation Founderpay.com
PPTX
Presentation2
Document install arubaito
"ยอดขายพุ่งด้วยโซเชียลมีเดีย" SME Webinar สัมมนาออนไลน์
MFA Symposium June 2013
Rm box 2
Presentation Founderpay
A byte of python (2005)
Presentation Founderpay.com
Presentation2

Viewers also liked (13)

PPTX
Tee onnistunut somekampanja sadalla eurolla
PPT
medicina
PPTX
Slideshare
PDF
"บริหารคนอย่างรู้ใจในภาวะวิกฤติ" SME Webinar สัมมนาออนไลน์
PPTX
Drug Abuse
PDF
17 loại phí hãng tàu thu cho 1 lô hàng
PPT
Xim $%
PDF
Sales contract - Mẫu hợp đồng xuất khẩu linh kiện điện tử bằng tiếng anh
PDF
Thủ tục hải quan đối với hàng hóa gia công- Việt Nam IBC
PPT
Chemistry hydrogen bonding
PPT
Rosmorduc chc
PPT
Castera pb halternative 4
PDF
30 thuật ngữ tiếng anh thường dùng trong xuất nhập khẩu
Tee onnistunut somekampanja sadalla eurolla
medicina
Slideshare
"บริหารคนอย่างรู้ใจในภาวะวิกฤติ" SME Webinar สัมมนาออนไลน์
Drug Abuse
17 loại phí hãng tàu thu cho 1 lô hàng
Xim $%
Sales contract - Mẫu hợp đồng xuất khẩu linh kiện điện tử bằng tiếng anh
Thủ tục hải quan đối với hàng hóa gia công- Việt Nam IBC
Chemistry hydrogen bonding
Rosmorduc chc
Castera pb halternative 4
30 thuật ngữ tiếng anh thường dùng trong xuất nhập khẩu
Ad

Similar to Sass tooling! (20)

PPT
UNIT 3.ppt
PDF
Big Frontends Made Simple
PPTX
Sass installation
PDF
Dallas Drupal Days 2012 - Introduction to less sass-compass
 
PPTX
Elegant CSS Design In Drupal: LESS vs Sass
PPTX
Bliblidotcom - SASS Introduction
PDF
Fasten RWD Development with Sass
PDF
SASS, Compass, Gulp, Greensock
KEY
Authoring Stylesheets with Compass & Sass
PPTX
Sass: Introduction
PDF
Pacific Northwest Drupal Summit: Basic & SASS
PDF
Less vs sass
PPTX
Introducing grunt, npm and sass
PDF
CSS with superpowers - SASS!
 
PPTX
Simple introduction Sass
PDF
Rapid Templating with Serve
PPTX
Sass:-Syntactically Awesome Stylesheet by Shafeeq
PDF
CSS 開發加速指南-Sass & Compass
PDF
SASS Preprocessor
PDF
Understanding asset pipeline plugin
UNIT 3.ppt
Big Frontends Made Simple
Sass installation
Dallas Drupal Days 2012 - Introduction to less sass-compass
 
Elegant CSS Design In Drupal: LESS vs Sass
Bliblidotcom - SASS Introduction
Fasten RWD Development with Sass
SASS, Compass, Gulp, Greensock
Authoring Stylesheets with Compass & Sass
Sass: Introduction
Pacific Northwest Drupal Summit: Basic & SASS
Less vs sass
Introducing grunt, npm and sass
CSS with superpowers - SASS!
 
Simple introduction Sass
Rapid Templating with Serve
Sass:-Syntactically Awesome Stylesheet by Shafeeq
CSS 開發加速指南-Sass & Compass
SASS Preprocessor
Understanding asset pipeline plugin
Ad

Recently uploaded (20)

PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPTX
Fundamentals of Mechanical Engineering.pptx
PPTX
Amdahl’s law is explained in the above power point presentations
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPTX
Current and future trends in Computer Vision.pptx
PPTX
CyberSecurity Mobile and Wireless Devices
PDF
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PDF
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PPT
Total quality management ppt for engineering students
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
III.4.1.2_The_Space_Environment.p pdffdf
Fundamentals of Mechanical Engineering.pptx
Amdahl’s law is explained in the above power point presentations
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Current and future trends in Computer Vision.pptx
CyberSecurity Mobile and Wireless Devices
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
22EC502-MICROCONTROLLER AND INTERFACING-8051 MICROCONTROLLER.pdf
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Total quality management ppt for engineering students
distributed database system" (DDBS) is often used to refer to both the distri...
August -2025_Top10 Read_Articles_ijait.pdf
Information Storage and Retrieval Techniques Unit III
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
Categorization of Factors Affecting Classification Algorithms Selection
Fundamentals of safety and accident prevention -final (1).pptx
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx

Sass tooling!

  • 1. Sass Tooling! Or How to StaySane When WorkingWith Sass
  • 3. We are goingto cover: compiling linting debugging
  • 5. We are notgoingto cover: syntax commentblocks how you should use mixins the Lostfinale whether or notthis is alladream
  • 11. There are non-Rubycompilers for Sass ( and ). LibSass node- sass
  • 12. Theyare notcovered in this guide because theyare notat feature paritywith the Rubyimplementation, buttheycan compile literallyorders of magnitude faster.
  • 14. Startbycreatinga.ruby-versionfile thatcontains the version of Rubythatyou are usingfor Sass compilation: 2.1.2 This tells and to change to thatversion of Ruby when you cd into the directorycontainingthe .ruby- versionfile. RVM rbenv
  • 15. Create aGemfileto specifywhich version of Sass to use: source'https://rubygems.org' gem'sass','3.3.13' Use the version number displayed when you run: $geminstallsass Now, once you run bundle installin this directory, all contributors willbe usingthe same version of Rubyand Sass.
  • 17. Simplestoption for Sass compilation: $sass{pathtoyourSass}:{pathtowhereyouwantCSS}
  • 18. These paths to Sass and CSS can be individualfiles or entire directories!
  • 19. You can also setSass to watch for changes: $sass--watch{pathtoyourSass}:{pathtowhereyouwantCSS}
  • 20. And you can specifywhich style to compile to: $sass--watch--stylecompressed{pathtoyourSass}:{pathtowhereyouwantCSS}
  • 22. Create asassfile to compile your Sass. Putthe command thatyou've been usingto compile Sass in this file and, to give yourself proper permissions, run: $touchsass $chmodu+rwx./sass $echo"sass--watch--stylecompressed{pathtoyourSass}:{pathtowhereyouwantCSS}" Now you can compile your Sass byrunning: $./sass Boom.
  • 23. Create a.gitignorefile to tellGitto ignore the sass- cache: .sass-cache .sass-cache/is an idiot. You don'tneed to version track it.
  • 27. Use to lintyour Sass:scss-lint $geminstallscss-lint $scss-lint{pathtoyourSassdir}
  • 29. Use (Sublime Text) or (Atom) to lint your Sass as you write it SublimeLinter Linter
  • 30. Use to setup awebhook to rejectunlinted Sass overcommit
  • 31. Use .scss-lint.ymlto configure scss-lint: linters: PropertySortOrder: enabled:false
  • 34. In Chrome, open about:flagsand check Enable Developer Tools experiments
  • 36. In the devtools settings menu, click the Experiments tab and check Enable frameworks debuggingsupport
  • 37. In the devtools settings menu, click the Generaltagand check Auto-reload generated CSS
  • 39. Note thatthis mightnotdo anything. If your sourcemap contains arelative url, Chrome can'thandle it. The Sass team is wontfixingthis, butthe Chrome team is working on it. Sometimes itworks though. I don'tknow.
  • 40. Now run sass with the --sourcemapflagto generate sourcemaps: $sass--watch--stylecompressed--sourcemap{pathtoyourSassfilewithyourimports}:{
  • 41. Open the Sources tab in the devtools, rightclick the whiteness, click Add Folder to Workspace and selectyour project's directory
  • 43. Rightclick your .cssand selectMap to File System Resource... then selectyour .scssor .sassand follow the promptto reload the devtools