Slides presented at DrupalCamp Montreal 2013. Walks through the features of the Zen theme, how to use Sass and Compass, and finally, how to use Zen Grids to change the layout. Conclusion: Zen Grids simplifies the process of changing the layout, so makes responsive design a lot easier to implement.
2. About us
• Drupal consulting,
development, and training
• Founded in 2007 by Alex
and Suzanne
• Help organizations build
awesome Drupal websites
with custom functionality
4. 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
6. 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.
12. 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
22. • Compass converts sass files to regular
css
• It provides libraries that make your life
easier
23. Using Compass
compass watch sites/all/themes/subtheme
OR
Use a GUI tool to run Compass
(i.e. compass.app http://compass.handlino.com)
24. 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
37. 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