SlideShare uma empresa Scribd logo
1 de 10
Baixar para ler offline
Reusable snippets.
Sass Mixins
@mixin my-custom-mixin {	
border: 1px solid $color;	
padding: $padding;	
}	
!
// Use your mixin over and over again	
.element {	
@include my-custom-mixin;	
}
1
Useful Mixins
@mixin font-primary {	
font-family: “Hip Web Font”, Arial, sans-serif;	
font-weight: 400;	
}	
!
// Use the mixin over and over again	
.element {	
@include font-primary;	
}
2
Useful Mixins + Variables
$color-primary: #FFCC00;	
@mixin font-primary {	
font-family: “Hip Web Font”, Arial, sans-serif;	
font-weight: 400;	
}	
!
// Use the mixin over and over again	
.element {	
@include font-primary;	
color: $color-primary;	
}
3
Sass/SCSS #framework
‣ First Sass-based framework
‣ Provides tons of mixins
‣ Supports plugins
4
I now can stop repeating myself. I now can stop repeating myself.
Compass Mixins
@include border-radius(...);	
@include box-shadow(...);	
@include text-shadow(...);	
@include scale(...);	
@include rotate(...);	
@include transform2d(...);	
@include transform3d(...);
5
Full of Sass.
Compass Modules
‣ CSS3
• Effects, Fonts, Content
‣ Typography
• Test, Links, Lists
‣ Utilities
• Sprites, Color, Print, Tables
‣ Layout*
‣ Reset*
6
CSS
Compass
Sass
7
Web Browser and/or Terminal Shell required
Debugging
// Debug compiled CSS w/Firefox + Firebug + FireSass	
environment = :development	
firesass = true	
!
// Debug dynamic Sass using @debug function	
div {	
@debug $anything + 1px;	
}
8
Good looks are subjective.
Formatting
.standard {	
color: $dark;	
background-color: $light;	
}	
!
.spacey {	
color : $dark;	
background-color : $light;	
}	
9
Shorthand code is harder to read.
Shortcuts
@mixin pretty-text {	
color: $dark;	
}	
!
a {	
@include light;	
}	
!
=pretty-text {	
color: $dark;	
}	
!
a {	
+light;	
}
10

Mais conteúdo relacionado

Mais procurados

Drupal & CSS Preprocessors
Drupal & CSS PreprocessorsDrupal & CSS Preprocessors
Drupal & CSS Preprocessorskdmarks
 
Awash in a sea of connections
Awash in a sea of connectionsAwash in a sea of connections
Awash in a sea of connectionsGalen Charlton
 
Auto tools
Auto toolsAuto tools
Auto tools祺 周
 
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...WordCamp Sydney
 

Mais procurados (6)

Less vs sass
Less vs sassLess vs sass
Less vs sass
 
Drupal & CSS Preprocessors
Drupal & CSS PreprocessorsDrupal & CSS Preprocessors
Drupal & CSS Preprocessors
 
Awash in a sea of connections
Awash in a sea of connectionsAwash in a sea of connections
Awash in a sea of connections
 
Auto tools
Auto toolsAuto tools
Auto tools
 
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
 
Rack
RackRack
Rack
 

Destaque

04. linea base biologica
04. linea base biologica04. linea base biologica
04. linea base biologicasadhafz
 
Comunicaciones
ComunicacionesComunicaciones
Comunicacionessard92
 
Enrique Campuzano, Artist
Enrique Campuzano, ArtistEnrique Campuzano, Artist
Enrique Campuzano, ArtistCachi Chien
 
Governancaemtic
GovernancaemticGovernancaemtic
Governancaemticgueste8f73
 
A PresençA Negra Na Cultura Brasileira Felipe
A PresençA Negra Na Cultura Brasileira FelipeA PresençA Negra Na Cultura Brasileira Felipe
A PresençA Negra Na Cultura Brasileira FelipeTânia Mara
 
Experiências, Erros e Acertos no Desenvolvimento de Projeto Ágeis
Experiências, Erros e Acertos no Desenvolvimento de Projeto ÁgeisExperiências, Erros e Acertos no Desenvolvimento de Projeto Ágeis
Experiências, Erros e Acertos no Desenvolvimento de Projeto ÁgeisRaphael Molesim
 
Estendendo o html com angular js
Estendendo o html com angular jsEstendendo o html com angular js
Estendendo o html com angular jsEvaldo Barbosa
 
Instrumentos medievales
Instrumentos medievalesInstrumentos medievales
Instrumentos medievalesSaanDpz
 
Guaranís Despair. Guaraníes Desesperación(Brasil)
Guaranís Despair. Guaraníes Desesperación(Brasil)Guaranís Despair. Guaraníes Desesperación(Brasil)
Guaranís Despair. Guaraníes Desesperación(Brasil)Cachi Chien
 

Destaque (20)

Tut
TutTut
Tut
 
Zoo shans
Zoo shansZoo shans
Zoo shans
 
Blogs das EMEFs
Blogs das EMEFsBlogs das EMEFs
Blogs das EMEFs
 
04. linea base biologica
04. linea base biologica04. linea base biologica
04. linea base biologica
 
Comunicaciones
ComunicacionesComunicaciones
Comunicaciones
 
Enrique Campuzano, Artist
Enrique Campuzano, ArtistEnrique Campuzano, Artist
Enrique Campuzano, Artist
 
Governancaemtic
GovernancaemticGovernancaemtic
Governancaemtic
 
O Foco 149 Pdf
O Foco 149 PdfO Foco 149 Pdf
O Foco 149 Pdf
 
Curso Althia
Curso AlthiaCurso Althia
Curso Althia
 
A PresençA Negra Na Cultura Brasileira Felipe
A PresençA Negra Na Cultura Brasileira FelipeA PresençA Negra Na Cultura Brasileira Felipe
A PresençA Negra Na Cultura Brasileira Felipe
 
5ano3
5ano35ano3
5ano3
 
Samba Da La Ela
Samba Da La ElaSamba Da La Ela
Samba Da La Ela
 
Escola Jpb
Escola JpbEscola Jpb
Escola Jpb
 
SOCIETE GENERALE- BENJAMIN BOURIQUIN
SOCIETE GENERALE- BENJAMIN BOURIQUINSOCIETE GENERALE- BENJAMIN BOURIQUIN
SOCIETE GENERALE- BENJAMIN BOURIQUIN
 
Experiências, Erros e Acertos no Desenvolvimento de Projeto Ágeis
Experiências, Erros e Acertos no Desenvolvimento de Projeto ÁgeisExperiências, Erros e Acertos no Desenvolvimento de Projeto Ágeis
Experiências, Erros e Acertos no Desenvolvimento de Projeto Ágeis
 
Estendendo o html com angular js
Estendendo o html com angular jsEstendendo o html com angular js
Estendendo o html com angular js
 
Clase 2
Clase 2Clase 2
Clase 2
 
Fatacil Patrocinadores
Fatacil PatrocinadoresFatacil Patrocinadores
Fatacil Patrocinadores
 
Instrumentos medievales
Instrumentos medievalesInstrumentos medievales
Instrumentos medievales
 
Guaranís Despair. Guaraníes Desesperación(Brasil)
Guaranís Despair. Guaraníes Desesperación(Brasil)Guaranís Despair. Guaraníes Desesperación(Brasil)
Guaranís Despair. Guaraníes Desesperación(Brasil)
 

Semelhante a Sassy CSS (part 2) (Drupal Camp LA 2013)

Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sassKnoldus Inc.
 
Agile CSS development with Compass and Sass
Agile CSS development with Compass and SassAgile CSS development with Compass and Sass
Agile CSS development with Compass and SassAndrea Verlicchi
 
Benefits of SaaS Over Conventional CSS.pptx
Benefits of SaaS Over Conventional CSS.pptxBenefits of SaaS Over Conventional CSS.pptx
Benefits of SaaS Over Conventional CSS.pptxnoreplyerp
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentationMario Noble
 
Sass and Compass - Getting Started
Sass and Compass - Getting StartedSass and Compass - Getting Started
Sass and Compass - Getting Startededgincvg
 
Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationDaniel Yuschick
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction SassZeeshan Ahmed
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compassNick Cooley
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendFITC
 
Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.Eugene Nor
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockMarco Pinheiro
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassClaudina Sarahe
 

Semelhante a Sassy CSS (part 2) (Drupal Camp LA 2013) (20)

Deep dive into sass
Deep dive into sassDeep dive into sass
Deep dive into sass
 
Agile CSS development with Compass and Sass
Agile CSS development with Compass and SassAgile CSS development with Compass and Sass
Agile CSS development with Compass and Sass
 
Advanced sass
Advanced sassAdvanced sass
Advanced sass
 
Benefits of SaaS Over Conventional CSS.pptx
Benefits of SaaS Over Conventional CSS.pptxBenefits of SaaS Over Conventional CSS.pptx
Benefits of SaaS Over Conventional CSS.pptx
 
Intro to SASS CSS
Intro to SASS CSSIntro to SASS CSS
Intro to SASS CSS
 
css.docx
css.docxcss.docx
css.docx
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
 
Sass and Compass - Getting Started
Sass and Compass - Getting StartedSass and Compass - Getting Started
Sass and Compass - Getting Started
 
Raleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass PresentationRaleigh Web Design Meetup Group - Sass Presentation
Raleigh Web Design Meetup Group - Sass Presentation
 
Workshop 6: Designer tools
Workshop 6: Designer toolsWorkshop 6: Designer tools
Workshop 6: Designer tools
 
Simple introduction Sass
Simple introduction SassSimple introduction Sass
Simple introduction Sass
 
Theming and Sass
Theming and SassTheming and Sass
Theming and Sass
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the Backend
 
CSS3
CSS3CSS3
CSS3
 
Write LESS. DO more.
Write LESS. DO more.Write LESS. DO more.
Write LESS. DO more.
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 

Mais de Chris Charlton

Drupal Form API 101 (PHP) - DrupalCamp LA 2012
Drupal Form API 101 (PHP) - DrupalCamp LA 2012Drupal Form API 101 (PHP) - DrupalCamp LA 2012
Drupal Form API 101 (PHP) - DrupalCamp LA 2012Chris Charlton
 
Drupal Developer Skills (2012) - DrupalCamp LA 2012
Drupal Developer Skills (2012) - DrupalCamp LA 2012Drupal Developer Skills (2012) - DrupalCamp LA 2012
Drupal Developer Skills (2012) - DrupalCamp LA 2012Chris Charlton
 
Lightning Talk: Drush aliases (Drupal Camp LA 2013)
Lightning Talk: Drush aliases (Drupal Camp LA 2013)Lightning Talk: Drush aliases (Drupal Camp LA 2013)
Lightning Talk: Drush aliases (Drupal Camp LA 2013)Chris Charlton
 
Site Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
Site Aliases: Powerful Drupal Administration Using Drush by Chris CharltonSite Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
Site Aliases: Powerful Drupal Administration Using Drush by Chris CharltonChris Charlton
 
Policy File: Powerful Drupal Administration Using Drush
Policy File: Powerful Drupal Administration Using DrushPolicy File: Powerful Drupal Administration Using Drush
Policy File: Powerful Drupal Administration Using DrushChris Charlton
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonChris Charlton
 
Changes to Drupal Themes in version 7 (part 1)
Changes to Drupal Themes in version 7 (part 1)Changes to Drupal Themes in version 7 (part 1)
Changes to Drupal Themes in version 7 (part 1)Chris Charlton
 
Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...Chris Charlton
 
Let's Zen! (Stop Theming From Scratch)
Let's Zen! (Stop Theming From Scratch)Let's Zen! (Stop Theming From Scratch)
Let's Zen! (Stop Theming From Scratch)Chris Charlton
 
Flex Flash Air Interfaces for Custom Content Types in Drupal Chris Charlton
Flex Flash Air Interfaces for Custom Content Types in Drupal   Chris CharltonFlex Flash Air Interfaces for Custom Content Types in Drupal   Chris Charlton
Flex Flash Air Interfaces for Custom Content Types in Drupal Chris CharltonChris Charlton
 
Better Drupal Interaction Design with Flex
Better Drupal Interaction Design with FlexBetter Drupal Interaction Design with Flex
Better Drupal Interaction Design with FlexChris Charlton
 

Mais de Chris Charlton (11)

Drupal Form API 101 (PHP) - DrupalCamp LA 2012
Drupal Form API 101 (PHP) - DrupalCamp LA 2012Drupal Form API 101 (PHP) - DrupalCamp LA 2012
Drupal Form API 101 (PHP) - DrupalCamp LA 2012
 
Drupal Developer Skills (2012) - DrupalCamp LA 2012
Drupal Developer Skills (2012) - DrupalCamp LA 2012Drupal Developer Skills (2012) - DrupalCamp LA 2012
Drupal Developer Skills (2012) - DrupalCamp LA 2012
 
Lightning Talk: Drush aliases (Drupal Camp LA 2013)
Lightning Talk: Drush aliases (Drupal Camp LA 2013)Lightning Talk: Drush aliases (Drupal Camp LA 2013)
Lightning Talk: Drush aliases (Drupal Camp LA 2013)
 
Site Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
Site Aliases: Powerful Drupal Administration Using Drush by Chris CharltonSite Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
Site Aliases: Powerful Drupal Administration Using Drush by Chris Charlton
 
Policy File: Powerful Drupal Administration Using Drush
Policy File: Powerful Drupal Administration Using DrushPolicy File: Powerful Drupal Administration Using Drush
Policy File: Powerful Drupal Administration Using Drush
 
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris CharltonDrush 5.0 (DrupalCamp LA 2012) - Chris Charlton
Drush 5.0 (DrupalCamp LA 2012) - Chris Charlton
 
Changes to Drupal Themes in version 7 (part 1)
Changes to Drupal Themes in version 7 (part 1)Changes to Drupal Themes in version 7 (part 1)
Changes to Drupal Themes in version 7 (part 1)
 
Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...Web Content Management Systems From A Designer's Perspective (Drupal Technica...
Web Content Management Systems From A Designer's Perspective (Drupal Technica...
 
Let's Zen! (Stop Theming From Scratch)
Let's Zen! (Stop Theming From Scratch)Let's Zen! (Stop Theming From Scratch)
Let's Zen! (Stop Theming From Scratch)
 
Flex Flash Air Interfaces for Custom Content Types in Drupal Chris Charlton
Flex Flash Air Interfaces for Custom Content Types in Drupal   Chris CharltonFlex Flash Air Interfaces for Custom Content Types in Drupal   Chris Charlton
Flex Flash Air Interfaces for Custom Content Types in Drupal Chris Charlton
 
Better Drupal Interaction Design with Flex
Better Drupal Interaction Design with FlexBetter Drupal Interaction Design with Flex
Better Drupal Interaction Design with Flex
 

Último

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 

Último (20)

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 

Sassy CSS (part 2) (Drupal Camp LA 2013)

  • 1. Reusable snippets. Sass Mixins @mixin my-custom-mixin { border: 1px solid $color; padding: $padding; } ! // Use your mixin over and over again .element { @include my-custom-mixin; } 1
  • 2. Useful Mixins @mixin font-primary { font-family: “Hip Web Font”, Arial, sans-serif; font-weight: 400; } ! // Use the mixin over and over again .element { @include font-primary; } 2
  • 3. Useful Mixins + Variables $color-primary: #FFCC00; @mixin font-primary { font-family: “Hip Web Font”, Arial, sans-serif; font-weight: 400; } ! // Use the mixin over and over again .element { @include font-primary; color: $color-primary; } 3
  • 4. Sass/SCSS #framework ‣ First Sass-based framework ‣ Provides tons of mixins ‣ Supports plugins 4
  • 5. I now can stop repeating myself. I now can stop repeating myself. Compass Mixins @include border-radius(...); @include box-shadow(...); @include text-shadow(...); @include scale(...); @include rotate(...); @include transform2d(...); @include transform3d(...); 5
  • 6. Full of Sass. Compass Modules ‣ CSS3 • Effects, Fonts, Content ‣ Typography • Test, Links, Lists ‣ Utilities • Sprites, Color, Print, Tables ‣ Layout* ‣ Reset* 6 CSS Compass Sass
  • 7. 7
  • 8. Web Browser and/or Terminal Shell required Debugging // Debug compiled CSS w/Firefox + Firebug + FireSass environment = :development firesass = true ! // Debug dynamic Sass using @debug function div { @debug $anything + 1px; } 8
  • 9. Good looks are subjective. Formatting .standard { color: $dark; background-color: $light; } ! .spacey { color : $dark; background-color : $light; } 9
  • 10. Shorthand code is harder to read. Shortcuts @mixin pretty-text { color: $dark; } ! a { @include light; } ! =pretty-text { color: $dark; } ! a { +light; } 10