SlideShare a Scribd company logo
Revamp Your
Stylesheets
Gary Homidas
UX Designer and Front-end Developer
mail@ghomidas.com
What’s the
point?
The beauty of it all. You can write standard CSS and begin to use the features of
the preprocessor as you work. Your code will become more complex as your
knowledge grows.
It is a time saver…. seriously!
• What’s wrong with your CSS?
• Learn the fundamentals
• Play with Code
• 3rd Party Tools
Online Editors:
• LESS: http://lesscss.org/less-preview/
• SASS: http://www.sasseditor.xyz/
Objectives
What’s wrong
with your CSS?
 She becomes too high maintenance (updating colors, images,
fonts, etc.)
 Redundant selectors
 Lengthier document
 Vendor prefixes
Similarities between LESS and SASS
∎Variables
∎Mixins
∎Nesting
∎Functions
∎Import
∎Conditional / Comparison Operators
∎Loops
∎3rd Party Tools
Learning the
Fundamentals
Variables
a + 4 = 7When a = 3
Just like you’ve learned in school!
• Makes reusing code easy
• Can be treated like a variable or function.
• Can include CSS selectors and their attributes (nested
Classes/ID's)
• Great way to print different attributes based on a situation
Blending things together
Mixins
• Pass arguments and include conditional statements and loops
• Accept “named parameters” (LESS) or “keyword Arguments”
(SASS) where you can explicitly designate which argument to
satisfy
• LESS allows you to declare multiple mixins with the same name
and accepting different number of arguments
Mixins
∎ Allows coder to visualize the selector’s
hierarchy
∎ Minimizes scrolling throughout the file and
reduces the size of your CSS file
Nesting
The key here is “program” with
flexibility in mind
∎Pass values to your mixin/function for a more of dynamic stylesheet
∎LESS uses mixins as functions
∎SASS can use either mixins or actual functions
∎Both can be used to return a value
Functions
“Program” with flexibility in mind
∎LESS returns values by assigning the results into a variable
∎SASS has the “return” keyword
∎SASS function returns single value of any SASS data type, including:
numbers, strings, colors, booleans, or lists.
Functions
∎Allows the author to include other stylesheets into project.
∎Compartmentalize your styles while reducing http requests
∎Both will merge files with their respective file extension into a single
CSS
file.
∎Both treat files with the CSS extension as a normal CSS import
Import
 LESS Exception: You can import a CSS file directly into the LESS
file using the @import (inline) directive (one http request). See
Examples
 SASS allows you to import multiple files w/ one import
 SASS: some circumstances where the traditional import will be
used are as follows: If the @import has any media queries, url, and
others
Import
CONDITIONAL STATEMENTS
Only add specific styles under certain
situations. For example, if a statement
is true, execute a code.
COMPARRISON OPERATORS
Compare arguments and execute code
based on the items. For example, when
a text color is dark, change to a light
background color
Logical Operators
 LESS calls them “Mixin Guards”
 LESS tries to stick to the declarative nature of CSS
 Uses “when” to compare
 Traditional comparison operators: >, >=, =, =<, <, true (doesn’t use
false)
 Other keywords: ‘AND’, ‘isnumber’, ‘not’
Logical Operators
- LESS
 Traditional programming conditional and comparative statements;
@if, @else, and, or, not
>, >=, =, =<, <,
Note: and, or, not are written verbatim.
 Boolean values: True or False
Logical Operators
- SASS
Work smarter
not harder.
Effectively using loops
 Repeat parts of your code.
 Create column grids
 Create new CSS selectors
 LESS: recursive mixins (mixins can “call” themselves)
 SASS: resemble traditional programming keywords
@for, @each, @while,
Loops
Let the computer handle redundancy
3’rd Party
Tools
Let someone else do
the heavy lifting
3’rd Party
Tools
∎Allow automatic vender prefix update via Can I Use
∎Extensive Mixin library with documentation
∎Helper Functions
∎Generate Image Sprites
∎Asset urls (i.e.. http_path, image-url, etc.)
∎Typography (vertical rhythm)
Sass Supporters: Compass
3’rd Party
Tools
∎Very Lightweight with tons of mixins
∎Simpler font-face declarations
∎Helpers aka (Add-ons)
∎Timing Functions
Sass Supporters: Bourbon
3’rd Party
Tools
∎Cross-browser CSS-prefix
∎Automatic LESS updater
∎Easy Drag-n-Drop project setup
∎Inconsistent debugger
LESS Supporters: SimpLESS
3’rd Party
Tools
∎Easy to use
∎Automatically watch your LESS files after the first crunch!
∎Comes standard with an IDE (only uses HTML, CSS, JS, PHP,
LESS)
∎Debugger (informs you of where errors are but not too detailed
on why
it’s an error.
□I.e.. passing too many arguments to a mixin: it will say “runtime”
LESS Supporters: Crunch 2
(Free version)
3’rd Party
Tools
∎Easy Drag-n-Drop project setup
∎Use globally installed less (instead of what’s bundled with
WinLESS)
∎Automatically compile LESS files on change.
∎Debugging is easier with more descriptive error messages
LESS Supporters: WinLESS
3’rd Party
Tools
∎Comprehensive Mixin libraries with 86 Mixins
∎Unlimited number of shadows, gradients, animations, etc.
∎Well documented with real code examples
∎Animations uses cubic-bezier timing functions
LESS Supporters: LESS Hat
3’rd Party
Tools
∎Codekit (Mac only)
∎Koala
Dual Supporters
Check Them
Out
∎Scott Kellum Color-Schemer:
https://github.com/at-import/color-schemer
∎Sass Bites (YouTube)
∎Scott Level Up Tuts
http://leveluptuts.com/
THANKS!Any questions?
Linkedin:gary homidas
Email: mail@ghomidas.com

More Related Content

PPTX
Stop your sharepoint css becoming a disasster today spsbe2015
PPTX
SPS Belgium - Stop your SharePoint CSS becoming a di-SASS-ter today!
PPTX
PPTX
SASS - Syntactically Awesome Stylesheet
PDF
HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018
PDF
Universal CSS - Betsy Granger - ebookcraft 2018
PPT
PPTX
Less css
Stop your sharepoint css becoming a disasster today spsbe2015
SPS Belgium - Stop your SharePoint CSS becoming a di-SASS-ter today!
SASS - Syntactically Awesome Stylesheet
HTML-First at Wiley - Tzviya Siegman & Benjamin Young - ebookcraft 2018
Universal CSS - Betsy Granger - ebookcraft 2018
Less css

What's hot (15)

PDF
LESS CSS
PPTX
Less presentation
KEY
Advanced sass
PPTX
Basic Website 101
PDF
Trivadis TechEvent 2017 Tools and Methods for DB Migrations by Kim Berg Hansen
PPTX
Sass installation
PPTX
Sass - basic to advance
PPTX
Web Languages
PPT
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
PPTX
Introduction to sass
PPTX
Web Development
PDF
Analyzing Large-Scale User Data with Hadoop and HBase
PPTX
Sass:-Syntactically Awesome Stylesheet by Shafeeq
PPTX
MySQL 101
PDF
Conhecendo o Apache HBase
LESS CSS
Less presentation
Advanced sass
Basic Website 101
Trivadis TechEvent 2017 Tools and Methods for DB Migrations by Kim Berg Hansen
Sass installation
Sass - basic to advance
Web Languages
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
Introduction to sass
Web Development
Analyzing Large-Scale User Data with Hadoop and HBase
Sass:-Syntactically Awesome Stylesheet by Shafeeq
MySQL 101
Conhecendo o Apache HBase
Ad

Viewers also liked (20)

PDF
Government 2.0: architecting for collaboration
PDF
UX Deliverables for the NCPTSD
PPTX
Picking colors for your presentations
PDF
PPTX
UX/UI Design : Methodology . Artifacts . Acumen
PDF
UX Deliverables
PDF
Don’t Just Build Pretty Websites — UX in the Real World
PDF
2012.10 Liferay Europe Symposium, Alistair Oldfield
PPTX
We’re All UX: Designing a Whole Company Design Team - Giant Conf 2014
PPTX
UX Design Deliverables: Expert's Choice
PDF
More Elements of UX: real-world design deliverables
PDF
From User Experience to Citizen Experience
PDF
UX Project Starter Kit
PDF
Pixelate 2006-10 Evaluation Report Final
PDF
Designing Government: Transforming the Citizen Experience
PPTX
Liferay Digital Experience (DXP): Redefining customers experience
PDF
Importance of Wireframes in Web Design
PDF
Citizen Experience Design, UX Lisbon
PPTX
Case study: UX Methodology Design for Public E-services in Lithuania
PDF
Introduction to Alfresco Activiti BPM
Government 2.0: architecting for collaboration
UX Deliverables for the NCPTSD
Picking colors for your presentations
UX/UI Design : Methodology . Artifacts . Acumen
UX Deliverables
Don’t Just Build Pretty Websites — UX in the Real World
2012.10 Liferay Europe Symposium, Alistair Oldfield
We’re All UX: Designing a Whole Company Design Team - Giant Conf 2014
UX Design Deliverables: Expert's Choice
More Elements of UX: real-world design deliverables
From User Experience to Citizen Experience
UX Project Starter Kit
Pixelate 2006-10 Evaluation Report Final
Designing Government: Transforming the Citizen Experience
Liferay Digital Experience (DXP): Redefining customers experience
Importance of Wireframes in Web Design
Citizen Experience Design, UX Lisbon
Case study: UX Methodology Design for Public E-services in Lithuania
Introduction to Alfresco Activiti BPM
Ad

Similar to Revamp Your Stylesheet (20)

KEY
Authoring Stylesheets with Compass & Sass
PPTX
SCSS Implementation
PPT
UNIT 3.ppt
PPT
An Introduction to CSS Frameworks
PPTX
Bliblidotcom - SASS Introduction
PPTX
Web technology
PPT
An Introduction to CSS Preprocessors (SASS & LESS)
PPTX
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
PDF
Intro to Sass for WordPress Developers
PDF
Client side performance compromises worth making
PPTX
Styling your projects! leveraging css and r sass in r projects
PDF
Structuring your CSS for maintainability: rules and guile lines to write CSS
PDF
Roadmap 01
PPTX
Write LESS. DO more.
PPTX
Stop your share point css become a di-sass-ter today - SPS Munich
PDF
Organize Your Website With Advanced CSS Tricks
PPT
CSS Methodology
PPTX
The sass way - Yatendra Bhardwaj
PDF
European SharePoint Webinar - Make SharePoint Sassy
PDF
LESS(CSS Pre Processor) introduction
Authoring Stylesheets with Compass & Sass
SCSS Implementation
UNIT 3.ppt
An Introduction to CSS Frameworks
Bliblidotcom - SASS Introduction
Web technology
An Introduction to CSS Preprocessors (SASS & LESS)
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
Intro to Sass for WordPress Developers
Client side performance compromises worth making
Styling your projects! leveraging css and r sass in r projects
Structuring your CSS for maintainability: rules and guile lines to write CSS
Roadmap 01
Write LESS. DO more.
Stop your share point css become a di-sass-ter today - SPS Munich
Organize Your Website With Advanced CSS Tricks
CSS Methodology
The sass way - Yatendra Bhardwaj
European SharePoint Webinar - Make SharePoint Sassy
LESS(CSS Pre Processor) introduction

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Encapsulation theory and applications.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Machine Learning_overview_presentation.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Getting Started with Data Integration: FME Form 101
PDF
Approach and Philosophy of On baking technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
A comparative analysis of optical character recognition models for extracting...
NewMind AI Weekly Chronicles - August'25-Week II
Encapsulation theory and applications.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
Machine Learning_overview_presentation.pptx
Big Data Technologies - Introduction.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Assigned Numbers - 2025 - Bluetooth® Document
Programs and apps: productivity, graphics, security and other tools
Reach Out and Touch Someone: Haptics and Empathic Computing
“AI and Expert System Decision Support & Business Intelligence Systems”
Getting Started with Data Integration: FME Form 101
Approach and Philosophy of On baking technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
SOPHOS-XG Firewall Administrator PPT.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Diabetes mellitus diagnosis method based random forest with bat algorithm
A comparative analysis of optical character recognition models for extracting...

Revamp Your Stylesheet

  • 1. Revamp Your Stylesheets Gary Homidas UX Designer and Front-end Developer mail@ghomidas.com
  • 2. What’s the point? The beauty of it all. You can write standard CSS and begin to use the features of the preprocessor as you work. Your code will become more complex as your knowledge grows. It is a time saver…. seriously!
  • 3. • What’s wrong with your CSS? • Learn the fundamentals • Play with Code • 3rd Party Tools Online Editors: • LESS: http://lesscss.org/less-preview/ • SASS: http://www.sasseditor.xyz/ Objectives
  • 4. What’s wrong with your CSS?  She becomes too high maintenance (updating colors, images, fonts, etc.)  Redundant selectors  Lengthier document  Vendor prefixes
  • 5. Similarities between LESS and SASS ∎Variables ∎Mixins ∎Nesting ∎Functions ∎Import ∎Conditional / Comparison Operators ∎Loops ∎3rd Party Tools Learning the Fundamentals
  • 6. Variables a + 4 = 7When a = 3 Just like you’ve learned in school!
  • 7. • Makes reusing code easy • Can be treated like a variable or function. • Can include CSS selectors and their attributes (nested Classes/ID's) • Great way to print different attributes based on a situation Blending things together Mixins
  • 8. • Pass arguments and include conditional statements and loops • Accept “named parameters” (LESS) or “keyword Arguments” (SASS) where you can explicitly designate which argument to satisfy • LESS allows you to declare multiple mixins with the same name and accepting different number of arguments Mixins
  • 9. ∎ Allows coder to visualize the selector’s hierarchy ∎ Minimizes scrolling throughout the file and reduces the size of your CSS file Nesting
  • 10. The key here is “program” with flexibility in mind
  • 11. ∎Pass values to your mixin/function for a more of dynamic stylesheet ∎LESS uses mixins as functions ∎SASS can use either mixins or actual functions ∎Both can be used to return a value Functions “Program” with flexibility in mind
  • 12. ∎LESS returns values by assigning the results into a variable ∎SASS has the “return” keyword ∎SASS function returns single value of any SASS data type, including: numbers, strings, colors, booleans, or lists. Functions
  • 13. ∎Allows the author to include other stylesheets into project. ∎Compartmentalize your styles while reducing http requests ∎Both will merge files with their respective file extension into a single CSS file. ∎Both treat files with the CSS extension as a normal CSS import Import
  • 14.  LESS Exception: You can import a CSS file directly into the LESS file using the @import (inline) directive (one http request). See Examples  SASS allows you to import multiple files w/ one import  SASS: some circumstances where the traditional import will be used are as follows: If the @import has any media queries, url, and others Import
  • 15. CONDITIONAL STATEMENTS Only add specific styles under certain situations. For example, if a statement is true, execute a code. COMPARRISON OPERATORS Compare arguments and execute code based on the items. For example, when a text color is dark, change to a light background color Logical Operators
  • 16.  LESS calls them “Mixin Guards”  LESS tries to stick to the declarative nature of CSS  Uses “when” to compare  Traditional comparison operators: >, >=, =, =<, <, true (doesn’t use false)  Other keywords: ‘AND’, ‘isnumber’, ‘not’ Logical Operators - LESS
  • 17.  Traditional programming conditional and comparative statements; @if, @else, and, or, not >, >=, =, =<, <, Note: and, or, not are written verbatim.  Boolean values: True or False Logical Operators - SASS
  • 19.  Repeat parts of your code.  Create column grids  Create new CSS selectors  LESS: recursive mixins (mixins can “call” themselves)  SASS: resemble traditional programming keywords @for, @each, @while, Loops Let the computer handle redundancy
  • 20. 3’rd Party Tools Let someone else do the heavy lifting
  • 21. 3’rd Party Tools ∎Allow automatic vender prefix update via Can I Use ∎Extensive Mixin library with documentation ∎Helper Functions ∎Generate Image Sprites ∎Asset urls (i.e.. http_path, image-url, etc.) ∎Typography (vertical rhythm) Sass Supporters: Compass
  • 22. 3’rd Party Tools ∎Very Lightweight with tons of mixins ∎Simpler font-face declarations ∎Helpers aka (Add-ons) ∎Timing Functions Sass Supporters: Bourbon
  • 23. 3’rd Party Tools ∎Cross-browser CSS-prefix ∎Automatic LESS updater ∎Easy Drag-n-Drop project setup ∎Inconsistent debugger LESS Supporters: SimpLESS
  • 24. 3’rd Party Tools ∎Easy to use ∎Automatically watch your LESS files after the first crunch! ∎Comes standard with an IDE (only uses HTML, CSS, JS, PHP, LESS) ∎Debugger (informs you of where errors are but not too detailed on why it’s an error. □I.e.. passing too many arguments to a mixin: it will say “runtime” LESS Supporters: Crunch 2 (Free version)
  • 25. 3’rd Party Tools ∎Easy Drag-n-Drop project setup ∎Use globally installed less (instead of what’s bundled with WinLESS) ∎Automatically compile LESS files on change. ∎Debugging is easier with more descriptive error messages LESS Supporters: WinLESS
  • 26. 3’rd Party Tools ∎Comprehensive Mixin libraries with 86 Mixins ∎Unlimited number of shadows, gradients, animations, etc. ∎Well documented with real code examples ∎Animations uses cubic-bezier timing functions LESS Supporters: LESS Hat
  • 27. 3’rd Party Tools ∎Codekit (Mac only) ∎Koala Dual Supporters
  • 28. Check Them Out ∎Scott Kellum Color-Schemer: https://github.com/at-import/color-schemer ∎Sass Bites (YouTube) ∎Scott Level Up Tuts http://leveluptuts.com/

Editor's Notes

  • #16: Thinking back to Mixins You won’t always want to execute the same code for every situation