SlideShare a Scribd company logo
What is ?
And Why You Should Be SASSy
by Lucas Castro
Laziness is Good!
What is-sass-by-lucas-castro
Laziness is Good!
• Cultural notion that designers and devs think
differently (right VS left).
• Thinking adapts to the activities we do.
• Design lends itself to uniqueness.
• Coding lends itself to "laziness."
Laziness leads to Innovation
• Smart laziness = drive to be efficient.
• Developers are always finding ways to be more
efficient.
• When the tools are inadequate, we build new tools.
• This notion powers the open-source community.
HTML is Repetitive
• HTML + CSS form the basis for web development.
• By itself, HTML is static.
• Forces manual repetition, because it cannot be setup as
modules or templates.
• We quickly learn this in practice, when a client asks for a
change to repetitive sections, like headers and footers.
• Problem can be solved with templating languages and
server-side languages.
CSS is Repetitive
• Properties are often repeated (e.g., border radius and
shadows).
• Values are often repeated throughout a site (e.g.,
colours and font properties).
• Selector hell…
What is-sass-by-lucas-castro
Don’t Repeat Yourself
The “DRY” Principle
–Chris Peters
“A basic strategy for reducing
complexity to manageable units is to
divide a system into pieces.”
Keeping Your Styles DRY
• Not repeating property: value pairs.
• Not repeating values.
• Not repeating selectors.
• Making your code modular.
• Making code more legible and manageable.
What is ?
What is SASS?
• Official site calls it "CSS with superpowers."
• SASS is a CSS extension language.
• Has many powerful features beyond what static CSS
can provide.
• SASS is a preprocessing language that compiles into
CSS
Reasons to Use SASS
• Reduces development time.
• Follows the DRY principle.
• Makes code cleaner and more legible.
Features
Focusing on High Impact for New Users
• Fixes selector hell.
• Specific context » generic children » interaction states
Nesting
–Mario Ricalde
“The Inception Rule: don’t go more 
than four levels deep.”
• Children go inside a parent’s { } brackets.
• Ampersand (&) refers to current chain of selectors.
• Useful for adding selectors before the current
chain.
• Useful for adding classes and pseudo-classes.
Nesting — Syntax
What is-sass-by-lucas-castro
What is-sass-by-lucas-castro
• E.g., colour palette, box padding, border radius, font
sizes, font families, etc.
• Keep values DRY.
• Organize repeatable values in one place.
• Can be used with operators, mixins, and functions.
Variables
• Dollar symbol ($) prefix.
• Follows the same rule as CSS properties.
• $name: value;
Variables — Syntax
What is-sass-by-lucas-castro
Mixins
• Output lines of SASS.
• Contents can be the same as SASS in general.
• E.g., selectors, properties, values.
• Can call functions and other mixins.
• AVOID using mixins when all you need is a value
(see section on Functions).
• Definition:
• @mixin name ($variables: value) {

[mixin output]

}
• Call:
• @include name ($values);
Mixins — Syntax
What is-sass-by-lucas-castro
What is-sass-by-lucas-castro
Functions
• Return a value.
• Can be used anywhere that calls for a value.
• Typically used for performing operations and running
values through other functions.
• SASS has dozens of built-in functions for manipulating
colours, opacity, strings, numbers, lists, and arrays.
• Power some of the best SASS libraries.
• Definition:
• @function name ($variables: value) {

[operations on $variables]

@return $variables;

}
• Call:
• name ($values)
Functions — Syntax
What is-sass-by-lucas-castro
Selector Inheritance
• Used to extend styles of one element to others.
• Powerful way to avoid repetition.
• Placeholders can be used to minimize CSS footprint.
• Selector:
• [selector] { }
• Placeholder — use percentage symbol (%) prefix:
• %placeholder { }
• Call:
• @extend [selector or placeholder];
Inheritance — Syntax
What is-sass-by-lucas-castro
Selector Inheritance
• CAUTION: Child styles from the source element will
be passed on to the target of the @extend directive.
What is-sass-by-lucas-castro
Partials
• Allow for modularity with SASS code.
• Unlike CSS @import, SASS @import is compiled.
• No additional HTTP request is made.
• Underscore (_) prefix.
• Will not compile individually.
• Call:
• @import “partial”;
Partials — Syntax
What is-sass-by-lucas-castro
Putting It All Together
A Sample Project
What is-sass-by-lucas-castro
Getting Started
–Zig Ziglar
“You don't have to be great to start, but
you have to start to be great.”
Getting Started
• SCSS syntax is a superset of, and fully compatible
with, CSS!
• Simplest, and most high impact, way to start is using
variables and nesting.
• Work your way up to using selector inheritance,
mixins, and functions.
Getting Started — Tools
• Can use Compass to compile via the command line.
• Free apps include Scout and Koala.
• Excellent paid app: Prepros.
• Less featured-rich free version available.
• http://prepros.io
Getting Started — Tools
• Explore using an on-demand grid system, such as
Neat or Susy.
• Powered by SASS variables, mixins, and
functions.
• Lightweight CSS output, compared to
frameworks such as Bootstrap and Foundation.
• Neat pairs nicely with Bourbon, which is a
lightweight mixin library.
Time to Get S SSy
Any Questions?
Lucas Castro
lucas.castro@gmail.com
@lucasunplugged
castrolucas
g
k
Get in Touch!

More Related Content

PPTX
Journey To The Front End World - Part2 - The Cosmetic
PDF
Intro to css & sass
PPTX
Designing Windows apps with Xaml
KEY
Wrangling the CSS Beast with Sass
PPTX
SASS - Syntactically Awesome Stylesheet
PPTX
Getting Started With CSS
KEY
Intro to SASS CSS
PPTX
Css intro
Journey To The Front End World - Part2 - The Cosmetic
Intro to css & sass
Designing Windows apps with Xaml
Wrangling the CSS Beast with Sass
SASS - Syntactically Awesome Stylesheet
Getting Started With CSS
Intro to SASS CSS
Css intro

What's hot (20)

PPT
Website with HTML CSS
PPTX
PDF
Perfect Styling - How to write better CSS
PDF
Perfect Code
PDF
Software Patterns
PDF
2 introduction css
PPTX
Oooh shiny
PPTX
Cascading style sheet an introduction
ODP
Deep dive into sass
ODP
Sass presentation
PDF
CSS Grid
PDF
4. Web Technology CSS Basics-1
PPTX
.Less - CSS done right
ODP
HTML5, CSS, JavaScript Style guide and coding conventions
PPTX
Course outline Website Design & Development
KEY
Intro to Ruby on Rails
PPTX
PDF
Sane CSS - A modern approach to CSS
KEY
WordCamp NYC - DRY CSS
PPTX
Website with HTML CSS
Perfect Styling - How to write better CSS
Perfect Code
Software Patterns
2 introduction css
Oooh shiny
Cascading style sheet an introduction
Deep dive into sass
Sass presentation
CSS Grid
4. Web Technology CSS Basics-1
.Less - CSS done right
HTML5, CSS, JavaScript Style guide and coding conventions
Course outline Website Design & Development
Intro to Ruby on Rails
Sane CSS - A modern approach to CSS
WordCamp NYC - DRY CSS
Ad

Similar to What is-sass-by-lucas-castro (20)

KEY
Advanced sass/compass
PPTX
PDF
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
PDF
Dangerous CSS
PPTX
lec11_CSS.pptx web page description desi
PDF
DrupalCamp Chattanooga - September 2014 - Sass 101
PPTX
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
PPTX
PPT
Web design-workflow
PDF
LESS is More
PPTX
PDF
Cascading Style Sheets for web development
PPTX
PPTX
Castro Chapter 7
PDF
Css preprocessor-140606115334-phpapp01
PDF
CSS preprocessor: why and how
PPTX
ADF - Layout Managers and Skinning
PPTX
Unit 2 WT-CSS.pptx web technology project
PDF
CSS workshop @ OutSystems
PPS
Introduction to Bootstrap: Design for Developers
Advanced sass/compass
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
Dangerous CSS
lec11_CSS.pptx web page description desi
DrupalCamp Chattanooga - September 2014 - Sass 101
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
Web design-workflow
LESS is More
Cascading Style Sheets for web development
Castro Chapter 7
Css preprocessor-140606115334-phpapp01
CSS preprocessor: why and how
ADF - Layout Managers and Skinning
Unit 2 WT-CSS.pptx web technology project
CSS workshop @ OutSystems
Introduction to Bootstrap: Design for Developers
Ad

Recently uploaded (20)

PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
L1 - Introduction to python Backend.pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Digital Strategies for Manufacturing Companies
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
System and Network Administration Chapter 2
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Design an Analysis of Algorithms I-SECS-1021-03
L1 - Introduction to python Backend.pptx
How to Choose the Right IT Partner for Your Business in Malaysia
Navsoft: AI-Powered Business Solutions & Custom Software Development
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Digital Strategies for Manufacturing Companies
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
ISO 45001 Occupational Health and Safety Management System
System and Network Administration Chapter 2
PTS Company Brochure 2025 (1).pdf.......
Which alternative to Crystal Reports is best for small or large businesses.pdf
Odoo POS Development Services by CandidRoot Solutions
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Operating system designcfffgfgggggggvggggggggg
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Understanding Forklifts - TECH EHS Solution
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool

What is-sass-by-lucas-castro

  • 1. What is ? And Why You Should Be SASSy by Lucas Castro
  • 4. Laziness is Good! • Cultural notion that designers and devs think differently (right VS left). • Thinking adapts to the activities we do. • Design lends itself to uniqueness. • Coding lends itself to "laziness."
  • 5. Laziness leads to Innovation • Smart laziness = drive to be efficient. • Developers are always finding ways to be more efficient. • When the tools are inadequate, we build new tools. • This notion powers the open-source community.
  • 6. HTML is Repetitive • HTML + CSS form the basis for web development. • By itself, HTML is static. • Forces manual repetition, because it cannot be setup as modules or templates. • We quickly learn this in practice, when a client asks for a change to repetitive sections, like headers and footers. • Problem can be solved with templating languages and server-side languages.
  • 7. CSS is Repetitive • Properties are often repeated (e.g., border radius and shadows). • Values are often repeated throughout a site (e.g., colours and font properties). • Selector hell…
  • 9. Don’t Repeat Yourself The “DRY” Principle
  • 10. –Chris Peters “A basic strategy for reducing complexity to manageable units is to divide a system into pieces.”
  • 11. Keeping Your Styles DRY • Not repeating property: value pairs. • Not repeating values. • Not repeating selectors. • Making your code modular. • Making code more legible and manageable.
  • 13. What is SASS? • Official site calls it "CSS with superpowers." • SASS is a CSS extension language. • Has many powerful features beyond what static CSS can provide. • SASS is a preprocessing language that compiles into CSS
  • 14. Reasons to Use SASS • Reduces development time. • Follows the DRY principle. • Makes code cleaner and more legible.
  • 15. Features Focusing on High Impact for New Users
  • 16. • Fixes selector hell. • Specific context » generic children » interaction states Nesting –Mario Ricalde “The Inception Rule: don’t go more  than four levels deep.”
  • 17. • Children go inside a parent’s { } brackets. • Ampersand (&) refers to current chain of selectors. • Useful for adding selectors before the current chain. • Useful for adding classes and pseudo-classes. Nesting — Syntax
  • 20. • E.g., colour palette, box padding, border radius, font sizes, font families, etc. • Keep values DRY. • Organize repeatable values in one place. • Can be used with operators, mixins, and functions. Variables
  • 21. • Dollar symbol ($) prefix. • Follows the same rule as CSS properties. • $name: value; Variables — Syntax
  • 23. Mixins • Output lines of SASS. • Contents can be the same as SASS in general. • E.g., selectors, properties, values. • Can call functions and other mixins. • AVOID using mixins when all you need is a value (see section on Functions).
  • 24. • Definition: • @mixin name ($variables: value) {
 [mixin output]
 } • Call: • @include name ($values); Mixins — Syntax
  • 27. Functions • Return a value. • Can be used anywhere that calls for a value. • Typically used for performing operations and running values through other functions. • SASS has dozens of built-in functions for manipulating colours, opacity, strings, numbers, lists, and arrays. • Power some of the best SASS libraries.
  • 28. • Definition: • @function name ($variables: value) {
 [operations on $variables]
 @return $variables;
 } • Call: • name ($values) Functions — Syntax
  • 30. Selector Inheritance • Used to extend styles of one element to others. • Powerful way to avoid repetition. • Placeholders can be used to minimize CSS footprint.
  • 31. • Selector: • [selector] { } • Placeholder — use percentage symbol (%) prefix: • %placeholder { } • Call: • @extend [selector or placeholder]; Inheritance — Syntax
  • 33. Selector Inheritance • CAUTION: Child styles from the source element will be passed on to the target of the @extend directive.
  • 35. Partials • Allow for modularity with SASS code. • Unlike CSS @import, SASS @import is compiled. • No additional HTTP request is made.
  • 36. • Underscore (_) prefix. • Will not compile individually. • Call: • @import “partial”; Partials — Syntax
  • 38. Putting It All Together A Sample Project
  • 40. Getting Started –Zig Ziglar “You don't have to be great to start, but you have to start to be great.”
  • 41. Getting Started • SCSS syntax is a superset of, and fully compatible with, CSS! • Simplest, and most high impact, way to start is using variables and nesting. • Work your way up to using selector inheritance, mixins, and functions.
  • 42. Getting Started — Tools • Can use Compass to compile via the command line. • Free apps include Scout and Koala. • Excellent paid app: Prepros. • Less featured-rich free version available. • http://prepros.io
  • 43. Getting Started — Tools • Explore using an on-demand grid system, such as Neat or Susy. • Powered by SASS variables, mixins, and functions. • Lightweight CSS output, compared to frameworks such as Bootstrap and Foundation. • Neat pairs nicely with Bourbon, which is a lightweight mixin library.
  • 44. Time to Get S SSy