SlideShare une entreprise Scribd logo
1  sur  28
Theming good practices

                Cebotari Kirill




www.wearepropeople.com
Start with a sad news:


                This presentation is not what
                you thinks it’s about.

               It’s just my opinion on how
               we can try to make theming
               practices good )

www.wearepropeople.com
Content:
                   1.    Why ‘Theming’ ?
                   2.    What’s Best practices?
                   3.    Multi-class model
                   4.    Style Guides
                   5.    P.P.S.
                   6.    Round-up.



www.wearepropeople.com
1. Why ‘Theming’ ?
                http://drupal.org/project/Themes
                And that’s all. It’s just the part   connected
                to theme files.




www.wearepropeople.com
2. Best practice
Best practice is used to describe the process of
developing and following a standard way of
doing things that multiple organizations can
use.
Theme coding standarts.
                Making your theme semantically correct
                http://drupal.org/node/44072

                Theme coding conventions
                http://drupal.org/node/1965

                Theme Hook Suggestions
                http://drupal.org/node/1089656



www.wearepropeople.com
Themes we use:
                          AdoptiveTheme   Omega   Zen
              HTML5            +            +     +
           Responsive          +            +     +
           Mobile-first        +            +     +
                 SASS          +            +     +
                  Grid         +            +     +
             IE styles         +            +     +
                  RTL          +            +     +



www.wearepropeople.com
Theming Tools




www.wearepropeople.com
Server-side tools:
               Modules

               Conditional Stylesheets     http://drupal.org/project/conditional_styles

               Sassy*                    http://drupal.org/project/sassy

               Block Class               http://drupal.org/project/block_class

               Menu Class                http://drupal.org/project/menuclass



               Display Suite                    http://drupal.org/project/ds

               Panels                           http://drupal.org/project/panels

               Views                            http://drupal.org/project/views


www.wearepropeople.com
Browser-side tools:
               Live CSS Editor
               https://chrome.google.com/webstore/detail/oelggcmknbjmhkpgjfhakedcfnkgbdpg?hl=en-US


               Web Developer
               https://chrome.google.com/webstore/detail/bfbameneiokkgbdmiekhjnmfkcnldhhm?hl=en-US


               Code Cola
               https://chrome.google.com/webstore/detail/lomkpheldlbkkfiifcbfifipaofnmnkn?hl=en-US




www.wearepropeople.com
Browser-side tools:
               jQuery API Browser
               https://chrome.google.com/webstore/detail/abefhanahjellfbchdmkjdcchkogijhk?hl=en-US


               PerfectPixel
               https://chrome.google.com/webstore/detail/dkaagdgjmgdmbnecmcefdhjekcoceebi?hl=en-US


               MeasureIt!
               https://chrome.google.com/webstore/detail/aonjhmdcgbgikgjapjckfkefpphjpgma?hl=en-US

               EyeDropper, DevTools Autosave, Build With Chrome etc.


www.wearepropeople.com
Links again
30 CSS Best Practices for Beginners
http://net.tutsplus.com/tutorials/html-css-techniques/30-css-best-practices-for-beginners/


Smashing Magazine CSS principles
http://www.smashingmagazine.com/mastering-css-principles-comprehensive-reference-guide/


HTML and CSS techniques and tools
http://drupal.org/node/37156
3. MultiClass model:




                               *Back to basics

www.wearepropeople.com
Similar properties of elements
                         combined into a simple class, like:

                         .grey-border {
                            border: 1px #ddd solid;
                            -webkit-border-radius: 5px;
                            -moz-border-radius: 5px;
                            border-radius: 5px;
                         }



www.wearepropeople.com
Any classes you want:
               .white-border     .no-space         .simple-menu
               .grey-border      .last-item        .imaged-menu
               .grid3            .slider           .iconed
               .grid5            .bordered-image   .btn
               .light-gradient   .padd15           .full-table
               .dark-gradient    .padd30           .highlight-table
               .full-width       .no-margin        .white-box
               .clear-space      .mar15            .black-box
               .purple           .image-left       .imaged-list
               .orange           .image-right      .clear-fix

www.wearepropeople.com
So this block can only have:

                               purple-title
                               circle-list
                               grey-gradient
                               grey-border
                               grid5


www.wearepropeople.com
Pros and Cons:
                 + Can move parts from one project to another
                 + Doesn’t create useless repeats in css
                 + Can be used for style guide
                 + Easy to add new styles
                 + Part of theming turns into simple class adding

                 - Overriding styles for different pages
                 - God damn classes everywhere!
                 - Can be a real mess

www.wearepropeople.com
What does it lead to:

                     Style Guides
                     Time Saver
                     New (old) model of doing things
                     SASS friendly


www.wearepropeople.com
Link, what else:
Lego thinking (video)
http://www.youtube.com/watch?v=F8mZGDFDceU


Theming resources
http://wiki.wearepropeople.md/node/70


CSS Frameworks
http://coding.smashingmagazine.com/2007/09/21/css-frameworks-css-reset-design-from-scratch/
4. Style Guides:
            A style guide is a set of standards for the writing and
            design of documents, either for general use or for a specific
            publication, organization or field.

            So theming style guide would be a set of rules and
            standards to be used all over the web application. Most
            important, it includes ready-made samples.

www.wearepropeople.com
Who uses style guides:
            Twitter Bootstrap http://twitter.github.com/bootstrap/




www.wearepropeople.com
Links:
                Style Guide module
                http://drupal.org/project/styleguide




www.wearepropeople.com
More Links:
               Designing and Implementing Beautiful, Flexible Interfaces
               http://
               blip.tv/drupalcon/designing-and-implementing-beautiful-flexible-interfaces-6

               Inventing on Principles
               https://vimeo.com/36579366




www.wearepropeople.com
Style guides ftw:
               • Change the thinking from ‘using a framework’ to ‘suing a style
               guide’

               • Creating (new) standards for Front-end developers

               • More client-friendly approach




www.wearepropeople.com
5. P.P.S
               It doesn’t matter what tools you use,
               what practices, methods or style guides.

               It’s the way you can define a pattern for your work
               and share your practices with community

               We can define standards in theming and follow them
               only when we have any.


www.wearepropeople.com
Шаблонные сайты VS эксклюзивные сайты
               http://habrahabr.ru/company/twins/blog/148340/

               GitHub Style Guides
               https://github.com/styleguide/css

               CSS 3 Selectors
               https://speakerdeck.com/u/rachelandrew/p/css3-selectors

               Front-end style Guides
               http://24ways.org/2011/front-end-style-guides



www.wearepropeople.com
6. Round-up.




www.wearepropeople.com
Thanks!

               Cebotari Chirill
               twitter: @borzovme
               web: borzov.me




www.wearepropeople.com

Contenu connexe

Dernier

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Theming practices for Drupal. Style Guides

  • 1. Theming good practices Cebotari Kirill www.wearepropeople.com
  • 2. Start with a sad news: This presentation is not what you thinks it’s about. It’s just my opinion on how we can try to make theming practices good ) www.wearepropeople.com
  • 3. Content: 1. Why ‘Theming’ ? 2. What’s Best practices? 3. Multi-class model 4. Style Guides 5. P.P.S. 6. Round-up. www.wearepropeople.com
  • 4. 1. Why ‘Theming’ ? http://drupal.org/project/Themes And that’s all. It’s just the part connected to theme files. www.wearepropeople.com
  • 5. 2. Best practice Best practice is used to describe the process of developing and following a standard way of doing things that multiple organizations can use.
  • 6. Theme coding standarts. Making your theme semantically correct http://drupal.org/node/44072 Theme coding conventions http://drupal.org/node/1965 Theme Hook Suggestions http://drupal.org/node/1089656 www.wearepropeople.com
  • 7. Themes we use: AdoptiveTheme Omega Zen HTML5 + + + Responsive + + + Mobile-first + + + SASS + + + Grid + + + IE styles + + + RTL + + + www.wearepropeople.com
  • 9. Server-side tools: Modules Conditional Stylesheets http://drupal.org/project/conditional_styles Sassy* http://drupal.org/project/sassy Block Class http://drupal.org/project/block_class Menu Class http://drupal.org/project/menuclass Display Suite http://drupal.org/project/ds Panels http://drupal.org/project/panels Views http://drupal.org/project/views www.wearepropeople.com
  • 10. Browser-side tools: Live CSS Editor https://chrome.google.com/webstore/detail/oelggcmknbjmhkpgjfhakedcfnkgbdpg?hl=en-US Web Developer https://chrome.google.com/webstore/detail/bfbameneiokkgbdmiekhjnmfkcnldhhm?hl=en-US Code Cola https://chrome.google.com/webstore/detail/lomkpheldlbkkfiifcbfifipaofnmnkn?hl=en-US www.wearepropeople.com
  • 11. Browser-side tools: jQuery API Browser https://chrome.google.com/webstore/detail/abefhanahjellfbchdmkjdcchkogijhk?hl=en-US PerfectPixel https://chrome.google.com/webstore/detail/dkaagdgjmgdmbnecmcefdhjekcoceebi?hl=en-US MeasureIt! https://chrome.google.com/webstore/detail/aonjhmdcgbgikgjapjckfkefpphjpgma?hl=en-US EyeDropper, DevTools Autosave, Build With Chrome etc. www.wearepropeople.com
  • 12. Links again 30 CSS Best Practices for Beginners http://net.tutsplus.com/tutorials/html-css-techniques/30-css-best-practices-for-beginners/ Smashing Magazine CSS principles http://www.smashingmagazine.com/mastering-css-principles-comprehensive-reference-guide/ HTML and CSS techniques and tools http://drupal.org/node/37156
  • 13. 3. MultiClass model: *Back to basics www.wearepropeople.com
  • 14. Similar properties of elements combined into a simple class, like: .grey-border { border: 1px #ddd solid; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } www.wearepropeople.com
  • 15. Any classes you want: .white-border .no-space .simple-menu .grey-border .last-item .imaged-menu .grid3 .slider .iconed .grid5 .bordered-image .btn .light-gradient .padd15 .full-table .dark-gradient .padd30 .highlight-table .full-width .no-margin .white-box .clear-space .mar15 .black-box .purple .image-left .imaged-list .orange .image-right .clear-fix www.wearepropeople.com
  • 16. So this block can only have: purple-title circle-list grey-gradient grey-border grid5 www.wearepropeople.com
  • 17. Pros and Cons: + Can move parts from one project to another + Doesn’t create useless repeats in css + Can be used for style guide + Easy to add new styles + Part of theming turns into simple class adding - Overriding styles for different pages - God damn classes everywhere! - Can be a real mess www.wearepropeople.com
  • 18. What does it lead to: Style Guides Time Saver New (old) model of doing things SASS friendly www.wearepropeople.com
  • 19. Link, what else: Lego thinking (video) http://www.youtube.com/watch?v=F8mZGDFDceU Theming resources http://wiki.wearepropeople.md/node/70 CSS Frameworks http://coding.smashingmagazine.com/2007/09/21/css-frameworks-css-reset-design-from-scratch/
  • 20. 4. Style Guides: A style guide is a set of standards for the writing and design of documents, either for general use or for a specific publication, organization or field. So theming style guide would be a set of rules and standards to be used all over the web application. Most important, it includes ready-made samples. www.wearepropeople.com
  • 21. Who uses style guides: Twitter Bootstrap http://twitter.github.com/bootstrap/ www.wearepropeople.com
  • 22. Links: Style Guide module http://drupal.org/project/styleguide www.wearepropeople.com
  • 23. More Links: Designing and Implementing Beautiful, Flexible Interfaces http:// blip.tv/drupalcon/designing-and-implementing-beautiful-flexible-interfaces-6 Inventing on Principles https://vimeo.com/36579366 www.wearepropeople.com
  • 24. Style guides ftw: • Change the thinking from ‘using a framework’ to ‘suing a style guide’ • Creating (new) standards for Front-end developers • More client-friendly approach www.wearepropeople.com
  • 25. 5. P.P.S It doesn’t matter what tools you use, what practices, methods or style guides. It’s the way you can define a pattern for your work and share your practices with community We can define standards in theming and follow them only when we have any. www.wearepropeople.com
  • 26. Шаблонные сайты VS эксклюзивные сайты http://habrahabr.ru/company/twins/blog/148340/ GitHub Style Guides https://github.com/styleguide/css CSS 3 Selectors https://speakerdeck.com/u/rachelandrew/p/css3-selectors Front-end style Guides http://24ways.org/2011/front-end-style-guides www.wearepropeople.com
  • 28. Thanks! Cebotari Chirill twitter: @borzovme web: borzov.me www.wearepropeople.com