SlideShare a Scribd company logo
Theming with Sass 
Bringing sassy to CSS. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
About Me 
Eric Scott Sembrat 
• Web Developer at Georgia 
Institute of Technology 
• Graduate Student at Georgia 
State University 
• Lives in Atlanta, Georgia 
! 
Twitter: @esembrat 
Website: ericsembrat.com
Game Plan 
•Knowing Your Audience 
•The State of CSS 
•Introduction to Sass 
•Features of Sass 
•Advanced Features 
•Using Sass 
•A short and lovely demo 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
You can test out Sass 
during this presentation! 
http://sassmeister.com/ 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Knowing Your 
Audience 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Who has heard of Sass? 
The preprocessor, not the attitude. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Who has used Sass? 
It’s super effective! 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
State of CSS 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Frustrations with CSS 
•CSS has not aged well. 
•Vendor-specific prefixes in CSS3. 
•Replacing a color value in a project. 
•Copying and pasting a style (over and 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
over again). 
•These are not features; they’re nightmares!
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Fixing CSS 
•What if you could give CSS a makeover? 
•Make it intelligent. 
•Make it scalable. 
•Make it re-usable. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Intro to Sass 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
History 
•Syntactically Awesome Stylesheets 
•First developed in 2007. 
! 
•Serves as: 
•Scripting language. 
•Preprocessor for CSS.
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Function 
•Sass compiles into CSS files. 
! 
•Two formatting conventions 
•.SASS 
•.SCSS
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
.SCSS 
•SCSS follows conventions of CSS.
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
.SASS 
•SASS focuses on indentation and short-hand.
Hard to Choose? 
•Sass can convert between SASS and 
SCSS with relative ease. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Sassy Components 
•A Sass project (such as a Drupal theme) 
only needs two key components: 
•config.rb 
•sass/{sass files here} 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
config.rb
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
config.rb 
Almost always auto-generated!
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
/sass/
Sassy Features 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Features 
•Sass has 5 primary features. 
•Variables 
•Nesting 
•Mixins 
•Partials 
•Inheritance
Let’s time-travel back to Computer Science 1101. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Variables
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Variables 
•Variables allow you to assign a value to an 
easy-to-remember placeholder name. 
•Works with hex values, strings of text, 
colors, numbers, boolean values, or 
even value lists. 
•No more memorizing hex values!
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Variables 
•Pro-tip: Variables have scope based on 
where they are defined.
Not the empty-nest variety. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Nesting
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Nesting 
•Nested rules allow you to break up 
endlessly long selectors of CSS.
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Nesting
It’s time to cook (up some mixins)! 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Mixins
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Mixins 
•Mixins allow you to chunk up CSS 
declarations to be reusable with one 
reference. 
•Pro-tip: Mixins can reference mixins as well.
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Mixins
Spring cleaning for CSS. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Partials
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Partials 
•CSS Fact of Life: 
•CSS files can get long (and unwieldy). 
•Sass allows you to create partial files to 
modularize and organize your code.
Visualizing Partials 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
_header.scss 
_sidebar.scss 
_page.scss 
global.scss global.css
Visualizing Partials 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
_header.scss 
_sidebar.scss 
_page.scss 
global.scss global.css
Visualizing Partials 
Sass CSS 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
_header.scss 
_sidebar.scss 
_page.scss 
global.scss global.css
Visualizing Partials 
Sass CSS 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
_header.scss 
_sidebar.scss 
_page.scss 
inherits compiles 
global.scss global.css 
inherits 
inherits
Creating Partials 
•Creating partials can be done in two steps. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Step 1: Create Partial 
•Create a _filename.scss in your SASS 
folder. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Step 2: Reference Partial 
•Reference the partial Sass file in your non-partial 
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Sass file! 
• Advanced users: see Sass Globbing. 
• https://github.com/chriseppstein/sass-globbing
Inheritance 
Copy and paste no more, theme developers! Inheritance is 
here! 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Inheritance 
•Inheritance imports syntax and style from 
another section of your SASS project. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Inheritance 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
More Features 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Vendor Prefix Woes 
•While Sass has tons of features out of the 
box, it is missing one key component: 
•CSS3 vendor-specific prefixes 
! 
•However, there is a mixin collection that 
fixes this. 
•Compass 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Eric Scott Sembrat | Georgia Institute of Technology | 2013 
Compass 
•Compass is a Sass framework extension 
focused on CSS3 and layouts. 
•http://compass-style.org/reference/ 
compass/ 
•Essentially, a big set of mixins.
Using Compass 
•Installing Compass is similar to installing 
Sass. 
•http://compass-style.org/install/ 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Using Sass 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
When to Compile Sass 
•There are two methods of using Sass on a 
Drupal website. 
•Letting Drupal Compile Sass 
•Compiling Sass locally 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Compiling Server Side 
•There’s a Drupal module for that! 
•https://drupal.org/project/sass 
•Consider memory load, revisioning, etc. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Compiling Locally 
•Most local compilers for Sass require Ruby 
to be installed. 
•Two main ways of compiling locally: 
•Command Line 
•GUIs 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Local: GUIs 
•Quite a few GUIs available: 
•http://sass-lang.com/install 
•See: Compass.app & Scout 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Local: Command Line 
•Installing locally is dependent on your OS. 
•http://sass-lang.com/install 
•Requires Ruby to be installed. 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
My Preference? 
•Personally, I’m in love with Compass.app. 
•http://compass.kkbox.com/ 
•Scout is a very good “getting started” app. 
•http://mhs.github.io/scout-app/ 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Demo? Demo! 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Want to Learn 
More? 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
More Information 
• http://sass-lang.com/guide 
• http://compass-style.org/reference/compass/ 
• http://thesassway.com/beginner/getting-started-with-sass-and-compass 
Eric Scott Sembrat | Georgia Institute of Technology | 2013
Thanks! 
Eric Scott Sembrat | Georgia Institute of Technology | 2013

More Related Content

Viewers also liked

HTML5 audio & video
HTML5 audio & videoHTML5 audio & video
HTML5 audio & video
Hamza Zahid
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
Kevin DeRudder
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
Kevin DeRudder
 
Google html5 Tutorial
Google html5 TutorialGoogle html5 Tutorial
Google html5 Tutorial
jobfan
 
HTML5 &CSS: Chapter 08
HTML5 &CSS: Chapter 08HTML5 &CSS: Chapter 08
HTML5 &CSS: Chapter 08
Steve Guinan
 
Lecture3
Lecture3Lecture3
Lecture4
Lecture4Lecture4
Introduction to HTML5 Canvas
Introduction to HTML5 CanvasIntroduction to HTML5 Canvas
Introduction to HTML5 Canvas
Mindy McAdams
 
The sunsparc architecture
The sunsparc architectureThe sunsparc architecture
The sunsparc architecture
Taha Malampatti
 
The sparc architecture (3)
The sparc architecture (3)The sparc architecture (3)
The sparc architecture (3)
vishuupra
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programming
Wondeson Emeye
 
Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)
Peter Lubbers
 
Internet protocol (ip) ppt
Internet protocol (ip) pptInternet protocol (ip) ppt
Internet protocol (ip) ppt
Dulith Kasun
 
HTML5 Canvas - The Future of Graphics on the Web
HTML5 Canvas - The Future of Graphics on the WebHTML5 Canvas - The Future of Graphics on the Web
HTML5 Canvas - The Future of Graphics on the Web
Robin Hawkes
 
Ip address
Ip addressIp address
Ip address
Amandeep Kaur
 
Assembly language 8086
Assembly language 8086Assembly language 8086
Assembly language 8086
John Cutajar
 

Viewers also liked (16)

HTML5 audio & video
HTML5 audio & videoHTML5 audio & video
HTML5 audio & video
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Google html5 Tutorial
Google html5 TutorialGoogle html5 Tutorial
Google html5 Tutorial
 
HTML5 &CSS: Chapter 08
HTML5 &CSS: Chapter 08HTML5 &CSS: Chapter 08
HTML5 &CSS: Chapter 08
 
Lecture3
Lecture3Lecture3
Lecture3
 
Lecture4
Lecture4Lecture4
Lecture4
 
Introduction to HTML5 Canvas
Introduction to HTML5 CanvasIntroduction to HTML5 Canvas
Introduction to HTML5 Canvas
 
The sunsparc architecture
The sunsparc architectureThe sunsparc architecture
The sunsparc architecture
 
The sparc architecture (3)
The sparc architecture (3)The sparc architecture (3)
The sparc architecture (3)
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programming
 
Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)
 
Internet protocol (ip) ppt
Internet protocol (ip) pptInternet protocol (ip) ppt
Internet protocol (ip) ppt
 
HTML5 Canvas - The Future of Graphics on the Web
HTML5 Canvas - The Future of Graphics on the WebHTML5 Canvas - The Future of Graphics on the Web
HTML5 Canvas - The Future of Graphics on the Web
 
Ip address
Ip addressIp address
Ip address
 
Assembly language 8086
Assembly language 8086Assembly language 8086
Assembly language 8086
 

Similar to Sass - Tutorial

October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101
Eric Sembrat
 
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass TopicsAtlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
Eric Sembrat
 
Node.js 101
 Node.js 101 Node.js 101
Node.js 101
FITC
 
CSS Workflow. Pre & Post
CSS Workflow. Pre & PostCSS Workflow. Pre & Post
CSS Workflow. Pre & Post
Anton Dosov
 
Sitting in the Driver's Seat
Sitting in the Driver's SeatSitting in the Driver's Seat
Sitting in the Driver's Seat
Jack Moffett
 
FITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedFITC - Bootstrap Unleashed
FITC - Bootstrap Unleashed
Rami Sayar
 
DrupalCamp Chattanooga - September 2014 - Sass 101
DrupalCamp Chattanooga - September 2014 - Sass 101DrupalCamp Chattanooga - September 2014 - Sass 101
DrupalCamp Chattanooga - September 2014 - Sass 101
Eric Sembrat
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Peter Procházka
 
Are Frameworks Evil; Should you care about Sitecore SXA and JSS;.pdf
Are Frameworks Evil; Should you care about Sitecore SXA and JSS;.pdfAre Frameworks Evil; Should you care about Sitecore SXA and JSS;.pdf
Are Frameworks Evil; Should you care about Sitecore SXA and JSS;.pdf
Peter Procházka
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Peter Procházka
 
Responsive & Adaptive Web Design
Responsive & Adaptive Web DesignResponsive & Adaptive Web Design
Responsive & Adaptive Web Design
☆ Milan Adamovsky ☆
 
CSS3: Simply Responsive
CSS3: Simply ResponsiveCSS3: Simply Responsive
CSS3: Simply Responsive
Denise Jacobs
 
Slides-Online-Week2-Website-Frontend-CSS.pptx
Slides-Online-Week2-Website-Frontend-CSS.pptxSlides-Online-Week2-Website-Frontend-CSS.pptx
Slides-Online-Week2-Website-Frontend-CSS.pptx
ahmadraza72678
 
Georgia Tech - College of Engineering Case Study
Georgia Tech - College of Engineering Case StudyGeorgia Tech - College of Engineering Case Study
Georgia Tech - College of Engineering Case Study
Eric Sembrat
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1
Mudasir Syed
 
Css presentation lecture 3
Css presentation lecture 3Css presentation lecture 3
Css presentation lecture 3
Mudasir Syed
 
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Derek Ashmore
 
Oooh shiny
Oooh shinyOooh shiny
Oooh shiny
wcto2017
 
Media Queries in CSS and Sass
Media Queries in CSS and SassMedia Queries in CSS and Sass
Media Queries in CSS and Sass
Eric Sembrat
 
Ast in CI/CD by Ofer Maor
Ast in CI/CD by Ofer MaorAst in CI/CD by Ofer Maor
Ast in CI/CD by Ofer Maor
DevSecCon
 

Similar to Sass - Tutorial (20)

October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101
 
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass TopicsAtlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
Atlanta Drupal User's Group - April 2015 - Sasstronauts: Advanced Sass Topics
 
Node.js 101
 Node.js 101 Node.js 101
Node.js 101
 
CSS Workflow. Pre & Post
CSS Workflow. Pre & PostCSS Workflow. Pre & Post
CSS Workflow. Pre & Post
 
Sitting in the Driver's Seat
Sitting in the Driver's SeatSitting in the Driver's Seat
Sitting in the Driver's Seat
 
FITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedFITC - Bootstrap Unleashed
FITC - Bootstrap Unleashed
 
DrupalCamp Chattanooga - September 2014 - Sass 101
DrupalCamp Chattanooga - September 2014 - Sass 101DrupalCamp Chattanooga - September 2014 - Sass 101
DrupalCamp Chattanooga - September 2014 - Sass 101
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
 
Are Frameworks Evil; Should you care about Sitecore SXA and JSS;.pdf
Are Frameworks Evil; Should you care about Sitecore SXA and JSS;.pdfAre Frameworks Evil; Should you care about Sitecore SXA and JSS;.pdf
Are Frameworks Evil; Should you care about Sitecore SXA and JSS;.pdf
 
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
Are Frameworks Evil? Should you care about Sitecore SXA and JSS?
 
Responsive & Adaptive Web Design
Responsive & Adaptive Web DesignResponsive & Adaptive Web Design
Responsive & Adaptive Web Design
 
CSS3: Simply Responsive
CSS3: Simply ResponsiveCSS3: Simply Responsive
CSS3: Simply Responsive
 
Slides-Online-Week2-Website-Frontend-CSS.pptx
Slides-Online-Week2-Website-Frontend-CSS.pptxSlides-Online-Week2-Website-Frontend-CSS.pptx
Slides-Online-Week2-Website-Frontend-CSS.pptx
 
Georgia Tech - College of Engineering Case Study
Georgia Tech - College of Engineering Case StudyGeorgia Tech - College of Engineering Case Study
Georgia Tech - College of Engineering Case Study
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1
 
Css presentation lecture 3
Css presentation lecture 3Css presentation lecture 3
Css presentation lecture 3
 
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
 
Oooh shiny
Oooh shinyOooh shiny
Oooh shiny
 
Media Queries in CSS and Sass
Media Queries in CSS and SassMedia Queries in CSS and Sass
Media Queries in CSS and Sass
 
Ast in CI/CD by Ofer Maor
Ast in CI/CD by Ofer MaorAst in CI/CD by Ofer Maor
Ast in CI/CD by Ofer Maor
 

More from Danilo Sousa

Templates js-
Templates js-Templates js-
Templates js-
Danilo Sousa
 
jquery examples
jquery examplesjquery examples
jquery examples
Danilo Sousa
 
VISUAL CHEAT SHEET
VISUAL CHEAT SHEETVISUAL CHEAT SHEET
VISUAL CHEAT SHEET
Danilo Sousa
 
Iniciando com jquery
Iniciando com jqueryIniciando com jquery
Iniciando com jquery
Danilo Sousa
 
Iniciando com Jquery
Iniciando com JqueryIniciando com Jquery
Iniciando com Jquery
Danilo Sousa
 
JQUERY CONF 2011Gwt kenjiyamamoto-111220113950-phpapp01
JQUERY CONF 2011Gwt kenjiyamamoto-111220113950-phpapp01JQUERY CONF 2011Gwt kenjiyamamoto-111220113950-phpapp01
JQUERY CONF 2011Gwt kenjiyamamoto-111220113950-phpapp01
Danilo Sousa
 
Campus Party 2011 html 5
Campus Party 2011 html 5Campus Party 2011 html 5
Campus Party 2011 html 5
Danilo Sousa
 
Ninja html 5 css javascript
Ninja html 5 css javascriptNinja html 5 css javascript
Ninja html 5 css javascript
Danilo Sousa
 
Alta produtividade com front end com sass e compass
Alta produtividade com front end com sass e compassAlta produtividade com front end com sass e compass
Alta produtividade com front end com sass e compass
Danilo Sousa
 
CSS 3 Overview
CSS 3 OverviewCSS 3 Overview
CSS 3 Overview
Danilo Sousa
 
Ux para agencias de publicidade
Ux para agencias de publicidade Ux para agencias de publicidade
Ux para agencias de publicidade
Danilo Sousa
 

More from Danilo Sousa (11)

Templates js-
Templates js-Templates js-
Templates js-
 
jquery examples
jquery examplesjquery examples
jquery examples
 
VISUAL CHEAT SHEET
VISUAL CHEAT SHEETVISUAL CHEAT SHEET
VISUAL CHEAT SHEET
 
Iniciando com jquery
Iniciando com jqueryIniciando com jquery
Iniciando com jquery
 
Iniciando com Jquery
Iniciando com JqueryIniciando com Jquery
Iniciando com Jquery
 
JQUERY CONF 2011Gwt kenjiyamamoto-111220113950-phpapp01
JQUERY CONF 2011Gwt kenjiyamamoto-111220113950-phpapp01JQUERY CONF 2011Gwt kenjiyamamoto-111220113950-phpapp01
JQUERY CONF 2011Gwt kenjiyamamoto-111220113950-phpapp01
 
Campus Party 2011 html 5
Campus Party 2011 html 5Campus Party 2011 html 5
Campus Party 2011 html 5
 
Ninja html 5 css javascript
Ninja html 5 css javascriptNinja html 5 css javascript
Ninja html 5 css javascript
 
Alta produtividade com front end com sass e compass
Alta produtividade com front end com sass e compassAlta produtividade com front end com sass e compass
Alta produtividade com front end com sass e compass
 
CSS 3 Overview
CSS 3 OverviewCSS 3 Overview
CSS 3 Overview
 
Ux para agencias de publicidade
Ux para agencias de publicidade Ux para agencias de publicidade
Ux para agencias de publicidade
 

Recently uploaded

一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
bseovas
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
zyfovom
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
wolfsoftcompanyco
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
ysasp1
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
cuobya
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
Toptal Tech
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
uehowe
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 

Recently uploaded (20)

一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 

Sass - Tutorial

  • 1. Theming with Sass Bringing sassy to CSS. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 2. Eric Scott Sembrat | Georgia Institute of Technology | 2013 About Me Eric Scott Sembrat • Web Developer at Georgia Institute of Technology • Graduate Student at Georgia State University • Lives in Atlanta, Georgia ! Twitter: @esembrat Website: ericsembrat.com
  • 3. Game Plan •Knowing Your Audience •The State of CSS •Introduction to Sass •Features of Sass •Advanced Features •Using Sass •A short and lovely demo Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 4. You can test out Sass during this presentation! http://sassmeister.com/ Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 5. Knowing Your Audience Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 6. Who has heard of Sass? The preprocessor, not the attitude. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 7. Who has used Sass? It’s super effective! Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 8. State of CSS Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 9. Frustrations with CSS •CSS has not aged well. •Vendor-specific prefixes in CSS3. •Replacing a color value in a project. •Copying and pasting a style (over and Eric Scott Sembrat | Georgia Institute of Technology | 2013 over again). •These are not features; they’re nightmares!
  • 10. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 11. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 12. Fixing CSS •What if you could give CSS a makeover? •Make it intelligent. •Make it scalable. •Make it re-usable. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 13. Intro to Sass Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 14. Eric Scott Sembrat | Georgia Institute of Technology | 2013 History •Syntactically Awesome Stylesheets •First developed in 2007. ! •Serves as: •Scripting language. •Preprocessor for CSS.
  • 15. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Function •Sass compiles into CSS files. ! •Two formatting conventions •.SASS •.SCSS
  • 16. Eric Scott Sembrat | Georgia Institute of Technology | 2013 .SCSS •SCSS follows conventions of CSS.
  • 17. Eric Scott Sembrat | Georgia Institute of Technology | 2013 .SASS •SASS focuses on indentation and short-hand.
  • 18. Hard to Choose? •Sass can convert between SASS and SCSS with relative ease. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 19. Sassy Components •A Sass project (such as a Drupal theme) only needs two key components: •config.rb •sass/{sass files here} Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 20. Eric Scott Sembrat | Georgia Institute of Technology | 2013 config.rb
  • 21. Eric Scott Sembrat | Georgia Institute of Technology | 2013 config.rb Almost always auto-generated!
  • 22. Eric Scott Sembrat | Georgia Institute of Technology | 2013 /sass/
  • 23. Sassy Features Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 24. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Features •Sass has 5 primary features. •Variables •Nesting •Mixins •Partials •Inheritance
  • 25. Let’s time-travel back to Computer Science 1101. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Variables
  • 26. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Variables •Variables allow you to assign a value to an easy-to-remember placeholder name. •Works with hex values, strings of text, colors, numbers, boolean values, or even value lists. •No more memorizing hex values!
  • 27. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Variables •Pro-tip: Variables have scope based on where they are defined.
  • 28. Not the empty-nest variety. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Nesting
  • 29. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Nesting •Nested rules allow you to break up endlessly long selectors of CSS.
  • 30. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Nesting
  • 31. It’s time to cook (up some mixins)! Eric Scott Sembrat | Georgia Institute of Technology | 2013 Mixins
  • 32. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Mixins •Mixins allow you to chunk up CSS declarations to be reusable with one reference. •Pro-tip: Mixins can reference mixins as well.
  • 33. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Mixins
  • 34. Spring cleaning for CSS. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Partials
  • 35. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Partials •CSS Fact of Life: •CSS files can get long (and unwieldy). •Sass allows you to create partial files to modularize and organize your code.
  • 36. Visualizing Partials Eric Scott Sembrat | Georgia Institute of Technology | 2013 _header.scss _sidebar.scss _page.scss global.scss global.css
  • 37. Visualizing Partials Eric Scott Sembrat | Georgia Institute of Technology | 2013 _header.scss _sidebar.scss _page.scss global.scss global.css
  • 38. Visualizing Partials Sass CSS Eric Scott Sembrat | Georgia Institute of Technology | 2013 _header.scss _sidebar.scss _page.scss global.scss global.css
  • 39. Visualizing Partials Sass CSS Eric Scott Sembrat | Georgia Institute of Technology | 2013 _header.scss _sidebar.scss _page.scss inherits compiles global.scss global.css inherits inherits
  • 40. Creating Partials •Creating partials can be done in two steps. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 41. Step 1: Create Partial •Create a _filename.scss in your SASS folder. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 42. Step 2: Reference Partial •Reference the partial Sass file in your non-partial Eric Scott Sembrat | Georgia Institute of Technology | 2013 Sass file! • Advanced users: see Sass Globbing. • https://github.com/chriseppstein/sass-globbing
  • 43. Inheritance Copy and paste no more, theme developers! Inheritance is here! Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 44. Inheritance •Inheritance imports syntax and style from another section of your SASS project. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 45. Inheritance Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 46. More Features Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 47. Vendor Prefix Woes •While Sass has tons of features out of the box, it is missing one key component: •CSS3 vendor-specific prefixes ! •However, there is a mixin collection that fixes this. •Compass Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 48. Eric Scott Sembrat | Georgia Institute of Technology | 2013 Compass •Compass is a Sass framework extension focused on CSS3 and layouts. •http://compass-style.org/reference/ compass/ •Essentially, a big set of mixins.
  • 49. Using Compass •Installing Compass is similar to installing Sass. •http://compass-style.org/install/ Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 50. Using Sass Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 51. When to Compile Sass •There are two methods of using Sass on a Drupal website. •Letting Drupal Compile Sass •Compiling Sass locally Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 52. Compiling Server Side •There’s a Drupal module for that! •https://drupal.org/project/sass •Consider memory load, revisioning, etc. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 53. Compiling Locally •Most local compilers for Sass require Ruby to be installed. •Two main ways of compiling locally: •Command Line •GUIs Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 54. Local: GUIs •Quite a few GUIs available: •http://sass-lang.com/install •See: Compass.app & Scout Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 55. Local: Command Line •Installing locally is dependent on your OS. •http://sass-lang.com/install •Requires Ruby to be installed. Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 56. My Preference? •Personally, I’m in love with Compass.app. •http://compass.kkbox.com/ •Scout is a very good “getting started” app. •http://mhs.github.io/scout-app/ Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 57. Demo? Demo! Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 58. Want to Learn More? Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 59. More Information • http://sass-lang.com/guide • http://compass-style.org/reference/compass/ • http://thesassway.com/beginner/getting-started-with-sass-and-compass Eric Scott Sembrat | Georgia Institute of Technology | 2013
  • 60. Thanks! Eric Scott Sembrat | Georgia Institute of Technology | 2013