SlideShare a Scribd company logo
RESPONSIVE DESIGN
WITH ZEN
AND ZEN GRIDS
About us

• Drupal consulting,

development, and training
• Founded in 2007 by Alex

and Suzanne
• Help organizations build

awesome Drupal websites
with custom functionality
What is Zen?
What is Zen?


Extensive documentation



Comes with a fixed and responsive layouts



Accessibility features



Content-first source ordering



Uses normalize.css



Sass and compass integration



Zen grids
Content first ordering
Normalize.css
Adds styling to particular items rather than ‘re-setting’ all
HTML elements
•

Preserve useful browser defaults
rather than erasing them.

•

Normalize styles for a wide range of
HTML elements.

•

Correct bugs and common browser
inconsistencies.

•

Improve usability with subtle
improvements.

•

Explain the code using comments and
detailed documentation.
Normalize.css
Avoids use of multiple selectors, which clutter up inspector
tools when de-bugging CSS.
Role Attribute
Few Settings
Uses Sass and Compass
Zen Grids
• A compass library for creating layouts
Approaches to Layouts
Writing CSS by Hand
• CSS for each layout

(two-sidebars,
sidebar-left, sidebarright, etc.)
• Need to modify a lot

of CSS to make a
new layout

Modify the Markup
• Add classes to each

element (i.e. grid-12)
• CSS fixed for each class
• Need to modify HTML to

make a layout
What is Sass?
Sass
styles.scss

http://sass-lang.com/
Sass nesting
sass/styles.scss

css/styles.css

.block {

.block {

border: 1px solid #444;
h2 {
color: #ff0000;

border: 1px solid #444;
}
.block h2 {

}
}

color: #ff0000;
}
Sass variables
sass/styles.scss
$red: #ff0000;

css/styles.css
h1, h2, h3 {

h1, h2, h3 {
color: $red;
}

color: #ff0000;
}
Sass built-in functions
sass/styles.scss

css/styles.css

$red: #ff0000;

h1, h2, h3 {

h1, h2, h3 {
color: darken($red, 20);
}

color: #cc0000;
}
Mixins
sass/styles.scss
@mixin button {
border: 1px solid #000;
background: #222;
color: #fff;
padding: 5px 15px;
display: inline-block;
}

input#edit-submit {
@include button;
}

css/styles.css
input#edit-submit {
border: 1px solid #000;
background: #222;
color: #fff;
padding: 5px 15px;
display: inline-block;
}
Extend
sass/styles.scss

css/styles.css

#block-block-1 {
border: 1px solid #000;
padding: 5px 15px;
}

#block-block-1,
#block-block-2 {
border: 1px solid #000;
padding: 5px 15px;
}

#block-block-2 {
@extend #block-block-1;
background: red;
}

#block-block-2 {
background: red;
}
Import
sass/_defaults.scss
@mixin button {
border: 1px solid #000;
background: #222;
color: #fff;
padding: 5px 15px;
display: inline-block;
}

sass/styles.scss
@import “defaults”;
input#edit-submit {
@include button;
}

css/styles.css
input#edit-submit {
border: 1px solid #000;
background: #222;
color: #fff;
padding: 5px 15px;
display: inline-block;
}
What is Compass?
• Compass converts sass files to regular

css
• It provides libraries that make your life

easier
Using Compass
compass watch sites/all/themes/subtheme
OR
Use a GUI tool to run Compass
(i.e. compass.app http://compass.handlino.com)
Using Compass Libraries
• Import compass @import compass
• Import a particular compass library

@import compass/css3
• These files include variables and mixins

that you can include in your own code

http://compass-style.org/reference
Compass Mixins
sass/styles.scss
@import “compass/css3”;
.block {
@include single-box-shadow(#888, 10px, 10px, 5px);
}

css/styles.css
.block {
-moz-box-shadow: 10px 10px 5px #888;
-webkit-box-shadow: 10px 10px 5px #888;
box-shadow: 10px 10px 5px #888;
}
Compass and Zen
• Zen includes a _base.scss file which

imports useful compass partials
sass/_base.scss

sass/blocks.scss
Zen Grids
Zen Grids
• Grid system for Zen
• Can be used separately as a compass

library
• Uses sass and compass
• zengrids.com
@import “zen”;
$zen-column-count: 16;
$zen-gutter-width: 10px;
#page {
@include zen-grid-container();
}
#sidebar-first {
@include zen-grid-item(4,1);
}
#content {
@include zen-grid-item(12,5);
}
#content {
@include zen-grid-item(12,5);
@include zen-nested-container();
}
Box Sizing
$zen-box-sizing: true;

Standard box model

Using box-sizing: border-box;

http://www.paulirish.com/2012/box-sizing-border-box-ftw/
Demo!
bit.ly/zen-grids
Best Practices
• Use Zen Grids
• Use Sass and Compass
• Use _custom.scss for your custom mixins

and variables
• Take advantage of included compass

libraries (see _base.scss)
• Keep your layout in responsive-sidebars.scss
Resources
•

Documentation: http://zengrids.com/

•

Webinar: https://www.acquia.com/resources/acquia-tv/
conference/creating-responsive-drupal-sites-zen-gridsand-zen-5-theme-july-19

•

Best practices for Sass: https://github.com/anthonyshort/
idiomatic-sass

•

Resizing Bookmarklet: http://lab.maltewassermann.com/
viewport-resizer

•

http://compass-style.org/reference

•

http://zengrids.com

More Related Content

PDF
Introduction to the Drupal - Web Experience Toolkit
PPTX
Drupal Camp Manila 2014 - Theming with Zen
PDF
DrupalCamp NYC Panels Presentation - April 2014
PPT
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
PDF
Using Core Themes in Drupal 8
PDF
Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012
PPTX
BDUG Responsive Web Theming - 7/23/12
PDF
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
Introduction to the Drupal - Web Experience Toolkit
Drupal Camp Manila 2014 - Theming with Zen
DrupalCamp NYC Panels Presentation - April 2014
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 Theme
Using Core Themes in Drupal 8
Creating a Responsive Drupal Theme: Presentation from DrupalCamp Montreal 2012
BDUG Responsive Web Theming - 7/23/12
Creating Dynamic Landing Pages for Drupal with Panels - Webinar

What's hot (20)

PDF
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
PDF
WordPress for Designers
PDF
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
PDF
Drupal Site Building Checklist from DrupalCamp New Jersey
PDF
The Wonderful World of Drupal 8 Multilingual
PDF
What is Drupal? And Why is it Useful? Webinar
PDF
Zurb foundation
PDF
Intro to Drupal
PDF
Responsive Web Design using ZURB Foundation
PDF
A Custom Drupal Theme in 40 Minutes
KEY
Getting started with CSS frameworks using Zurb foundation
PDF
Upgrading to Drupal 8: Benefits and Gotchas
PDF
Drupal 8 - A Brief Introduction
PDF
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
ODP
Drupal - Blocks vs Context vs Panels
PDF
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
PPTX
SASS - CSS with Superpower
PDF
Put A Map On It! Enhanced geolocation in WordPress with Geo Mashup
PDF
WordPress Theme Development Basics
PDF
What is Drupal? An Introduction to Drupal 8
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
WordPress for Designers
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Drupal Site Building Checklist from DrupalCamp New Jersey
The Wonderful World of Drupal 8 Multilingual
What is Drupal? And Why is it Useful? Webinar
Zurb foundation
Intro to Drupal
Responsive Web Design using ZURB Foundation
A Custom Drupal Theme in 40 Minutes
Getting started with CSS frameworks using Zurb foundation
Upgrading to Drupal 8: Benefits and Gotchas
Drupal 8 - A Brief Introduction
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Drupal - Blocks vs Context vs Panels
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
SASS - CSS with Superpower
Put A Map On It! Enhanced geolocation in WordPress with Geo Mashup
WordPress Theme Development Basics
What is Drupal? An Introduction to Drupal 8
Ad

Viewers also liked (20)

PPTX
Zen & Good Design
PDF
Drupal 7 for Government Case Study: Presentation at DrupalCamp Montreal 2012
KEY
Views Configuration at Drupal Camp Toronto 2012
PDF
PDF
DrupalCamp 2011 -- Poutine Maker
PDF
Multilingual Content: Presentation from DrupalCamp Montreal 2012
PDF
Instant Dynamic Forms with #states
PDF
Advanced Views Configuration: Presentation from DrupalCamp Montreal 2012
PDF
Site Building Checklist DrupalCamp Ottawa
ODP
Sustainable Theming
KEY
Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10
ODP
Zen and Enterprise Architecture
PDF
Managing Translation Workflows in Drupal 7
PDF
White Paper, "Healing Environments in Health Care"
PDF
Raymond Kuiper - Zen and The Art of Zabbix Template Design | ZabConf2016
PDF
Zen Thesis
PDF
MIT HackingMedicine Healthcare ReDesign Toolset and Worksheets 2014
PPTX
Zen philosophy of interior design
PDF
Meilleures pratiques pour construire un site web Drupal
PDF
Study: The Future of VR, AR and Self-Driving Cars
Zen & Good Design
Drupal 7 for Government Case Study: Presentation at DrupalCamp Montreal 2012
Views Configuration at Drupal Camp Toronto 2012
DrupalCamp 2011 -- Poutine Maker
Multilingual Content: Presentation from DrupalCamp Montreal 2012
Instant Dynamic Forms with #states
Advanced Views Configuration: Presentation from DrupalCamp Montreal 2012
Site Building Checklist DrupalCamp Ottawa
Sustainable Theming
Multilingual Site Building with Drupal 7 at Drupal Camp NYC 10
Zen and Enterprise Architecture
Managing Translation Workflows in Drupal 7
White Paper, "Healing Environments in Health Care"
Raymond Kuiper - Zen and The Art of Zabbix Template Design | ZabConf2016
Zen Thesis
MIT HackingMedicine Healthcare ReDesign Toolset and Worksheets 2014
Zen philosophy of interior design
Meilleures pratiques pour construire un site web Drupal
Study: The Future of VR, AR and Self-Driving Cars
Ad

Similar to Responsive Design in Drupal with Zen and Zen Grids (20)

PDF
CSS Workflow. Pre & Post
KEY
Team styles
PPTX
Css framework
PPTX
How to develop a CSS Framework
PPTX
Css framework
PDF
Structuring your CSS for maintainability: rules and guile lines to write CSS
KEY
Advanced sass/compass
KEY
Efficient theming in Drupal
PDF
SASS, Compass, Gulp, Greensock
PPT
Spectrum 2015 going online with style - an intro to css
PPTX
Joes sass presentation
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
PPT
UNIT 3.ppt
PPT
An Introduction to CSS Preprocessors (SASS & LESS)
KEY
Sass compass
PDF
Getting Started with Sass & Compass
PDF
European SharePoint Webinar - Make SharePoint Sassy
PPTX
Beautifying senc
PPTX
Css methods architecture
CSS Workflow. Pre & Post
Team styles
Css framework
How to develop a CSS Framework
Css framework
Structuring your CSS for maintainability: rules and guile lines to write CSS
Advanced sass/compass
Efficient theming in Drupal
SASS, Compass, Gulp, Greensock
Spectrum 2015 going online with style - an intro to css
Joes sass presentation
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
UNIT 3.ppt
An Introduction to CSS Preprocessors (SASS & LESS)
Sass compass
Getting Started with Sass & Compass
European SharePoint Webinar - Make SharePoint Sassy
Beautifying senc
Css methods architecture

More from Suzanne Dergacheva (13)

PDF
It's All About the Experience: What I’ve learnt from talking to thousands of ...
PDF
Building a Great User Experience for Content Editors in Drupal 8
PDF
Dipping Your Toe into Drupal 8 Module Development
PDF
Device-Agnostic Content Strategy for Drupal
PDF
Creating a Reusable Drupal Website for Higher Education - Webinar
PDF
Migrate for Site Builders from MidCamp 2016
PDF
Creating a Drupal Install Profile for a Large Organization
PDF
Intro to Drupal Migrate for Site Builders
PDF
Drupal migrate-june2015
PDF
10 New Things You Can Do with Drupal 8 Out-of-the-Box
PDF
Creating a User-Friendly Search UI with Drupal - Presentation at DrupalCamp T...
PDF
Getting Started with Drupal 8 Theming - DrupalCamp Toronto 2014
PDF
Using Panels Wisely - DrupalCamp Ottawa 2014
It's All About the Experience: What I’ve learnt from talking to thousands of ...
Building a Great User Experience for Content Editors in Drupal 8
Dipping Your Toe into Drupal 8 Module Development
Device-Agnostic Content Strategy for Drupal
Creating a Reusable Drupal Website for Higher Education - Webinar
Migrate for Site Builders from MidCamp 2016
Creating a Drupal Install Profile for a Large Organization
Intro to Drupal Migrate for Site Builders
Drupal migrate-june2015
10 New Things You Can Do with Drupal 8 Out-of-the-Box
Creating a User-Friendly Search UI with Drupal - Presentation at DrupalCamp T...
Getting Started with Drupal 8 Theming - DrupalCamp Toronto 2014
Using Panels Wisely - DrupalCamp Ottawa 2014

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation theory and applications.pdf
PDF
Electronic commerce courselecture one. Pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
Modernizing your data center with Dell and AMD
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
MYSQL Presentation for SQL database connectivity
Diabetes mellitus diagnosis method based random forest with bat algorithm
NewMind AI Monthly Chronicles - July 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Advanced methodologies resolving dimensionality complications for autism neur...
Empathic Computing: Creating Shared Understanding
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation theory and applications.pdf
Electronic commerce courselecture one. Pdf
The AUB Centre for AI in Media Proposal.docx

Responsive Design in Drupal with Zen and Zen Grids