SlideShare a Scribd company logo
` 
1 PLAYER GAME 
MARIO 
0000000 
WORLD 
1-1 
TIME 
ROCK_EAGLE 
Simplifying and 
extending CSS for the 
21st century! 
2 PLAYER GAME
Introductions 
and 
Shout Outs 
World -1-1 
Section Text 
Body Level One 
MARIO 
0000000 
WORLD 
-1-1 
TIME 
ROCK_EAGLE 
x 3
Eric Sembrat 
• Web Manager - College of 
Engineering, Georgia Tech 
• Ph.D. Student - Instructional 
Technology, Georgia State 
! 
! 
• Website: http://ericsembrat.com 
• Twitter: @esembrat
World Map 
• The State of CSS 
• Enter: CSS Preprocessors 
• How Sass Works 
• Sass Features 
• Q&A / Discussion
And now, for some plugs..
USGWeb Collaboration Group 
• Communication list for web development 
discussion between the 31 institutions 
in the University System of Georgia. 
! 
• http://usgweb.gatech.edu
http://atlanta.buildguild.org/
The State 
of CSS 
World 1-1 
Section Text 
Body Level One 
MARIO 
0000000 
WORLD 
1-1 
TIME 
ROCK_EAGLE 
x 3
We’ve come a long way…
We’ve come a long way…
CSS Growing Up 
• Before CSS, there were 
inline element styles. 
<font color=“green” size=“8” family=“Wingdings”>
CSS Growing Up 
• Before CSS, there were 
inline element styles. 
! 
• Then CSS was born 
with style. 
<font color=“green” size=“8” family=“Wingdings”> 
<font style=“color: green; font-size: 8pt; font-family: 
Wingdings”>
CSS Growing Up 
• Before CSS, there were 
inline element styles. 
! 
• Then CSS was born 
with style. 
! 
• Finally, CSS grew too 
big to live with HTML. 
<font color=“green” size=“8” family=“Wingdings”> 
<font style=“color: green; font-size: 8pt; font-family: 
Wingdings”> 
@import url(fancy-pants-css.css);
CSS Has Not Aged Well.. 
Variables 
CSS3 
Inheritance 
Reusability 
CSS Organization 
Media Queries 
Theme Templates
Some of this will change.. 
• CSS4 looks to fix some of 
these issues (1) 
• Parent Selectors 
• Grids 
• However, there’s still one big elephant in the room.
Don’t Repeat Yourself
What is DRY? 
• Minimizing repetition of 
the information in a 
project 
• Modifications only happen in 
one place 
! 
• Construction of 
repetitive, reusable, 
and scalable elements
DRY in CSS 
• CSS does not have DRY 
capabilities built-in: 
• Variables (i.e. color, font) 
• Media queries 
• Chunks of CSS 
• So, how do we fix CSS and get out of this mess?
Sass to the Rescue! 
http://sass-lang.com/
What is 
Sass? 
World 2-1 
Section Text 
Body Level One 
MARIO 
0000000 
WORLD 
2-1 
TIME 
ROCK_EAGLE 
x 3
Preprocessor 
• Sass is a preprocessor for CSS 
• Converts Sass short-code into clunky, ugly CSS 
• Serves as a translator 
CSS 
compiles 
to 
SASS
Sass 
• Sass uses a very CSS-like syntax (.SCSS) to extend 
new features into the syntax you already know 
! 
• An alternative is a tab-centric syntax (.SASS)
Compare 
#main { 
color: blue; 
font-size: 0.3em; 
• Our CSS-friendly .SCSS 
formatting option. 
http://thesassway.com/editorial/sass-vs-scss-which-syntax-is-better 
} 
#main! 
color: blue 
font-size: 0.3em 
• Or, the tab-centric .SASS 
formatting option.
.SCSS vs. .SASS 
• Changing syntax is an automated 
process: 
• http://sass-lang.com/documentation/ 
file.SASS_REFERENCE.html#syntax
What does Ruby run on? 
• Sass was originally developed 
as in the Ruby programming 
language. 
• Sass was recently ported over 
to C/C++ as LibSass.
Using Sass 
World 3-1 
Section Text 
Body Level One 
MARIO 
0000000 
WORLD 
3-1 
TIME 
ROCK_EAGLE 
x 3
Web Console 
• SassMeister 
• http://sassmeister.com/
1) Get a App 
• Easiest way to get started is to download a Sass 
application. 
• http://sass-lang.com/install 
• Multi-platform releases 
• Free and paid products available
Scout 
Scout - http://mhs.github.io/scout-app/
CodeKit 
CodeKit - https://incident57.com/codekit/
Sass 
Features 
World 4-1 
Section Text 
Body Level One 
MARIO 
0000000 
WORLD 
4-1 
TIME 
ROCK_EAGLE 
x 3
2) Learn the Syntax 
• Learn many of the essential 
features of Sass. 
• Variables 
• Nesting 
• Mixins 
• Plugins 
• Partials 
• (and more!)
Variables 
$pretty-blue: #0000FF; 
$pretty-font-size: 0.3em; 
! 
#main { 
color: $pretty-blue; 
font-size: $pretty-font-size; 
} 
#main { 
color: #0000FF; 
font-size: 0.3em; 
}
Nesting 
$pretty-blue: #0000FF; 
! 
#main { 
color: $pretty-blue; 
font-size: 0.3em; 
#slideshow { 
background-color: 
mix(#FFF, $pretty-blue, 
20%); 
} 
} 
#main { 
color: #0000FF; 
font-size: 0.3em; 
} 
! 
#main #slideshow { 
background-color: #3333ff; 
}
Mixins 
@mixin chattanooga() { 
background-color: pink; 
font-size: 25pt; 
} 
! 
#body #chattanooga { 
@include chattanooga(); 
} 
#body #chattanooga { 
background-color: pink; 
font-size: 25pt; 
}
Mixins 
@mixin chattanooga() { 
background-color: pink; 
font-size: 25pt; 
Mixins can reference mixins! 
} 
! 
#body #chattanooga { 
@include chattanooga(); 
} 
#body #chattanooga { 
background-color: pink; 
font-size: 25pt; 
}
Mixins 
@mixin chattanooga() { 
background-color: pink; 
font-size: 25pt; 
Mixins can take arguments (with 
} 
! 
#body #chattanooga { 
default values)! 
@include chattanooga(); 
} 
#body #chattanooga { 
background-color: pink; 
font-size: 25pt; 
}
Plugins 
• Compass 
• http://compass-style.org/ 
• Sass Globbing 
• https://github.com/chriseppstein/sass-globbing 
• Breakpoint 
• http://breakpoint-sass.com/ 
• Bourbon 
• http://bourbon.io/
Partials 
compiles 
global.scss global.css 
to 
_hdr.scss 
_ftr.scss
Configure CSS Output 
• Sass uses a configuration file (config.rb) to control 
CSS output 
• Requires Compass 
• http://compass-style.org/help/documentation/configuration-reference/
Advanced 
Features 
World 5-1 
Section Text 
Body Level One 
MARIO 
0000000 
WORLD 
5-1 
TIME 
ROCK_EAGLE 
x 3
Block Element Modifier (BEM) 
• Methodology for naming classes. 
.BLOCK{__ELEMENT[--MODIFIER]}
Block Element Modifier (BEM) 
• Methodology for naming classes. 
.BLOCK{__ELEMENT[--MODIFIER]} 
.COLOR__PRIMARY 
.COLOR__PRIMARY--LIGHT 
.COLOR__PRIMARY--DARK
Block Element Modifier (BEM) 
• Can be programmatically built into Sass.
Block Element Modifier (BEM) 
• Can be programmatically built into Sass.
Source Maps 
• Source maps allow you to see the original source 
(Sass) instead of the compiled CSS while debugging.
Source Maps 
• Requires enabling source-maps on Sass and in the 
desired browser (Chrome & Firefox, Safari). 
http://thesassway.com/intermediate/using-source-maps-with-sass
• Associations of “key” | “value” objects. 
! 
! 
! 
! 
• Similar to programming arrays. 
• map-merge() 
• map-get() 
• map-remove() 
Maps 
$map: (key1: value1, key2: value2, key3: value3);
Demo? 
World 6-1 
Section Text 
Body Level One 
MARIO 
0000000 
WORLD 
6-1 
TIME 
ROCK_EAGLE 
x 3
Demo 
Quick highlights and features!
Let’s Chat 
Questions, Comments, Concerns, Discussions about Sass

More Related Content

KEY
Authoring Stylesheets with Compass & Sass
PPTX
Css 3
PPTX
Css 3
PDF
Functional Immutable CSS
PPT
Rubyonrails 090715105949-phpapp01
PPT
Ruby On Rails
PPTX
Sass_Cubet seminar
ZIP
Rails 3 (beta) Roundup
Authoring Stylesheets with Compass & Sass
Css 3
Css 3
Functional Immutable CSS
Rubyonrails 090715105949-phpapp01
Ruby On Rails
Sass_Cubet seminar
Rails 3 (beta) Roundup

What's hot (16)

ZIP
Cocoa text talk.key
PDF
Senior Project at USF - Mapping with Adobe Flex and Google Maps (Dec 2010)
PPTX
RoR: What is it Good For?: Absolutely Something
PPTX
BDUG Responsive Web Theming - 7/23/12
PPTX
Ruby on rails for beginers
PPTX
Bliblidotcom - SASS Introduction
PDF
Silverlight 3
PDF
Rails 6 Multi-DB 実戦投入
KEY
Better framework, better life
PDF
Create SASSY Web Parts - SPSMilan
KEY
Sass: The Future of Stylesheets
PDF
OSOM - Ruby on Rails
ODP
Drupal distributions - how to build them
PDF
Css3 and gwt in perfect harmony
PDF
Ruby in prijatelji
Cocoa text talk.key
Senior Project at USF - Mapping with Adobe Flex and Google Maps (Dec 2010)
RoR: What is it Good For?: Absolutely Something
BDUG Responsive Web Theming - 7/23/12
Ruby on rails for beginers
Bliblidotcom - SASS Introduction
Silverlight 3
Rails 6 Multi-DB 実戦投入
Better framework, better life
Create SASSY Web Parts - SPSMilan
Sass: The Future of Stylesheets
OSOM - Ruby on Rails
Drupal distributions - how to build them
Css3 and gwt in perfect harmony
Ruby in prijatelji
Ad

Viewers also liked (18)

PDF
Gdc 2011 game of platform power
PPTX
BEM methodology overview
PDF
10 Commandments for efficient CSS architecture [CSSConf.Asia '14]
PPTX
BEVM ( block__element--variation -modifier)
PPS
Mario Made Me Do It
PPS
Battle of the Titans: Super Mario Bros. Vs Math Blaster
PDF
BEM : Block Element Modifier
PDF
The benefits of BEM CSS
PPT
BDD with JBehave and Selenium
PPT
Game Presentation
PDF
Bem i SCSS na przykladzie inuit.css
DOCX
Final project report of a game
PPT
Game Thinking In Project Management
PDF
BEM. What you can borrow from Yandex frontend dev
PDF
Learn BEM: CSS Naming Convention
PDF
Enduring CSS
PPT
Teamwork presentation
Gdc 2011 game of platform power
BEM methodology overview
10 Commandments for efficient CSS architecture [CSSConf.Asia '14]
BEVM ( block__element--variation -modifier)
Mario Made Me Do It
Battle of the Titans: Super Mario Bros. Vs Math Blaster
BEM : Block Element Modifier
The benefits of BEM CSS
BDD with JBehave and Selenium
Game Presentation
Bem i SCSS na przykladzie inuit.css
Final project report of a game
Game Thinking In Project Management
BEM. What you can borrow from Yandex frontend dev
Learn BEM: CSS Naming Convention
Enduring CSS
Teamwork presentation
Ad

Similar to October 2014 - USG Rock Eagle - Sass 101 (20)

PDF
DrupalCamp Chattanooga - September 2014 - Sass 101
PDF
Compass n Sass
KEY
Future of Sass
KEY
Advanced sass/compass
PDF
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
PDF
The Coding Designer's Survival Kit - Capital Camp
PDF
[WebVisions 2010] CSS3 Workshop (Afternoon)
PDF
CSS vs. JavaScript - Trust vs. Control
PDF
CSS3 3D Workshop
PDF
CSS3: Ripe and Ready to Respond
PDF
Simply Responsive CSS3
PPT
UNIT 3.ppt
PDF
Oracle APEX Nitro
KEY
Trendsetting: Web Design and Beyond
PDF
[Worskhop Summits] CSS3 Workshop
PPTX
Using Tomorrow's CSS Today
PDF
Intro to CSS3
PDF
slides-students-C04.pdf
PPTX
Sass is dead
PPTX
Beautifying senc
DrupalCamp Chattanooga - September 2014 - Sass 101
Compass n Sass
Future of Sass
Advanced sass/compass
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
The Coding Designer's Survival Kit - Capital Camp
[WebVisions 2010] CSS3 Workshop (Afternoon)
CSS vs. JavaScript - Trust vs. Control
CSS3 3D Workshop
CSS3: Ripe and Ready to Respond
Simply Responsive CSS3
UNIT 3.ppt
Oracle APEX Nitro
Trendsetting: Web Design and Beyond
[Worskhop Summits] CSS3 Workshop
Using Tomorrow's CSS Today
Intro to CSS3
slides-students-C04.pdf
Sass is dead
Beautifying senc

More from Eric Sembrat (20)

PDF
WPCampus 2019 - Website Renewal Services
PDF
September 2018 - Georgia Tech - Science Communications Workshop - Building We...
PDF
USG Web Tech Day 2018 - Microsoft Teams, Collaboration, & You
PDF
USG Web Tech Day 2017 - CMS Tunnel Vision
PDF
USG Rock Eagle 2017 - PWP at 1000 Days
PDF
HighEdWeb 2017 - Unbundle Your Institution: Building a Web Ecosystem
PDF
January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...
PDF
November 2016 - ECN - You're Speaking Drupalese to Me
PDF
November 2016 - Georgia Tech - Building a Research Website
PDF
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
PDF
October 2016 - edUi - Save Us, Self Service!
PDF
April 2016 - MiniCamp Atlanta - SMACSS - Preparing Drupal 8 CSS Organization
PDF
August 2016 - DrupalCorn - The Paragraphs Cake - Structured & Layered Content...
PDF
April 2016 - Atlanta WordPress Users Group - Child Themes
PDF
April 2016 - USG Web Tech Day - Let's Talk Drupal
PDF
October 2015 - USG Rock Eagle - USGweb
PDF
October 2015 - USG Rock Eagle - Drupal 8
PDF
USG Rock Eagle - October 2015 - PWP at Georgia Tech
PDF
Atlanta Drupal Users Group - October 2015 - Success of the GT Redesign
PDF
August 2015 - Web Governance - PWP Introduction
WPCampus 2019 - Website Renewal Services
September 2018 - Georgia Tech - Science Communications Workshop - Building We...
USG Web Tech Day 2018 - Microsoft Teams, Collaboration, & You
USG Web Tech Day 2017 - CMS Tunnel Vision
USG Rock Eagle 2017 - PWP at 1000 Days
HighEdWeb 2017 - Unbundle Your Institution: Building a Web Ecosystem
January 2017 - WPCampus Online - Learning from Drupal: Implementing WordPress...
November 2016 - ECN - You're Speaking Drupalese to Me
November 2016 - Georgia Tech - Building a Research Website
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - edUi - Save Us, Self Service!
April 2016 - MiniCamp Atlanta - SMACSS - Preparing Drupal 8 CSS Organization
August 2016 - DrupalCorn - The Paragraphs Cake - Structured & Layered Content...
April 2016 - Atlanta WordPress Users Group - Child Themes
April 2016 - USG Web Tech Day - Let's Talk Drupal
October 2015 - USG Rock Eagle - USGweb
October 2015 - USG Rock Eagle - Drupal 8
USG Rock Eagle - October 2015 - PWP at Georgia Tech
Atlanta Drupal Users Group - October 2015 - Success of the GT Redesign
August 2015 - Web Governance - PWP Introduction

Recently uploaded (20)

PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Computing-Curriculum for Schools in Ghana
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
Classroom Observation Tools for Teachers
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
1_English_Language_Set_2.pdf probationary
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Empowerment Technology for Senior High School Guide
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
A systematic review of self-coping strategies used by university students to ...
Computing-Curriculum for Schools in Ghana
Indian roads congress 037 - 2012 Flexible pavement
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Classroom Observation Tools for Teachers
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Orientation - ARALprogram of Deped to the Parents.pptx
1_English_Language_Set_2.pdf probationary
Weekly quiz Compilation Jan -July 25.pdf
Digestion and Absorption of Carbohydrates, Proteina and Fats
Final Presentation General Medicine 03-08-2024.pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Empowerment Technology for Senior High School Guide
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE

October 2014 - USG Rock Eagle - Sass 101

  • 1. ` 1 PLAYER GAME MARIO 0000000 WORLD 1-1 TIME ROCK_EAGLE Simplifying and extending CSS for the 21st century! 2 PLAYER GAME
  • 2. Introductions and Shout Outs World -1-1 Section Text Body Level One MARIO 0000000 WORLD -1-1 TIME ROCK_EAGLE x 3
  • 3. Eric Sembrat • Web Manager - College of Engineering, Georgia Tech • Ph.D. Student - Instructional Technology, Georgia State ! ! • Website: http://ericsembrat.com • Twitter: @esembrat
  • 4. World Map • The State of CSS • Enter: CSS Preprocessors • How Sass Works • Sass Features • Q&A / Discussion
  • 5. And now, for some plugs..
  • 6. USGWeb Collaboration Group • Communication list for web development discussion between the 31 institutions in the University System of Georgia. ! • http://usgweb.gatech.edu
  • 8. The State of CSS World 1-1 Section Text Body Level One MARIO 0000000 WORLD 1-1 TIME ROCK_EAGLE x 3
  • 9. We’ve come a long way…
  • 10. We’ve come a long way…
  • 11. CSS Growing Up • Before CSS, there were inline element styles. <font color=“green” size=“8” family=“Wingdings”>
  • 12. CSS Growing Up • Before CSS, there were inline element styles. ! • Then CSS was born with style. <font color=“green” size=“8” family=“Wingdings”> <font style=“color: green; font-size: 8pt; font-family: Wingdings”>
  • 13. CSS Growing Up • Before CSS, there were inline element styles. ! • Then CSS was born with style. ! • Finally, CSS grew too big to live with HTML. <font color=“green” size=“8” family=“Wingdings”> <font style=“color: green; font-size: 8pt; font-family: Wingdings”> @import url(fancy-pants-css.css);
  • 14. CSS Has Not Aged Well.. Variables CSS3 Inheritance Reusability CSS Organization Media Queries Theme Templates
  • 15. Some of this will change.. • CSS4 looks to fix some of these issues (1) • Parent Selectors • Grids • However, there’s still one big elephant in the room.
  • 17. What is DRY? • Minimizing repetition of the information in a project • Modifications only happen in one place ! • Construction of repetitive, reusable, and scalable elements
  • 18. DRY in CSS • CSS does not have DRY capabilities built-in: • Variables (i.e. color, font) • Media queries • Chunks of CSS • So, how do we fix CSS and get out of this mess?
  • 19. Sass to the Rescue! http://sass-lang.com/
  • 20. What is Sass? World 2-1 Section Text Body Level One MARIO 0000000 WORLD 2-1 TIME ROCK_EAGLE x 3
  • 21. Preprocessor • Sass is a preprocessor for CSS • Converts Sass short-code into clunky, ugly CSS • Serves as a translator CSS compiles to SASS
  • 22. Sass • Sass uses a very CSS-like syntax (.SCSS) to extend new features into the syntax you already know ! • An alternative is a tab-centric syntax (.SASS)
  • 23. Compare #main { color: blue; font-size: 0.3em; • Our CSS-friendly .SCSS formatting option. http://thesassway.com/editorial/sass-vs-scss-which-syntax-is-better } #main! color: blue font-size: 0.3em • Or, the tab-centric .SASS formatting option.
  • 24. .SCSS vs. .SASS • Changing syntax is an automated process: • http://sass-lang.com/documentation/ file.SASS_REFERENCE.html#syntax
  • 25. What does Ruby run on? • Sass was originally developed as in the Ruby programming language. • Sass was recently ported over to C/C++ as LibSass.
  • 26. Using Sass World 3-1 Section Text Body Level One MARIO 0000000 WORLD 3-1 TIME ROCK_EAGLE x 3
  • 27. Web Console • SassMeister • http://sassmeister.com/
  • 28. 1) Get a App • Easiest way to get started is to download a Sass application. • http://sass-lang.com/install • Multi-platform releases • Free and paid products available
  • 29. Scout Scout - http://mhs.github.io/scout-app/
  • 30. CodeKit CodeKit - https://incident57.com/codekit/
  • 31. Sass Features World 4-1 Section Text Body Level One MARIO 0000000 WORLD 4-1 TIME ROCK_EAGLE x 3
  • 32. 2) Learn the Syntax • Learn many of the essential features of Sass. • Variables • Nesting • Mixins • Plugins • Partials • (and more!)
  • 33. Variables $pretty-blue: #0000FF; $pretty-font-size: 0.3em; ! #main { color: $pretty-blue; font-size: $pretty-font-size; } #main { color: #0000FF; font-size: 0.3em; }
  • 34. Nesting $pretty-blue: #0000FF; ! #main { color: $pretty-blue; font-size: 0.3em; #slideshow { background-color: mix(#FFF, $pretty-blue, 20%); } } #main { color: #0000FF; font-size: 0.3em; } ! #main #slideshow { background-color: #3333ff; }
  • 35. Mixins @mixin chattanooga() { background-color: pink; font-size: 25pt; } ! #body #chattanooga { @include chattanooga(); } #body #chattanooga { background-color: pink; font-size: 25pt; }
  • 36. Mixins @mixin chattanooga() { background-color: pink; font-size: 25pt; Mixins can reference mixins! } ! #body #chattanooga { @include chattanooga(); } #body #chattanooga { background-color: pink; font-size: 25pt; }
  • 37. Mixins @mixin chattanooga() { background-color: pink; font-size: 25pt; Mixins can take arguments (with } ! #body #chattanooga { default values)! @include chattanooga(); } #body #chattanooga { background-color: pink; font-size: 25pt; }
  • 38. Plugins • Compass • http://compass-style.org/ • Sass Globbing • https://github.com/chriseppstein/sass-globbing • Breakpoint • http://breakpoint-sass.com/ • Bourbon • http://bourbon.io/
  • 39. Partials compiles global.scss global.css to _hdr.scss _ftr.scss
  • 40. Configure CSS Output • Sass uses a configuration file (config.rb) to control CSS output • Requires Compass • http://compass-style.org/help/documentation/configuration-reference/
  • 41. Advanced Features World 5-1 Section Text Body Level One MARIO 0000000 WORLD 5-1 TIME ROCK_EAGLE x 3
  • 42. Block Element Modifier (BEM) • Methodology for naming classes. .BLOCK{__ELEMENT[--MODIFIER]}
  • 43. Block Element Modifier (BEM) • Methodology for naming classes. .BLOCK{__ELEMENT[--MODIFIER]} .COLOR__PRIMARY .COLOR__PRIMARY--LIGHT .COLOR__PRIMARY--DARK
  • 44. Block Element Modifier (BEM) • Can be programmatically built into Sass.
  • 45. Block Element Modifier (BEM) • Can be programmatically built into Sass.
  • 46. Source Maps • Source maps allow you to see the original source (Sass) instead of the compiled CSS while debugging.
  • 47. Source Maps • Requires enabling source-maps on Sass and in the desired browser (Chrome & Firefox, Safari). http://thesassway.com/intermediate/using-source-maps-with-sass
  • 48. • Associations of “key” | “value” objects. ! ! ! ! • Similar to programming arrays. • map-merge() • map-get() • map-remove() Maps $map: (key1: value1, key2: value2, key3: value3);
  • 49. Demo? World 6-1 Section Text Body Level One MARIO 0000000 WORLD 6-1 TIME ROCK_EAGLE x 3
  • 50. Demo Quick highlights and features!
  • 51. Let’s Chat Questions, Comments, Concerns, Discussions about Sass