SlideShare a Scribd company logo
1 of 22
Download to read offline
THE INVERTED TRIANGLE APPROACH
C S S S A N I T Y W I T H S A S S
CSS - CASCADING STYLE SHEETS
SASS
• Nested styles
• Variables
• Calculations
• Mixins
SASS CODE
“They get messy.”
THIS IS NOT MY IDEA
TO B E C L E A R …
INVERTED TRIANGLE
O RG A N I Z E YO U R C O D E
KEY METRICS
I N V E RT E D T R I A N G L E
INVERTED TRIANGLE
O RG A N I Z E YO U R C O D E
SETTINGS
• Global settings
• Base font size
• Color palettes
• Config
TOOLS
• Still global
• Mixins
• Font-sizing
• Gradients
• Functions
GENERIC
• First layer to actually
produce CSS
• Normalize
• Reset
• Box-sizing rules
ELEMENTS
• Unclassed HTML
elements
• Very rarely changed once
set up
OBJECTS
• First layer of class-based
selectors
• Non-cosmetic objects
• Wrappers
• Media objects
SET IT AND FORGET IT
E V E RY T H I N G B E F O R E T H I S
COMPONENTS
• Bulk of work is done here
• Class-based styles
• Split into partials to keep
organized
TRUMPS
• Overrides everything that
came before
• Where !important
goes when necessary
TA K E T WO
“They get messy.”
MY INVERTED
TRIANGLE STRUCTURE
• a — settings
• b-tools
• c-generic
• d-elements
• e-objects
• f-components
• g-vendors
• h-trumps
code
RESOURCES
• http://technotif.com/manage-large-css-projects-with-itcss/
• https://www.sitepoint.com/architecture-in-sass/
• https://www.packtpub.com/books/content/how-structure-
your-sass-scalability-using-itcss
• https://github.com/JulieKuehl/Forward-Framework/tree/
kanopi/src/scss/forward
THANK YOU!
QUESTIONS?
J U L I E @ J U L I E K U E H L . C O M
@ J U L I E K U E H L
http://juliekuehl.com/wordcamp-seattle-2016/

More Related Content

Viewers also liked

Advanced JavaScript Concepts
Advanced JavaScript ConceptsAdvanced JavaScript Concepts
Advanced JavaScript ConceptsNaresh Kumar
 
Object Oriented Programming in JavaScript
Object Oriented Programming in JavaScriptObject Oriented Programming in JavaScript
Object Oriented Programming in JavaScriptzand3rs
 
JavaScript Prototype and Module Pattern
JavaScript Prototype and Module PatternJavaScript Prototype and Module Pattern
JavaScript Prototype and Module PatternNarendra Sisodiya
 
Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Eric Sembrat
 
Sass and compass workshop
Sass and compass workshopSass and compass workshop
Sass and compass workshopShaho Toofani
 
Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sassKnoldus Inc.
 
The ultimate guide to prototyping
The ultimate guide to prototypingThe ultimate guide to prototyping
The ultimate guide to prototypingMarcelo Graciolli
 
Prototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScriptPrototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScriptSunny Sharma
 
Prototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptPrototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptlienhard
 

Viewers also liked (12)

JavaScript OOPs
JavaScript OOPsJavaScript OOPs
JavaScript OOPs
 
Advanced JavaScript Concepts
Advanced JavaScript ConceptsAdvanced JavaScript Concepts
Advanced JavaScript Concepts
 
Object Oriented Programming in JavaScript
Object Oriented Programming in JavaScriptObject Oriented Programming in JavaScript
Object Oriented Programming in JavaScript
 
JavaScript Prototype and Module Pattern
JavaScript Prototype and Module PatternJavaScript Prototype and Module Pattern
JavaScript Prototype and Module Pattern
 
Sass - Getting Started with Sass!
Sass - Getting Started with Sass!Sass - Getting Started with Sass!
Sass - Getting Started with Sass!
 
Sass and compass workshop
Sass and compass workshopSass and compass workshop
Sass and compass workshop
 
Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sass
 
Sas demo
Sas demoSas demo
Sas demo
 
The ultimate guide to prototyping
The ultimate guide to prototypingThe ultimate guide to prototyping
The ultimate guide to prototyping
 
Prototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScriptPrototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScript
 
Prototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptPrototype-based Programming with JavaScript
Prototype-based Programming with JavaScript
 
Sass
SassSass
Sass
 

More from Julie Kuehl

A Tour Through The WordPress Database
A Tour Through The WordPress DatabaseA Tour Through The WordPress Database
A Tour Through The WordPress DatabaseJulie Kuehl
 
CSS Sanity with Sass and the Inverted Triangle Approach
CSS Sanity with Sass and the Inverted Triangle ApproachCSS Sanity with Sass and the Inverted Triangle Approach
CSS Sanity with Sass and the Inverted Triangle ApproachJulie Kuehl
 
BEG, BORROW, OR STEAL? WHERE TO BEGIN WHEN BUILDING A THEME
BEG, BORROW, OR STEAL? WHERE TO BEGIN WHEN BUILDING A THEMEBEG, BORROW, OR STEAL? WHERE TO BEGIN WHEN BUILDING A THEME
BEG, BORROW, OR STEAL? WHERE TO BEGIN WHEN BUILDING A THEMEJulie Kuehl
 
Life as a Digital Nomad
Life as a Digital NomadLife as a Digital Nomad
Life as a Digital NomadJulie Kuehl
 
Child Themes, Starter Themes, and Frameworks.... Oh My!
Child Themes, Starter Themes, and Frameworks.... Oh My!Child Themes, Starter Themes, and Frameworks.... Oh My!
Child Themes, Starter Themes, and Frameworks.... Oh My!Julie Kuehl
 
WordPress and Podcasts
WordPress and PodcastsWordPress and Podcasts
WordPress and PodcastsJulie Kuehl
 
Child Themes, Starter Themes, and Frameworks... Oh My!
Child Themes, Starter Themes, and Frameworks... Oh My!Child Themes, Starter Themes, and Frameworks... Oh My!
Child Themes, Starter Themes, and Frameworks... Oh My!Julie Kuehl
 
Anatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeAnatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeJulie Kuehl
 
All The Software That Isn't WordPress
All The Software That Isn't WordPressAll The Software That Isn't WordPress
All The Software That Isn't WordPressJulie Kuehl
 
Startup Weekend Fargo 2014 - Breaking Bread
Startup Weekend Fargo 2014 - Breaking BreadStartup Weekend Fargo 2014 - Breaking Bread
Startup Weekend Fargo 2014 - Breaking BreadJulie Kuehl
 
Learning WordPress Sucks
Learning WordPress SucksLearning WordPress Sucks
Learning WordPress SucksJulie Kuehl
 

More from Julie Kuehl (11)

A Tour Through The WordPress Database
A Tour Through The WordPress DatabaseA Tour Through The WordPress Database
A Tour Through The WordPress Database
 
CSS Sanity with Sass and the Inverted Triangle Approach
CSS Sanity with Sass and the Inverted Triangle ApproachCSS Sanity with Sass and the Inverted Triangle Approach
CSS Sanity with Sass and the Inverted Triangle Approach
 
BEG, BORROW, OR STEAL? WHERE TO BEGIN WHEN BUILDING A THEME
BEG, BORROW, OR STEAL? WHERE TO BEGIN WHEN BUILDING A THEMEBEG, BORROW, OR STEAL? WHERE TO BEGIN WHEN BUILDING A THEME
BEG, BORROW, OR STEAL? WHERE TO BEGIN WHEN BUILDING A THEME
 
Life as a Digital Nomad
Life as a Digital NomadLife as a Digital Nomad
Life as a Digital Nomad
 
Child Themes, Starter Themes, and Frameworks.... Oh My!
Child Themes, Starter Themes, and Frameworks.... Oh My!Child Themes, Starter Themes, and Frameworks.... Oh My!
Child Themes, Starter Themes, and Frameworks.... Oh My!
 
WordPress and Podcasts
WordPress and PodcastsWordPress and Podcasts
WordPress and Podcasts
 
Child Themes, Starter Themes, and Frameworks... Oh My!
Child Themes, Starter Themes, and Frameworks... Oh My!Child Themes, Starter Themes, and Frameworks... Oh My!
Child Themes, Starter Themes, and Frameworks... Oh My!
 
Anatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress ThemeAnatomy and Architecture of a WordPress Theme
Anatomy and Architecture of a WordPress Theme
 
All The Software That Isn't WordPress
All The Software That Isn't WordPressAll The Software That Isn't WordPress
All The Software That Isn't WordPress
 
Startup Weekend Fargo 2014 - Breaking Bread
Startup Weekend Fargo 2014 - Breaking BreadStartup Weekend Fargo 2014 - Breaking Bread
Startup Weekend Fargo 2014 - Breaking Bread
 
Learning WordPress Sucks
Learning WordPress SucksLearning WordPress Sucks
Learning WordPress Sucks
 

Recently uploaded

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
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 FMESafe Software
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

CSS Sanity with Sass: The Inverted Triangle Approach