SlideShare a Scribd company logo
1 of 42
Download to read offline
SASS
Time to bring some sassy to CSS.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Who am I?
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Eric Sembrat
Web Developer for
College of Sciences
Graduate Student at
Georgia State
University
Twitter - @esembrat
http://ericsembrat.com
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
SASS?
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Imagine CSS with
the power of...
Nested Rules
Mixins / Objects
Variables
Inheritance
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Sassy CSS (.SCSS)
is compiled into CSS.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
What can you
do with SASS?
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Nesting
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Variables
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Inheritance
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Mixins
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Power of Mixins
Chunking CSS into its
own function.
Great when you need
to reuse a lot of CSS.
“Mixing into” your
stylesheet.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
But wait, there’s
more.
Mixins can have arguments.
And even preset default
values.
And can include other mixins.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Parent Refs
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Functions
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Functions
Most recent feature of SASS.
Great for complex math.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Partials (@import)
Separate your SASS into
partials (_filename.scss) to be
compiled into a .SCSS file.
Requires the host SASS file to
@import filename;
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Visualizing
Partials
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
_front.scss
_profile.scss
style.scss
style.scss style.css
Visualizing
Partials
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
_front.scss
_profile.scss
style.scss
style.scss style.css
@import “front”,
“profile”;
.SASS vs .SCSS
.SCSS should look familiar to
CSS users.
.SASS goes one step further
and works with white-
space/indention aware
syntax.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
.SASS vs .SCSS
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
SASS can also convert between
the two formats!
So, how exactly does
this help me?
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Writing with
SASS can...
Bring order to chaos that is CSS.
Allow you to easily reuse CSS
chunks.
Easily apply style conventions.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Compass?
(believe me, you’ll want it)
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Sailing with
Compass
Extends SASS framework.
Makes cross-browser CSS3 a breeze.
Makes implementing sprites easier.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Compass provides...
A series of mix-ins.
Lots of documentation
http://compass-style.org/
reference/compass/
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
SASS + Compass
=
CSS nirvana
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Okay, so, show me
how it works.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
#zone-menu-wrapper {
@include background-image(linear-
gradient(bottom,$gtnavy, #24486b));
background-color: $gtnavy;
border-bottom: 2px solid $gtgold2;
}
Compass
SASS
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
#zone-menu-wrapper {
background-image: -webkit-gradient(linear, 50%
100%, 50% 0%, color-stop(0%, #00254c), color-
stop(100%, #24486b));
background-image: -webkit-linear-
gradient(bottom, #00254c, #24486b);
background-image: -moz-linear-
gradient(bottom, #00254c, #24486b);
background-image: -o-linear-gradient(bottom,
#00254c, #24486b);
background-image: linear-gradient(bottom,
#00254c, #24486b);
background-color: #00254c;
border-bottom: 2px solid #eeb221;
}
(ugly, ugly)
CSS
SASS can be compiled
either...
At runtime
Or locally
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Sold. How do you
make me SASSy?
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Compass.app (Mac)
http://compass-style.org/
http://compass.handlino.com/
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Scout (Win, Mac)
http://mhs.github.com/scout-app/
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Terminal (Nerds)
http://thesassway.com/beginner/getting-started-with-sass-and-
compass
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Drupal (Runtime)
http://drupal.org/project/sass
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
One more thing..
Font-Awesome!
Make your text sassy, too!
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
http://fortawesome.github.com/Font-
Awesome/
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Bring your theme into the 21st century
with sassy little icons!
Easily importable into your SASS
themes.
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Questions? Concerns?
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat
Resources
SASS
http://sass-lang.com/docs/yardoc/
file.SASS_REFERENCE.html
http://sass-lang.com/tutorial.html
Compass
http://compass-style.org/reference/compass/
GT Drupal Users Group (GTDUG) - 2013 - Eric Sembrat

More Related Content

Similar to Drupal 7: Theming with the SASS Framework

MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentation
Charlie Moad
 
SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESS
Itai Koren
 
3 coding101 fewd_lesson3_your_first_website 20210105
3 coding101 fewd_lesson3_your_first_website 202101053 coding101 fewd_lesson3_your_first_website 20210105
3 coding101 fewd_lesson3_your_first_website 20210105
John Picasso
 

Similar to Drupal 7: Theming with the SASS Framework (20)

Using the PostgreSQL Extension Ecosystem for Advanced Analytics
Using the PostgreSQL Extension Ecosystem for Advanced AnalyticsUsing the PostgreSQL Extension Ecosystem for Advanced Analytics
Using the PostgreSQL Extension Ecosystem for Advanced Analytics
 
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAdvanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
 
Bridging the gap between designers and developers at the Guardian
Bridging the gap between designers and developers at the GuardianBridging the gap between designers and developers at the Guardian
Bridging the gap between designers and developers at the Guardian
 
Introduction to Grunt.js on Taiwan JavaScript Conference
Introduction to Grunt.js on Taiwan JavaScript ConferenceIntroduction to Grunt.js on Taiwan JavaScript Conference
Introduction to Grunt.js on Taiwan JavaScript Conference
 
MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentation
 
Basics of html5, data_storage, css3
Basics of html5, data_storage, css3Basics of html5, data_storage, css3
Basics of html5, data_storage, css3
 
Web Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at GoogleWeb Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at Google
 
SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESS
 
Magento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive gridMagento x codekit x sass x compass x skeleton responsive grid
Magento x codekit x sass x compass x skeleton responsive grid
 
3 coding101 fewd_lesson3_your_first_website 20210105
3 coding101 fewd_lesson3_your_first_website 202101053 coding101 fewd_lesson3_your_first_website 20210105
3 coding101 fewd_lesson3_your_first_website 20210105
 
Test upload
Test uploadTest upload
Test upload
 
World is changed. i feel it in the front end
World is changed. i feel it in the front endWorld is changed. i feel it in the front end
World is changed. i feel it in the front end
 
Html5
Html5Html5
Html5
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
SAS on Your (Apache) Cluster, Serving your Data (Analysts)
SAS on Your (Apache) Cluster, Serving your Data (Analysts)SAS on Your (Apache) Cluster, Serving your Data (Analysts)
SAS on Your (Apache) Cluster, Serving your Data (Analysts)
 
WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop API
 
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
 
CSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and ConsCSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and Cons
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet language
 

More from Eric Sembrat

HighEdWeb 2017 - Unbundle Your Institution: Building a Web Ecosystem
HighEdWeb 2017 - Unbundle Your Institution: Building a Web EcosystemHighEdWeb 2017 - Unbundle Your Institution: Building a Web Ecosystem
HighEdWeb 2017 - Unbundle Your Institution: Building a Web Ecosystem
Eric Sembrat
 
October 2016 - edUi - Save Us, Self Service!
October 2016 - edUi - Save Us, Self Service!October 2016 - edUi - Save Us, Self Service!
October 2016 - edUi - Save Us, Self Service!
Eric Sembrat
 

More from Eric Sembrat (20)

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

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Drupal 7: Theming with the SASS Framework