SlideShare a Scribd company logo
RESPONSIVE DRUPAL
THEMING MET SASS,
COMPASS, SUSY EN
AURORA
DRUPAL TECH TALK 25 APRIL 2013
MARC VAN GEND TRIQUANTA
AGENDA
Het Doel – #responsivemobilefirsthtml5buzzwordcompliant
CSS preprocessing – SASS
Werken met SASS – Compass
De 2e generatie CSS grid systems – Susy
Combineren tot een Drupal theme – Aurora
De grote gevaarlijke onvermijdelijke live demo – or it didn't happen
HET DOEL
#RESPONSIVEMOBILEFIRSTHTML5BUZZWORDCOMPLIANT
Responsive – één site voor alle schermen
Progressive enhancement – functioneel » fraai » funky
Mobile first – eerst simpel, dan groeien
HTML5 – is beter, kan meer
Werkbaar – samenwerken, onderhouden, uitbreiden
CSS PREPROCESSING
EN WAT IS SASS EIGENLIJK?
SASS: “programmeren met stylesheets”
.scss syntax: superset van CSS
variables
nesting
mixins
SASS: VARIABLES
$triquanta-blue: #00c2ff;
$gutter: 16px;
.quote {
margin: $gutter;
padding: $gutter / 2;
color: $triquanta-blue;
}
.quote {
margin: 16px;
padding: 8px;
color: #00c2ff;
}
SASS: NESTING
.menu li {
float: left;
a {
color: #cc0000;
}
}
.menu li {
float: left;
}
.menu li a {
color: #cc0000;
}
SASS: MIXINS
@mixin box($color, $border:true) {
padding: 1em;
background-color: $color;
@if $border {
border: 1px solid #000000;
}
}
.node {
@include box(#006600);
}
.quote {
@include box(#333333, false);
}
.node {
padding: 1em;
background-color: #006600;
border: 1px solid #000000;
}
.quote {
padding: 1em;
background: #333333;
}
COMPASS
ZET SASS AAN HET WERK
Gereedschapskist – doet niet de afwas
Bibliotheek – best-practice CSS
config.rb – om te delen met collega's
GEREEDSCHAPSKIST
compass watch – schrijft CSS terwijl u SASSt
compass create – begin een nieuw project
Image sprites genereren – volautomatisch
BIBLIOTHEEK
Wie weet uit z'n hoofd hoe je een CSS3 background gradient maakt?
.gradient {
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0
background-image: -webkit-linear-gradient(#ffffff, #aaaaaa);
background-image: -moz-linear-gradient(#ffffff, #aaaaaa);
background-image: -o-linear-gradient(#ffffff, #aaaaaa);
background-image: linear-gradient(#ffffff, #aaaaaa);
}
.gradient {
@include background-image(linear-gradient(#ffffff, #aaaaaa));
}
CONFIG.RB
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
DE 2e GENERATIE CSS GRID SYSTEMS
...EN IN HET BIJZONDER SUSY
Semantisch
SASS & Compass
Flexibel
GRID SYSTEM: WAAROM EIGENLIJK?
Grafisch ontwerp – nauwkeurige implementatie
Schetsen / ontwerpen in de browser – gemak & snelheid
DRY – developers zijn lui
Onderhouden en uitbreiden – consistentie
NIET-SEMANTISCH GRID SYSTEM
<div id="main" class="container_12">
<article class="grid_8 prefix_4">
Lorem ipsum, dolor sit amet.
</article>
</div>
.container_12 {
width: 960px;
}
.grid_8 {
display: inline;
float: left;
margin-left: 10px;
margin-right: 10px;
}
.container_12 .prefix_4 {
padding-left: 320px;
}
.container_12 .grid_8 {
width: 620px;
}
SEMANTISCH GRID SYSTEM (SUSY)
<div id="main">
<article>
Lorem ipsum, dolor sit amet.
</article>
</div>
#main {
@include container;
}
#main article {
@include span-columns(8);
@include prefix(4);
}
SASS & COMPASS DO THE MATH
$total-columns : 4;
$total-columns-m : 6;
$total-columns-l : 8;
$column-width : 8em;
$gutter-width : 2em;
$grid-padding : $gutter-width / 2;
#page {
@include container($total-columns,
$total-columns-m,
$total-columns-l);
}
#page {
max-width: 40em;
padding-left: 1em;
padding-right: 1em;
margin-left: auto;
margin-right: auto;
}
#page:after {
content: "";
display: table;
clear: both;
}
@media (min-width: 60em) {
#page {
max-width: 60em;
}
}
@media (min-width: 80em) {
#page {
max-width: 80em;
}
}
COMBINEREN TOT EEN DRUPAL THEME
LEES: AURORA INSTALLEREN
“Aurora is an HTML5, Sass and Compass powered, responsive
optimized, mobile first base theme designed for people who like
theming through code as opposed to through a GUI.”
AURORA: BASE THEME
drush dl aurora
drush en aurora -y
AURORA: RUBY GEM
gem install compass-aurora
AURORA: SUB THEME
compass create -r aurora --using aurora/corona
AURORA: DON'T CLICK!
Uit de .info file:
...
; Chrome Frame Options
settings[aurora_enable_chrome_frame] = 1
settings[aurora_min_ie_support] = 10
; Miscelaneous Options
settings[aurora_remove_core_css] = 0
settings[aurora_html_tags] = 1
settings[aurora_typekit_id] = 0
; JavaScript Options
settings[aurora_footer_js] = 1
settings[aurora_libraries_head] = 0
...
DE GROTE GEVAARLIJKE ONVERMIJDELIJKE
LIVE DEMO
DOET U DEZE MAAR

More Related Content

Similar to Drupal theming met sass, compass, susy en aurora

CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. Control
Christian Heilmann
 
Drupal 960 grid system based theming
Drupal 960 grid system based theming Drupal 960 grid system based theming
Drupal 960 grid system based theming
Gaurav Mishra
 
Sweet and Sassy Responsive Design
Sweet and Sassy Responsive DesignSweet and Sassy Responsive Design
Sweet and Sassy Responsive Design
Mina Markham
 
Refresh OKC
Refresh OKCRefresh OKC
Refresh OKC
Nathan Smith
 
Drupal Theming with CSS Frameworks (960grid)
Drupal Theming with CSS Frameworks (960grid)Drupal Theming with CSS Frameworks (960grid)
Drupal Theming with CSS Frameworks (960grid)Ryan Cross
 
Sass: Introduction
Sass: IntroductionSass: Introduction
Sass: Introduction
BalaKrishna Kolliboina
 
Understanding sass
Understanding sassUnderstanding sass
Understanding sass
Mario Hernandez
 
CSS3: The Next Generation Of Style
CSS3: The Next Generation Of StyleCSS3: The Next Generation Of Style
CSS3: The Next Generation Of Style
jbellWCT
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
Eric Carlisle
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
Marco Pinheiro
 
Beginning CSS.
Beginning CSS.Beginning CSS.
Beginning CSS.
dhruvgairola
 
Not Just a Pretty Face: How to design and build a cross-CMS CSS framework
Not Just a Pretty Face: How to design and build a cross-CMS CSS frameworkNot Just a Pretty Face: How to design and build a cross-CMS CSS framework
Not Just a Pretty Face: How to design and build a cross-CMS CSS framework
crystalenka
 
ResponsiveWebDesign
ResponsiveWebDesignResponsiveWebDesign
ResponsiveWebDesign
BalaKrishna Kolliboina
 
Graphic Design For Web
Graphic Design For WebGraphic Design For Web
Graphic Design For Web
Deniz Gökçe
 
Magento RWD is Awesome
Magento RWD is AwesomeMagento RWD is Awesome
Magento RWD is Awesome
Pradhap Loganathan
 
Magento RWD is Awesome
Magento RWD is AwesomeMagento RWD is Awesome
Magento RWD is Awesome
Pradhap Loganathan
 
RESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGN
RESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGN
RESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGN
DaveEstonilo
 
Mobile and Responsive Design with Sass
Mobile and Responsive Design with SassMobile and Responsive Design with Sass
Mobile and Responsive Design with Sass
nyccamp
 
Hardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ationHardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ation
Spiros Martzoukos
 

Similar to Drupal theming met sass, compass, susy en aurora (20)

CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. Control
 
Drupal 960 grid system based theming
Drupal 960 grid system based theming Drupal 960 grid system based theming
Drupal 960 grid system based theming
 
Sweet and Sassy Responsive Design
Sweet and Sassy Responsive DesignSweet and Sassy Responsive Design
Sweet and Sassy Responsive Design
 
Refresh OKC
Refresh OKCRefresh OKC
Refresh OKC
 
Drupal Theming with CSS Frameworks (960grid)
Drupal Theming with CSS Frameworks (960grid)Drupal Theming with CSS Frameworks (960grid)
Drupal Theming with CSS Frameworks (960grid)
 
Sass: Introduction
Sass: IntroductionSass: Introduction
Sass: Introduction
 
Understanding sass
Understanding sassUnderstanding sass
Understanding sass
 
CSS3: The Next Generation Of Style
CSS3: The Next Generation Of StyleCSS3: The Next Generation Of Style
CSS3: The Next Generation Of Style
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
Beginning CSS.
Beginning CSS.Beginning CSS.
Beginning CSS.
 
Not Just a Pretty Face: How to design and build a cross-CMS CSS framework
Not Just a Pretty Face: How to design and build a cross-CMS CSS frameworkNot Just a Pretty Face: How to design and build a cross-CMS CSS framework
Not Just a Pretty Face: How to design and build a cross-CMS CSS framework
 
ResponsiveWebDesign
ResponsiveWebDesignResponsiveWebDesign
ResponsiveWebDesign
 
Graphic Design For Web
Graphic Design For WebGraphic Design For Web
Graphic Design For Web
 
Magento RWD is Awesome
Magento RWD is AwesomeMagento RWD is Awesome
Magento RWD is Awesome
 
Magento RWD is Awesome
Magento RWD is AwesomeMagento RWD is Awesome
Magento RWD is Awesome
 
RESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGN
RESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGN
RESPONSIVE_WEB_DESIGNRESPONSIVE_WEB_DESIGN
 
Mobile and Responsive Design with Sass
Mobile and Responsive Design with SassMobile and Responsive Design with Sass
Mobile and Responsive Design with Sass
 
Hardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ationHardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ation
 

More from Triquanta

Showcase Joost DrupalCon Vienna
Showcase Joost DrupalCon ViennaShowcase Joost DrupalCon Vienna
Showcase Joost DrupalCon Vienna
Triquanta
 
Entities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
Entities in Drupal 8 - Drupal Tech Talk - Bart FeenstraEntities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
Entities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
Triquanta
 
Hoe CMI in Drupal features overbodig maakt (of toch niet) - Drupal Tech Talk ...
Hoe CMI in Drupal features overbodig maakt (of toch niet) - Drupal Tech Talk ...Hoe CMI in Drupal features overbodig maakt (of toch niet) - Drupal Tech Talk ...
Hoe CMI in Drupal features overbodig maakt (of toch niet) - Drupal Tech Talk ...
Triquanta
 
The backend-of-frontend Drupaljam 2014
The backend-of-frontend Drupaljam 2014The backend-of-frontend Drupaljam 2014
The backend-of-frontend Drupaljam 2014
Triquanta
 
Toegankelijke Data
Toegankelijke DataToegankelijke Data
Toegankelijke Data
Triquanta
 
Van adlib naar online collectie
Van adlib naar online collectieVan adlib naar online collectie
Van adlib naar online collectie
Triquanta
 

More from Triquanta (6)

Showcase Joost DrupalCon Vienna
Showcase Joost DrupalCon ViennaShowcase Joost DrupalCon Vienna
Showcase Joost DrupalCon Vienna
 
Entities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
Entities in Drupal 8 - Drupal Tech Talk - Bart FeenstraEntities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
Entities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
 
Hoe CMI in Drupal features overbodig maakt (of toch niet) - Drupal Tech Talk ...
Hoe CMI in Drupal features overbodig maakt (of toch niet) - Drupal Tech Talk ...Hoe CMI in Drupal features overbodig maakt (of toch niet) - Drupal Tech Talk ...
Hoe CMI in Drupal features overbodig maakt (of toch niet) - Drupal Tech Talk ...
 
The backend-of-frontend Drupaljam 2014
The backend-of-frontend Drupaljam 2014The backend-of-frontend Drupaljam 2014
The backend-of-frontend Drupaljam 2014
 
Toegankelijke Data
Toegankelijke DataToegankelijke Data
Toegankelijke Data
 
Van adlib naar online collectie
Van adlib naar online collectieVan adlib naar online collectie
Van adlib naar online collectie
 

Recently uploaded

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 

Drupal theming met sass, compass, susy en aurora

  • 1. RESPONSIVE DRUPAL THEMING MET SASS, COMPASS, SUSY EN AURORA DRUPAL TECH TALK 25 APRIL 2013 MARC VAN GEND TRIQUANTA
  • 2. AGENDA Het Doel – #responsivemobilefirsthtml5buzzwordcompliant CSS preprocessing – SASS Werken met SASS – Compass De 2e generatie CSS grid systems – Susy Combineren tot een Drupal theme – Aurora De grote gevaarlijke onvermijdelijke live demo – or it didn't happen
  • 3. HET DOEL #RESPONSIVEMOBILEFIRSTHTML5BUZZWORDCOMPLIANT Responsive – één site voor alle schermen Progressive enhancement – functioneel » fraai » funky Mobile first – eerst simpel, dan groeien HTML5 – is beter, kan meer Werkbaar – samenwerken, onderhouden, uitbreiden
  • 4. CSS PREPROCESSING EN WAT IS SASS EIGENLIJK? SASS: “programmeren met stylesheets” .scss syntax: superset van CSS variables nesting mixins
  • 5. SASS: VARIABLES $triquanta-blue: #00c2ff; $gutter: 16px; .quote { margin: $gutter; padding: $gutter / 2; color: $triquanta-blue; } .quote { margin: 16px; padding: 8px; color: #00c2ff; }
  • 6. SASS: NESTING .menu li { float: left; a { color: #cc0000; } } .menu li { float: left; } .menu li a { color: #cc0000; }
  • 7. SASS: MIXINS @mixin box($color, $border:true) { padding: 1em; background-color: $color; @if $border { border: 1px solid #000000; } } .node { @include box(#006600); } .quote { @include box(#333333, false); } .node { padding: 1em; background-color: #006600; border: 1px solid #000000; } .quote { padding: 1em; background: #333333; }
  • 8. COMPASS ZET SASS AAN HET WERK Gereedschapskist – doet niet de afwas Bibliotheek – best-practice CSS config.rb – om te delen met collega's
  • 9. GEREEDSCHAPSKIST compass watch – schrijft CSS terwijl u SASSt compass create – begin een nieuw project Image sprites genereren – volautomatisch
  • 10. BIBLIOTHEEK Wie weet uit z'n hoofd hoe je een CSS3 background gradient maakt? .gradient { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0 background-image: -webkit-linear-gradient(#ffffff, #aaaaaa); background-image: -moz-linear-gradient(#ffffff, #aaaaaa); background-image: -o-linear-gradient(#ffffff, #aaaaaa); background-image: linear-gradient(#ffffff, #aaaaaa); } .gradient { @include background-image(linear-gradient(#ffffff, #aaaaaa)); }
  • 11. CONFIG.RB css_dir = "stylesheets" sass_dir = "sass" images_dir = "images" javascripts_dir = "javascripts"
  • 12. DE 2e GENERATIE CSS GRID SYSTEMS ...EN IN HET BIJZONDER SUSY Semantisch SASS & Compass Flexibel
  • 13. GRID SYSTEM: WAAROM EIGENLIJK? Grafisch ontwerp – nauwkeurige implementatie Schetsen / ontwerpen in de browser – gemak & snelheid DRY – developers zijn lui Onderhouden en uitbreiden – consistentie
  • 14. NIET-SEMANTISCH GRID SYSTEM <div id="main" class="container_12"> <article class="grid_8 prefix_4"> Lorem ipsum, dolor sit amet. </article> </div> .container_12 { width: 960px; } .grid_8 { display: inline; float: left; margin-left: 10px; margin-right: 10px; } .container_12 .prefix_4 { padding-left: 320px; } .container_12 .grid_8 { width: 620px; }
  • 15. SEMANTISCH GRID SYSTEM (SUSY) <div id="main"> <article> Lorem ipsum, dolor sit amet. </article> </div> #main { @include container; } #main article { @include span-columns(8); @include prefix(4); }
  • 16. SASS & COMPASS DO THE MATH $total-columns : 4; $total-columns-m : 6; $total-columns-l : 8; $column-width : 8em; $gutter-width : 2em; $grid-padding : $gutter-width / 2; #page { @include container($total-columns, $total-columns-m, $total-columns-l); } #page { max-width: 40em; padding-left: 1em; padding-right: 1em; margin-left: auto; margin-right: auto; } #page:after { content: ""; display: table; clear: both; } @media (min-width: 60em) { #page { max-width: 60em; } } @media (min-width: 80em) { #page { max-width: 80em; } }
  • 17. COMBINEREN TOT EEN DRUPAL THEME LEES: AURORA INSTALLEREN “Aurora is an HTML5, Sass and Compass powered, responsive optimized, mobile first base theme designed for people who like theming through code as opposed to through a GUI.”
  • 18. AURORA: BASE THEME drush dl aurora drush en aurora -y
  • 19. AURORA: RUBY GEM gem install compass-aurora
  • 20. AURORA: SUB THEME compass create -r aurora --using aurora/corona
  • 21. AURORA: DON'T CLICK! Uit de .info file: ... ; Chrome Frame Options settings[aurora_enable_chrome_frame] = 1 settings[aurora_min_ie_support] = 10 ; Miscelaneous Options settings[aurora_remove_core_css] = 0 settings[aurora_html_tags] = 1 settings[aurora_typekit_id] = 0 ; JavaScript Options settings[aurora_footer_js] = 1 settings[aurora_libraries_head] = 0 ...
  • 22. DE GROTE GEVAARLIJKE ONVERMIJDELIJKE LIVE DEMO
  • 23. DOET U DEZE MAAR