SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Mastering Theming
   with Zen 2
     John Albin Wilkins
         JohnAlbin
    twitter: @johnalbin
Zen 6.x-2.0 is out!!!
Organdized!
Keep your theme directory clean.

     • css
     • images
     • js
     • templates
One stylesheet
to rule them all
One stylesheet
to rule them all
• Hard to find anything.
One stylesheet
to rule them all
• Hard to find anything.
• Too much scrolling!
One stylesheet
to rule them all
• Hard to find anything.
• Too much scrolling!
• Developers use separate files
One stylesheet
 to rule them all
• Hard to find anything.
• Too much scrolling!
• Developers use separate files
• Sauron was evil. Don’t be evil.
30 stylesheets! ZOMG!
 •   block-editing-rtl.css   •   layout-liquid-rtl.css

 •   block-editing.css       •   layout-liquid.css

 •   blocks.css              •   messages-rtl.css

 •   comments.css            •   messages.css

 •   drupal6-reference.css   •   navigation.css

 •   fields.css               •   nodes.css

 •   forms-rtl.css           •   page-backgrounds.css

 •   forms.css               •   pages-rtl.css

 •   html-reset-rtl.css      •   pages.css

 •   html-reset.css          •   panels-styles.css

 •   ie.css                  •   print.css

 •   ie6-rtl.css             •   tabs-rtl.css

 •   ie6.css                 •   tabs.css

 •   layout-fixed-rtl.css     •   views-styles.css

 •   layout-fixed.css         •   wireframes.css
30 stylesheets! ZOMG!

• blocks.css        • navigation.css
• comments.css      • nodes.css
• fields.css         • page-backgrounds.css
• forms.css         • pages.css
• html-reset.css    • panels-styles.css
• ie.css            • print.css
• ie6.css           • tabs.css
• layout-fixed.css   • views-styles.css
• messages.css
Which stylesheet first?
Which stylesheet first?
• html-reset.css — I don’t like reset stylesheets.
Which stylesheet first?
• html-reset.css — I don’t like reset stylesheets.
• layout-fixed.css — This is just the default.
Which stylesheet first?
• html-reset.css — I don’t like reset stylesheets.
• layout-fixed.css — This is just the default.
• Most stylesheets are grouped by the template
  file.
Which stylesheet first?
• html-reset.css — I don’t like reset stylesheets.
• layout-fixed.css — This is just the default.
• Most stylesheets are grouped by the template
  file.
• And, yeah, IE still sucks — so you need a fix for
  the IE 31 stylesheet limit:
  http://drupal.org/project/ie_css_optimizer
Brief overview of Zen’s Layout method
Brief overview of Zen’s Layout method

•   Source-ordered HTML: The importance of the pieces of content
    determines the order in HTML, and not the graphic design.
Brief overview of Zen’s Layout method

•   Source-ordered HTML: The importance of the pieces of content
    determines the order in HTML, and not the graphic design.

•   Flexible layout options:
Brief overview of Zen’s Layout method

•   Source-ordered HTML: The importance of the pieces of content
    determines the order in HTML, and not the graphic design.

•   Flexible layout options:

    •   Fluid (100% width) or fixed-width layout
Brief overview of Zen’s Layout method

•   Source-ordered HTML: The importance of the pieces of content
    determines the order in HTML, and not the graphic design.

•   Flexible layout options:

    •   Fluid (100% width) or fixed-width layout

    •   Optional horizontal navbar
Brief overview of Zen’s Layout method

•   Source-ordered HTML: The importance of the pieces of content
    determines the order in HTML, and not the graphic design.

•   Flexible layout options:

    •   Fluid (100% width) or fixed-width layout

    •   Optional horizontal navbar

    •   1-3 columns built-in. More columns are possible without
        mind-bending contortions.
Brief overview of Zen’s Layout method

•   Source-ordered HTML: The importance of the pieces of content
    determines the order in HTML, and not the graphic design.

•   Flexible layout options:

    •   Fluid (100% width) or fixed-width layout

    •   Optional horizontal navbar

    •   1-3 columns built-in. More columns are possible without
        mind-bending contortions.

•   Zen’s default Layout Method is completely pluggable. If you don’t
    like it, just replace the layout.css file with your own layout
Brief overview of Zen’s Layout method

•   Source-ordered HTML: The importance of the pieces of content
    determines the order in HTML, and not the graphic design.

•   Flexible layout options:

    •   Fluid (100% width) or fixed-width layout

    •   Optional horizontal navbar

    •   1-3 columns built-in. More columns are possible without
        mind-bending contortions.

•   Zen’s default Layout Method is completely pluggable. If you don’t
    like it, just replace the layout.css file with your own layout
Brief overview of Zen’s Layout method

•   Source-ordered HTML: The importance of the pieces of content
    determines the order in HTML, and not the graphic design.

•   Flexible layout options:

    •   Fluid (100% width) or fixed-width layout

    •   Optional horizontal navbar

    •   1-3 columns built-in. More columns are possible without
        mind-bending contortions.

•   Zen’s default Layout Method is completely pluggable. If you don’t
    like it, just replace the layout.css file with your own layout
Negative Margins
  (and positive results)




  ( These blocks have float: left; )
Negative Margins
  (and positive results)




  ( These blocks have float: left; )
Negative Margins
  (and positive results)




  ( These blocks have float: left; )
Negative Margins
  (and positive results)




  ( These blocks have float: left; )
Negative Margins
  (and positive results)




  ( These blocks have float: left; )
Negative Margins
  (and positive results)




  ( These blocks have float: left; )
Information
Architecture
Information
         Architecture
• Set the source for Main & Secondary Links.
Information
         Architecture
• Set the source for Main & Secondary Links.
• Even with separate navigational areas, try to
  keep most links in the Main menu.
Information
         Architecture
• Set the source for Main & Secondary Links.
• Even with separate navigational areas, try to
  keep most links in the Main menu.
• Use “Menu block” module!
  http://drupal.org/project/menu_block
Accessibility

• Skip navigation links
• .element-invisible class for making content
  visually invisible, but still accessible.
• Heading navigation means your blocks need
  headings!
Ask me anything
   @JohnAlbin

Weitere ähnliche Inhalte

Ähnlich wie Mastering zen

Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Development
kmloomis
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
Peter Kaizer
 
SharePoint Navigation: A Step Towards Success
SharePoint Navigation: A Step Towards SuccessSharePoint Navigation: A Step Towards Success
SharePoint Navigation: A Step Towards Success
Stacy Deere
 

Ähnlich wie Mastering zen (20)

Nanocon Taiwan
Nanocon TaiwanNanocon Taiwan
Nanocon Taiwan
 
New Adventures in Drupal Theming
New Adventures in Drupal ThemingNew Adventures in Drupal Theming
New Adventures in Drupal Theming
 
Css
CssCss
Css
 
Dangerous CSS
Dangerous CSSDangerous CSS
Dangerous CSS
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Development
 
CSS workshop @ OutSystems
CSS workshop @ OutSystemsCSS workshop @ OutSystems
CSS workshop @ OutSystems
 
Css
CssCss
Css
 
Bootstrap: the full overview
Bootstrap: the full overviewBootstrap: the full overview
Bootstrap: the full overview
 
Sane CSS - A modern approach to CSS
Sane CSS - A modern approach to CSSSane CSS - A modern approach to CSS
Sane CSS - A modern approach to CSS
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Responsive web-design
Responsive web-designResponsive web-design
Responsive web-design
 
CSS Framework + Progressive Enhacements
CSS Framework + Progressive EnhacementsCSS Framework + Progressive Enhacements
CSS Framework + Progressive Enhacements
 
Efficient theming in Drupal
Efficient theming in DrupalEfficient theming in Drupal
Efficient theming in Drupal
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
SharePoint Navigation: A Step Towards Success
SharePoint Navigation: A Step Towards SuccessSharePoint Navigation: A Step Towards Success
SharePoint Navigation: A Step Towards Success
 
CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 

Mehr von John Albin Wilkins

Mehr von John Albin Wilkins (19)

Using the CSS Nesting Spec Today
Using the CSS Nesting Spec TodayUsing the CSS Nesting Spec Today
Using the CSS Nesting Spec Today
 
The Drupal Roadmap: From D7 to D9
The Drupal Roadmap: From D7 to D9The Drupal Roadmap: From D7 to D9
The Drupal Roadmap: From D7 to D9
 
Mastering Drupal 8’s Twig
Mastering Drupal 8’s TwigMastering Drupal 8’s Twig
Mastering Drupal 8’s Twig
 
CSS-in-JS: unexpected lessons for Drupal component design
CSS-in-JS: unexpected lessons for Drupal component designCSS-in-JS: unexpected lessons for Drupal component design
CSS-in-JS: unexpected lessons for Drupal component design
 
Style Guide Driven Development: All Hail the Robot Overlords!
Style Guide Driven Development: All Hail the Robot Overlords!Style Guide Driven Development: All Hail the Robot Overlords!
Style Guide Driven Development: All Hail the Robot Overlords!
 
Styleguide-Driven Development: The New Web Development
Styleguide-Driven Development: The New Web DevelopmentStyleguide-Driven Development: The New Web Development
Styleguide-Driven Development: The New Web Development
 
Managing Complex Projects with Design Components - Drupalcon Austin 2014
Managing Complex Projects with Design Components - Drupalcon Austin 2014Managing Complex Projects with Design Components - Drupalcon Austin 2014
Managing Complex Projects with Design Components - Drupalcon Austin 2014
 
DrupalSouth 2014: Managing Complex Projects with Design Components
DrupalSouth 2014: Managing Complex Projects with Design ComponentsDrupalSouth 2014: Managing Complex Projects with Design Components
DrupalSouth 2014: Managing Complex Projects with Design Components
 
SassConf: Managing Complex Projects with Design Components
SassConf: Managing Complex Projects with Design ComponentsSassConf: Managing Complex Projects with Design Components
SassConf: Managing Complex Projects with Design Components
 
Drupal Camp Taipei Keynote
Drupal Camp Taipei KeynoteDrupal Camp Taipei Keynote
Drupal Camp Taipei Keynote
 
Become an IA superstar (Chinese version)
Become an IA superstar (Chinese version)Become an IA superstar (Chinese version)
Become an IA superstar (Chinese version)
 
Mobile drupal: building a mobile theme
Mobile drupal: building a mobile themeMobile drupal: building a mobile theme
Mobile drupal: building a mobile theme
 
Sass: CSS with Attitude
Sass: CSS with AttitudeSass: CSS with Attitude
Sass: CSS with Attitude
 
Drupal and the Future of the Web
Drupal and the Future of the WebDrupal and the Future of the Web
Drupal and the Future of the Web
 
What's new in D7 Theming?
What's new in D7 Theming?What's new in D7 Theming?
What's new in D7 Theming?
 
Default theme implementations: a guide for module developers that want sweet ...
Default theme implementations: a guide for module developers that want sweet ...Default theme implementations: a guide for module developers that want sweet ...
Default theme implementations: a guide for module developers that want sweet ...
 
Rocking the Theme Layer
Rocking the Theme LayerRocking the Theme Layer
Rocking the Theme Layer
 
Drupal Design Tips
Drupal Design TipsDrupal Design Tips
Drupal Design Tips
 
Making Drupal Dance: Techniques for Non-obvious Theme Manipulations
Making Drupal Dance: Techniques for Non-obvious Theme ManipulationsMaking Drupal Dance: Techniques for Non-obvious Theme Manipulations
Making Drupal Dance: Techniques for Non-obvious Theme Manipulations
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Mastering zen

  • 1. Mastering Theming with Zen 2 John Albin Wilkins JohnAlbin twitter: @johnalbin
  • 2. Zen 6.x-2.0 is out!!!
  • 3. Organdized! Keep your theme directory clean. • css • images • js • templates
  • 5. One stylesheet to rule them all • Hard to find anything.
  • 6. One stylesheet to rule them all • Hard to find anything. • Too much scrolling!
  • 7. One stylesheet to rule them all • Hard to find anything. • Too much scrolling! • Developers use separate files
  • 8. One stylesheet to rule them all • Hard to find anything. • Too much scrolling! • Developers use separate files • Sauron was evil. Don’t be evil.
  • 9. 30 stylesheets! ZOMG! • block-editing-rtl.css • layout-liquid-rtl.css • block-editing.css • layout-liquid.css • blocks.css • messages-rtl.css • comments.css • messages.css • drupal6-reference.css • navigation.css • fields.css • nodes.css • forms-rtl.css • page-backgrounds.css • forms.css • pages-rtl.css • html-reset-rtl.css • pages.css • html-reset.css • panels-styles.css • ie.css • print.css • ie6-rtl.css • tabs-rtl.css • ie6.css • tabs.css • layout-fixed-rtl.css • views-styles.css • layout-fixed.css • wireframes.css
  • 10. 30 stylesheets! ZOMG! • blocks.css • navigation.css • comments.css • nodes.css • fields.css • page-backgrounds.css • forms.css • pages.css • html-reset.css • panels-styles.css • ie.css • print.css • ie6.css • tabs.css • layout-fixed.css • views-styles.css • messages.css
  • 12. Which stylesheet first? • html-reset.css — I don’t like reset stylesheets.
  • 13. Which stylesheet first? • html-reset.css — I don’t like reset stylesheets. • layout-fixed.css — This is just the default.
  • 14. Which stylesheet first? • html-reset.css — I don’t like reset stylesheets. • layout-fixed.css — This is just the default. • Most stylesheets are grouped by the template file.
  • 15. Which stylesheet first? • html-reset.css — I don’t like reset stylesheets. • layout-fixed.css — This is just the default. • Most stylesheets are grouped by the template file. • And, yeah, IE still sucks — so you need a fix for the IE 31 stylesheet limit: http://drupal.org/project/ie_css_optimizer
  • 16. Brief overview of Zen’s Layout method
  • 17. Brief overview of Zen’s Layout method • Source-ordered HTML: The importance of the pieces of content determines the order in HTML, and not the graphic design.
  • 18. Brief overview of Zen’s Layout method • Source-ordered HTML: The importance of the pieces of content determines the order in HTML, and not the graphic design. • Flexible layout options:
  • 19. Brief overview of Zen’s Layout method • Source-ordered HTML: The importance of the pieces of content determines the order in HTML, and not the graphic design. • Flexible layout options: • Fluid (100% width) or fixed-width layout
  • 20. Brief overview of Zen’s Layout method • Source-ordered HTML: The importance of the pieces of content determines the order in HTML, and not the graphic design. • Flexible layout options: • Fluid (100% width) or fixed-width layout • Optional horizontal navbar
  • 21. Brief overview of Zen’s Layout method • Source-ordered HTML: The importance of the pieces of content determines the order in HTML, and not the graphic design. • Flexible layout options: • Fluid (100% width) or fixed-width layout • Optional horizontal navbar • 1-3 columns built-in. More columns are possible without mind-bending contortions.
  • 22. Brief overview of Zen’s Layout method • Source-ordered HTML: The importance of the pieces of content determines the order in HTML, and not the graphic design. • Flexible layout options: • Fluid (100% width) or fixed-width layout • Optional horizontal navbar • 1-3 columns built-in. More columns are possible without mind-bending contortions. • Zen’s default Layout Method is completely pluggable. If you don’t like it, just replace the layout.css file with your own layout
  • 23. Brief overview of Zen’s Layout method • Source-ordered HTML: The importance of the pieces of content determines the order in HTML, and not the graphic design. • Flexible layout options: • Fluid (100% width) or fixed-width layout • Optional horizontal navbar • 1-3 columns built-in. More columns are possible without mind-bending contortions. • Zen’s default Layout Method is completely pluggable. If you don’t like it, just replace the layout.css file with your own layout
  • 24. Brief overview of Zen’s Layout method • Source-ordered HTML: The importance of the pieces of content determines the order in HTML, and not the graphic design. • Flexible layout options: • Fluid (100% width) or fixed-width layout • Optional horizontal navbar • 1-3 columns built-in. More columns are possible without mind-bending contortions. • Zen’s default Layout Method is completely pluggable. If you don’t like it, just replace the layout.css file with your own layout
  • 25. Negative Margins (and positive results) ( These blocks have float: left; )
  • 26. Negative Margins (and positive results) ( These blocks have float: left; )
  • 27. Negative Margins (and positive results) ( These blocks have float: left; )
  • 28. Negative Margins (and positive results) ( These blocks have float: left; )
  • 29. Negative Margins (and positive results) ( These blocks have float: left; )
  • 30. Negative Margins (and positive results) ( These blocks have float: left; )
  • 32. Information Architecture • Set the source for Main & Secondary Links.
  • 33. Information Architecture • Set the source for Main & Secondary Links. • Even with separate navigational areas, try to keep most links in the Main menu.
  • 34. Information Architecture • Set the source for Main & Secondary Links. • Even with separate navigational areas, try to keep most links in the Main menu. • Use “Menu block” module! http://drupal.org/project/menu_block
  • 35. Accessibility • Skip navigation links • .element-invisible class for making content visually invisible, but still accessible. • Heading navigation means your blocks need headings!
  • 36. Ask me anything @JohnAlbin

Hinweis der Redaktion

  1. * positive margins push against the edges of other divs * negative margins move the apparent edge of the divs
  2. * positive margins push against the edges of other divs * negative margins move the apparent edge of the divs
  3. * positive margins push against the edges of other divs * negative margins move the apparent edge of the divs
  4. * positive margins push against the edges of other divs * negative margins move the apparent edge of the divs
  5. * positive margins push against the edges of other divs * negative margins move the apparent edge of the divs