SlideShare uma empresa Scribd logo
1 de 30
DRY CSS
THEORIES, METHODS AND TOOLS FOR
EFFICIENT AND SCALABLE STYLESHEETS

  Jeremy Clarke • http://jeremyclarke.org
               Download these slides:
      http://slideshare.net/jeremyclarke
WHO IS JEREMY CLARKE?


• Communications   Studies at Concordia
 University.

• HTML+CSS     since 2003

• Montreal WordPress
                  Community/
 WordCamp organizer.
OVERVIEW

• An   example of DRY CSS, Global Voices.

• DRY   principle and problems with CSS.

• DRY   CSS theory, implementation and benefits.

• Preparsers   (LESS and SASS)
DRY EXAMPLE: GLOBAL VOICES
DRY EXAMPLE: GLOBAL VOICES
                               Before DRY CSS       After DRY CSS


• Applying DRY reduced 4200                                     5,000

 lines to 2400.
                                                               3,750
• Standardized  Shapes, text
 sizes, colors and modules.                                    2,500


                                                            1,250
• Nothinglost, just better
 organized.                                                0
                                     Lines of CSS
DRY EXAMPLE: GLOBAL VOICES

• Groups define shared
 properties.

• Groups   have many selectors.

• Each
     property/value pair is
 defined only once.
DRY EXAMPLE: GLOBAL VOICES
   #ROUNDED5-BORDER2
                  #MEDIUM-ORANGE-TEXT




#PALE-GREY-BACKGROUND
                      #GREY-BUTTON
                    #GREY-BUTTON-HOVER
                    #GREY-BUTTON-CLICK
DRY EXAMPLE: GLOBAL VOICES

• Elegantly organized IE hacks
 and Right-To-Left (RTL)
 styles into groups for the
 common fixes.

• Font-sizegroups re-used in
 optional Large-Font theme.
2 PRINCIPLES OF GOOD CSS

• Keep   style separate from content.

 • HTML  should be structural. Tags, classes and IDs should refer
  to the content itself rather than how it looks.

• Avoid   specificity by harnessing the cascade.

 • Selectors
           and definitions should be as global as possible for
  design consistency and to avoid specificity collisions.
DRY: DON’T REPEAT YOURSELF
• a.k.a   "Single Source of Truth" principle.

• "Everypiece of knowledge must have a single, unambiguous,
 authoritative representation within a system." *

• DRY code means all uses of data change simultaneously rather
 than needing to be replicated.

• DRY  is the fundamental reason to use of variables and
 functions in all programming.

• Bugs      love a wet mess.
                  * http://en.wikipedia.org/wiki/Don't_repeat_yourself
PROBLEMS WITH KEEPING CSS DRY

• No  variables - We can’t re-use values across properties (I.e
 a color hex).

• No  mixins (functions) - No way to re-use sets of property/
 value pairs across definitions.

• Result: Constant   duplication of style definitions across different
 selectors.
PRINCIPLES OF DRY CSS
            (TL;DR)
• Don't  Repeat Yourself. Never repeat a style/property
 definition if you can avoid it.

• Group  selectors with shared properties rather than
 defining them separately.
CREATING DRY CSS

• Group selectors that share
 properties above the properties
 they share.

• Name   the groups based on their
 role in the design.

• Use the name as an ID at the top
 of the list and a class at bottom.
ORGANIZING DRY CSS
• Decide on group types and
 groups as necessary for your
 design, operational needs
 and/or other CSS
 methodologies.

• Recommended: Colors, Text,
 Shapes, Structures, Modules.

• At right: GV’s DRY groups,
 visualized by CSSEdit for
 Mac*
                  * http://macrabbit.com/espresso/
KEEPING IT DRY

• Make individual selectors as rare
 and sparse as possible, only use
 them as exceptions.

• Always   have an answer to "Why
 isn't this part of a group?"

• Don’t
      go crazy. Benefits scale even if
 some definitions remain moist.
BENEFITS OF DRY CSS

•2 simple rules to follow that ensure a solid organizational
 structure.

• Less   CSS, shorter and smaller (kb) stylesheets.

• Promotes    good design practice and uniform updates.

• Uses   only philosophically and syntactically standard CSS.
BENEFITS:
     PROMOTES CONCEPTUAL DESIGN

• Encourages  you to think in terms of style patterns (groups),
 rather than individual objects.

• Naming    of groups encourages rational organization of designs.

• Listing
        all group members together encourages optimization
 and generalization of selectors because you see how
 interrelated/inheritable they are.
BENEFITS:
EDITS TO GROUPS AFFECT ALL MEMBERS

• Avoids   need to find all related styles to match changes.

• Changes   are less likely to be inconsistently applied.

• When   testing changes the dev sees all group members change
 as well.

• Moving   selectors between groups to restyle is fast and easy.
BENEFITS:
      TAKES ADVANTAGE OF INSPECTORS
•   Inspecting an object shows cascade of
    groups it participates in.

•   Group "name" (starting ID, i.e.
    #SMALL-TEXT) is visible in inspector.

•   Seeing all group members informs
    dev of related elements that should
    be considered.

•   Live-edits expose the change in
    related items as well.
BENEFITS:
DOESN’T REQUIRE CHANGES TO HTML
• Uses   whatever classes and IDs are already present.

• IfHTML needs editing it's only to add more detailed semantic
  classes to use in your DRY groups.

• Useful
       when generated HTML is out of your control
  (WordPress core/plugins, 3rd party widgets)

• Mainly   relevant when comparing DRY with OOCSS.
BENEFITS:
     COMPLETELY STANDARD
• Simply   an organizing principle for normal CSS.

• Adheres    to separation of style and content.

• Bothbackward and forward compatible, from IE6 hacks to
 prefixed CSS3 properties.

• CSS    can be pasted anywhere and just work.

• Groupscan be extracted and re-used elsewhere by removing
 group members and inserting new ones.
BENEFITS:
         INTEGRATES WITH OTHER
            METHODOLOGIES
• Compatible with most other CSS methodologies like grids,
 OOCSS* or SMACSS** because the way you organize your
 groups is up to you.

• Progressiveenhancement and browser support is your
 choice. DRY only defines how you organize your selectors and
 properties.

   * https://github.com/stubbornella/oocss/wiki ** http://smacss.com/book/
PERFORMANCE ISSUES?
• TL;DR:      Probably not.

• "Formost web sites, the possible performance gains from
 optimizing CSS selectors will be small, and are not worth the
 costs." ~Steve Sounders*

• Having   many selectors does not inherently hurt performance.

• SeeSteve Sounders research** for optimizations that matter
 (and can be applied to DRY CSS).
  * http://www.stevesouders.com/blog/2009/03/10/performance-impact-of-css-selectors/
        ** http://www.stevesouders.com/blog/2009/06/18/simplifying-css-selectors/
CSS PREPARSERS
•   Add new languages (LESS/SASS) based
    on CSS but with additional syntax and
    a new parsing layer to read it.

    •   Variables to re-use values across
        definitions.
                                                       Variables in LESS*

    •   Mixins or inheritance to include
        a class inside another class.

    •   All kinds of other programmy things
        (functions, switch conditions)
                                                       Mixins in LESS*
* E.g. http://lesscss.org/ and http://sass-lang.com/
CSS PREPARSERS: CONSIDERATIONS
• Allow   for extensive programming by experts.

• External
         frameworks (blueprint, grids etc.) can be included and
 updated without modification (don’t hack core).

• BUT  at the cost of destandardization and dependence on
 external libraries or software. It isn’t CSS.

• Theycan still be misused to create wet, sloppy stylesheets.
 You still have to plan your design.
CSS PREPARSERS: SOLUTIONS
• Use   for development only, publish natural CSS with themes.

• Be   careful to create CSS that is still elegant in natural form.

• Use “Inheritance” rather       than “mixins” to avoid repetition.




  *SASS examples from http://sass-lang.com/ LESS should have this feature soon.
CSS PREPARSERS: TOOLS
•   WP-Less (WP plugin) Adds .less support to WP, but requires a
    version of the plugin on all sites: http://wordpress.org/extend/
    plugins/wp-less/
•   Codekit/Less.app (OSX only) Automatically compiles SASS/LESS
    into CSS during development http://incident57.com/codekit/
DRY CSS REVIEW
Group re-usable     Name the         Add selectors to
  properties      groups logically    various groups
QUESTIONS?
DRY CSS
 THEORIES, METHODS AND TOOLS FOR
 EFFICIENT AND SCALABLE STYLESHEETS

Jeremy Clarke • http://jeremyclarke.org

                  Creative Commons Share Alike
                   http://creativecommons.org/licenses/by-sa/3.0/



                 Download these slides:
        http://slideshare.net/jeremyclarke

Mais conteúdo relacionado

Mais procurados

Drupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenDrupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenJapo Domingo
 
Hammersmith fundamentals html fundamentals
Hammersmith fundamentals   html fundamentalsHammersmith fundamentals   html fundamentals
Hammersmith fundamentals html fundamentalsMike Bradshaw
 
CUST-6 Integrating Alfresco with Publishing Tools
CUST-6 Integrating Alfresco with Publishing ToolsCUST-6 Integrating Alfresco with Publishing Tools
CUST-6 Integrating Alfresco with Publishing ToolsAlfresco Software
 
Zurb foundation
Zurb foundationZurb foundation
Zurb foundationsean_todd
 
Responsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsResponsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsSuzanne Dergacheva
 
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. FoundationBattle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. FoundationRachel Cherry
 
Wp nhcc portfolio
Wp nhcc portfolioWp nhcc portfolio
Wp nhcc portfoliogregorvios
 
Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.DataArt
 
Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3John Bertucci
 
Intro to OOCSS Workshop
Intro to OOCSS WorkshopIntro to OOCSS Workshop
Intro to OOCSS WorkshopJulie Cameron
 
Drupal7 an introduction by ayushiinfotech
Drupal7 an introduction by ayushiinfotechDrupal7 an introduction by ayushiinfotech
Drupal7 an introduction by ayushiinfotechMandakini Kumari
 
Blogging with drupal
Blogging with drupalBlogging with drupal
Blogging with drupalChris Ward
 
Theme Development: From an idea to getting approved to wordpress.org
Theme Development: From an idea to getting approved to wordpress.orgTheme Development: From an idea to getting approved to wordpress.org
Theme Development: From an idea to getting approved to wordpress.orgThemeHorse
 
Functional Immutable CSS
Functional Immutable CSS Functional Immutable CSS
Functional Immutable CSS Pivorak MeetUp
 
WordPress Themes and Plugins
WordPress Themes and PluginsWordPress Themes and Plugins
WordPress Themes and Pluginssuperann
 
HTML/CSS Workshop @ Searchcamp
HTML/CSS Workshop @ SearchcampHTML/CSS Workshop @ Searchcamp
HTML/CSS Workshop @ SearchcampJames Mills
 
Object Oriented CSS for rapid, scalable and maintainable development
Object Oriented CSS for rapid, scalable and maintainable developmentObject Oriented CSS for rapid, scalable and maintainable development
Object Oriented CSS for rapid, scalable and maintainable developmentGraeme Blackwood
 
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 CSSLee Cheneler
 

Mais procurados (20)

Drupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with ZenDrupal Camp Manila 2014 - Theming with Zen
Drupal Camp Manila 2014 - Theming with Zen
 
Hammersmith fundamentals html fundamentals
Hammersmith fundamentals   html fundamentalsHammersmith fundamentals   html fundamentals
Hammersmith fundamentals html fundamentals
 
CUST-6 Integrating Alfresco with Publishing Tools
CUST-6 Integrating Alfresco with Publishing ToolsCUST-6 Integrating Alfresco with Publishing Tools
CUST-6 Integrating Alfresco with Publishing Tools
 
Zurb foundation
Zurb foundationZurb foundation
Zurb foundation
 
Responsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsResponsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen Grids
 
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. FoundationBattle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
 
Wp nhcc portfolio
Wp nhcc portfolioWp nhcc portfolio
Wp nhcc portfolio
 
Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.
 
Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3
 
Intro to OOCSS Workshop
Intro to OOCSS WorkshopIntro to OOCSS Workshop
Intro to OOCSS Workshop
 
Drupal7 an introduction by ayushiinfotech
Drupal7 an introduction by ayushiinfotechDrupal7 an introduction by ayushiinfotech
Drupal7 an introduction by ayushiinfotech
 
Blogging with drupal
Blogging with drupalBlogging with drupal
Blogging with drupal
 
Slides bootstrap-4
Slides bootstrap-4Slides bootstrap-4
Slides bootstrap-4
 
Theme Development: From an idea to getting approved to wordpress.org
Theme Development: From an idea to getting approved to wordpress.orgTheme Development: From an idea to getting approved to wordpress.org
Theme Development: From an idea to getting approved to wordpress.org
 
Functional Immutable CSS
Functional Immutable CSS Functional Immutable CSS
Functional Immutable CSS
 
WordPress Themes and Plugins
WordPress Themes and PluginsWordPress Themes and Plugins
WordPress Themes and Plugins
 
HTML/CSS Workshop @ Searchcamp
HTML/CSS Workshop @ SearchcampHTML/CSS Workshop @ Searchcamp
HTML/CSS Workshop @ Searchcamp
 
Design todevelop
Design todevelopDesign todevelop
Design todevelop
 
Object Oriented CSS for rapid, scalable and maintainable development
Object Oriented CSS for rapid, scalable and maintainable developmentObject Oriented CSS for rapid, scalable and maintainable development
Object Oriented CSS for rapid, scalable and maintainable development
 
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
 

Destaque

Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesJer Clarke
 
Our Best Practices Are Killing Us
Our Best Practices Are Killing UsOur Best Practices Are Killing Us
Our Best Practices Are Killing UsNicole Sullivan
 
A Plugin For That presentation
A Plugin For That presentationA Plugin For That presentation
A Plugin For That presentationmarnafriedman
 
Power Up Your Non-Profit Website With WordPress
Power Up Your Non-Profit Website With WordPressPower Up Your Non-Profit Website With WordPress
Power Up Your Non-Profit Website With WordPressRaymund Mitchell
 
Understanding WordPress Filters and Actions
Understanding WordPress Filters and ActionsUnderstanding WordPress Filters and Actions
Understanding WordPress Filters and ActionsIan Wilson
 
THE WORDPRESS DASHBOARD DEMYSTIFIED
THE WORDPRESS DASHBOARD DEMYSTIFIEDTHE WORDPRESS DASHBOARD DEMYSTIFIED
THE WORDPRESS DASHBOARD DEMYSTIFIEDBobWP.com
 
WordPress per giornalisti freelance
WordPress per giornalisti freelance  WordPress per giornalisti freelance
WordPress per giornalisti freelance GGDBologna
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressmtoppa
 
Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? GGDBologna
 
Scoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an AgencyScoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an AgencyKara Hansen
 
Por um wordpress mais seguro
Por um wordpress mais seguroPor um wordpress mais seguro
Por um wordpress mais seguroFlávio Silveira
 
Miglioriamo le performance di wordpress
Miglioriamo le performance di wordpress Miglioriamo le performance di wordpress
Miglioriamo le performance di wordpress GGDBologna
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First WidgetChris Wilcoxson
 
Acessibilidade Web agora é obrigatória. Estamos preparados?
Acessibilidade Web agora é obrigatória. Estamos preparados?Acessibilidade Web agora é obrigatória. Estamos preparados?
Acessibilidade Web agora é obrigatória. Estamos preparados?Hans Mösl
 
Work, Life, Blog Balance
Work, Life, Blog BalanceWork, Life, Blog Balance
Work, Life, Blog BalanceAlicia Murray
 

Destaque (20)

Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesKeep Your Code Organized! WordCamp Montreal 2013 Presentation slides
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slides
 
Our Best Practices Are Killing Us
Our Best Practices Are Killing UsOur Best Practices Are Killing Us
Our Best Practices Are Killing Us
 
Object Oriented CSS
Object Oriented CSSObject Oriented CSS
Object Oriented CSS
 
WordPress as a CMS
WordPress as a CMSWordPress as a CMS
WordPress as a CMS
 
A Plugin For That presentation
A Plugin For That presentationA Plugin For That presentation
A Plugin For That presentation
 
Power Up Your Non-Profit Website With WordPress
Power Up Your Non-Profit Website With WordPressPower Up Your Non-Profit Website With WordPress
Power Up Your Non-Profit Website With WordPress
 
WordCamp 2015
WordCamp 2015WordCamp 2015
WordCamp 2015
 
Dev Work Flow
Dev Work FlowDev Work Flow
Dev Work Flow
 
Understanding WordPress Filters and Actions
Understanding WordPress Filters and ActionsUnderstanding WordPress Filters and Actions
Understanding WordPress Filters and Actions
 
THE WORDPRESS DASHBOARD DEMYSTIFIED
THE WORDPRESS DASHBOARD DEMYSTIFIEDTHE WORDPRESS DASHBOARD DEMYSTIFIED
THE WORDPRESS DASHBOARD DEMYSTIFIED
 
WordPress per giornalisti freelance
WordPress per giornalisti freelance  WordPress per giornalisti freelance
WordPress per giornalisti freelance
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPress
 
Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress?
 
Scoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an AgencyScoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an Agency
 
Por um wordpress mais seguro
Por um wordpress mais seguroPor um wordpress mais seguro
Por um wordpress mais seguro
 
Miglioriamo le performance di wordpress
Miglioriamo le performance di wordpress Miglioriamo le performance di wordpress
Miglioriamo le performance di wordpress
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First Widget
 
Acessibilidade Web agora é obrigatória. Estamos preparados?
Acessibilidade Web agora é obrigatória. Estamos preparados?Acessibilidade Web agora é obrigatória. Estamos preparados?
Acessibilidade Web agora é obrigatória. Estamos preparados?
 
Wcoc preso
Wcoc presoWcoc preso
Wcoc preso
 
Work, Life, Blog Balance
Work, Life, Blog BalanceWork, Life, Blog Balance
Work, Life, Blog Balance
 

Semelhante a WordCamp NYC - DRY CSS

What is-sass-by-lucas-castro
What is-sass-by-lucas-castroWhat is-sass-by-lucas-castro
What is-sass-by-lucas-castroLucas Castro
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1Jyoti Yadav
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation Salman Memon
 
WEBD 162: Intro to CSS
WEBD 162: Intro to CSSWEBD 162: Intro to CSS
WEBD 162: Intro to CSSpalomateach
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetNeha Sharma
 
Sitting in the Driver's Seat
Sitting in the Driver's SeatSitting in the Driver's Seat
Sitting in the Driver's SeatJack Moffett
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS TroubleshootingDenise Jacobs
 
Css presentation lecture 3
Css presentation lecture 3Css presentation lecture 3
Css presentation lecture 3Mudasir Syed
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1Mudasir Syed
 
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreCreating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreSuzanne Dergacheva
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflowPeter Kaizer
 
CSS for Design Systems
CSS for Design SystemsCSS for Design Systems
CSS for Design SystemsAdam Kudrna
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourOsama Ghandour Geris
 

Semelhante a WordCamp NYC - DRY CSS (20)

What is-sass-by-lucas-castro
What is-sass-by-lucas-castroWhat is-sass-by-lucas-castro
What is-sass-by-lucas-castro
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
WEBD 162: Intro to CSS
WEBD 162: Intro to CSSWEBD 162: Intro to CSS
WEBD 162: Intro to CSS
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome Stylesheet
 
Less
LessLess
Less
 
Css tutorial 2012
Css tutorial 2012Css tutorial 2012
Css tutorial 2012
 
Sitting in the Driver's Seat
Sitting in the Driver's SeatSitting in the Driver's Seat
Sitting in the Driver's Seat
 
LESS is More
LESS is MoreLESS is More
LESS is More
 
Css Systems
Css SystemsCss Systems
Css Systems
 
DHTML
DHTMLDHTML
DHTML
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS Troubleshooting
 
Css presentation lecture 3
Css presentation lecture 3Css presentation lecture 3
Css presentation lecture 3
 
Css presentation lecture 1
Css presentation lecture 1Css presentation lecture 1
Css presentation lecture 1
 
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon BaltimoreCreating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
Creating Landing Pages and Layouts for Drupal 8 - DrupalCon Baltimore
 
Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
 
CSS for Design Systems
CSS for Design SystemsCSS for Design Systems
CSS for Design Systems
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandour
 
DW unit 3.pptx
DW unit 3.pptxDW unit 3.pptx
DW unit 3.pptx
 
CSS for design systems
CSS for design systemsCSS for design systems
CSS for design systems
 

Mais de Jer Clarke

globalvoices.org - How our CC license spawned a world class translation commu...
globalvoices.org - How our CC license spawned a world class translation commu...globalvoices.org - How our CC license spawned a world class translation commu...
globalvoices.org - How our CC license spawned a world class translation commu...Jer Clarke
 
Global Voices proves Creative Commons is Awesome • CC Salon Montreal
Global Voices proves Creative Commons is Awesome • CC Salon MontrealGlobal Voices proves Creative Commons is Awesome • CC Salon Montreal
Global Voices proves Creative Commons is Awesome • CC Salon MontrealJer Clarke
 
Widgetize Everything: Building smarter WordPress themes with Widgets and Temp...
Widgetize Everything: Building smarter WordPress themes with Widgets and Temp...Widgetize Everything: Building smarter WordPress themes with Widgets and Temp...
Widgetize Everything: Building smarter WordPress themes with Widgets and Temp...Jer Clarke
 
NetBeans, IDEs and faster programming for WordPress - WordCamp NYC 2009
NetBeans, IDEs and faster programming for WordPress - WordCamp NYC 2009NetBeans, IDEs and faster programming for WordPress - WordCamp NYC 2009
NetBeans, IDEs and faster programming for WordPress - WordCamp NYC 2009Jer Clarke
 
Caching and Optimization for WordPress
Caching and Optimization for WordPressCaching and Optimization for WordPress
Caching and Optimization for WordPressJer Clarke
 
WordPress Code and Setup Strategies and Advice, WordCamp Toronto '09
WordPress Code and Setup Strategies and Advice, WordCamp Toronto '09WordPress Code and Setup Strategies and Advice, WordCamp Toronto '09
WordPress Code and Setup Strategies and Advice, WordCamp Toronto '09Jer Clarke
 
Global Voices Generic Presentation
Global Voices Generic PresentationGlobal Voices Generic Presentation
Global Voices Generic PresentationJer Clarke
 
Global Voices - Democratising the web with Wordpress and Love
Global Voices - Democratising the web with Wordpress and LoveGlobal Voices - Democratising the web with Wordpress and Love
Global Voices - Democratising the web with Wordpress and LoveJer Clarke
 

Mais de Jer Clarke (8)

globalvoices.org - How our CC license spawned a world class translation commu...
globalvoices.org - How our CC license spawned a world class translation commu...globalvoices.org - How our CC license spawned a world class translation commu...
globalvoices.org - How our CC license spawned a world class translation commu...
 
Global Voices proves Creative Commons is Awesome • CC Salon Montreal
Global Voices proves Creative Commons is Awesome • CC Salon MontrealGlobal Voices proves Creative Commons is Awesome • CC Salon Montreal
Global Voices proves Creative Commons is Awesome • CC Salon Montreal
 
Widgetize Everything: Building smarter WordPress themes with Widgets and Temp...
Widgetize Everything: Building smarter WordPress themes with Widgets and Temp...Widgetize Everything: Building smarter WordPress themes with Widgets and Temp...
Widgetize Everything: Building smarter WordPress themes with Widgets and Temp...
 
NetBeans, IDEs and faster programming for WordPress - WordCamp NYC 2009
NetBeans, IDEs and faster programming for WordPress - WordCamp NYC 2009NetBeans, IDEs and faster programming for WordPress - WordCamp NYC 2009
NetBeans, IDEs and faster programming for WordPress - WordCamp NYC 2009
 
Caching and Optimization for WordPress
Caching and Optimization for WordPressCaching and Optimization for WordPress
Caching and Optimization for WordPress
 
WordPress Code and Setup Strategies and Advice, WordCamp Toronto '09
WordPress Code and Setup Strategies and Advice, WordCamp Toronto '09WordPress Code and Setup Strategies and Advice, WordCamp Toronto '09
WordPress Code and Setup Strategies and Advice, WordCamp Toronto '09
 
Global Voices Generic Presentation
Global Voices Generic PresentationGlobal Voices Generic Presentation
Global Voices Generic Presentation
 
Global Voices - Democratising the web with Wordpress and Love
Global Voices - Democratising the web with Wordpress and LoveGlobal Voices - Democratising the web with Wordpress and Love
Global Voices - Democratising the web with Wordpress and Love
 

Último

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 

Último (20)

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 

WordCamp NYC - DRY CSS

  • 1. DRY CSS THEORIES, METHODS AND TOOLS FOR EFFICIENT AND SCALABLE STYLESHEETS Jeremy Clarke • http://jeremyclarke.org Download these slides: http://slideshare.net/jeremyclarke
  • 2. WHO IS JEREMY CLARKE? • Communications Studies at Concordia University. • HTML+CSS since 2003 • Montreal WordPress Community/ WordCamp organizer.
  • 3. OVERVIEW • An example of DRY CSS, Global Voices. • DRY principle and problems with CSS. • DRY CSS theory, implementation and benefits. • Preparsers (LESS and SASS)
  • 5. DRY EXAMPLE: GLOBAL VOICES Before DRY CSS After DRY CSS • Applying DRY reduced 4200 5,000 lines to 2400. 3,750 • Standardized Shapes, text sizes, colors and modules. 2,500 1,250 • Nothinglost, just better organized. 0 Lines of CSS
  • 6. DRY EXAMPLE: GLOBAL VOICES • Groups define shared properties. • Groups have many selectors. • Each property/value pair is defined only once.
  • 7. DRY EXAMPLE: GLOBAL VOICES #ROUNDED5-BORDER2 #MEDIUM-ORANGE-TEXT #PALE-GREY-BACKGROUND #GREY-BUTTON #GREY-BUTTON-HOVER #GREY-BUTTON-CLICK
  • 8. DRY EXAMPLE: GLOBAL VOICES • Elegantly organized IE hacks and Right-To-Left (RTL) styles into groups for the common fixes. • Font-sizegroups re-used in optional Large-Font theme.
  • 9. 2 PRINCIPLES OF GOOD CSS • Keep style separate from content. • HTML should be structural. Tags, classes and IDs should refer to the content itself rather than how it looks. • Avoid specificity by harnessing the cascade. • Selectors and definitions should be as global as possible for design consistency and to avoid specificity collisions.
  • 10. DRY: DON’T REPEAT YOURSELF • a.k.a "Single Source of Truth" principle. • "Everypiece of knowledge must have a single, unambiguous, authoritative representation within a system." * • DRY code means all uses of data change simultaneously rather than needing to be replicated. • DRY is the fundamental reason to use of variables and functions in all programming. • Bugs love a wet mess. * http://en.wikipedia.org/wiki/Don't_repeat_yourself
  • 11. PROBLEMS WITH KEEPING CSS DRY • No variables - We can’t re-use values across properties (I.e a color hex). • No mixins (functions) - No way to re-use sets of property/ value pairs across definitions. • Result: Constant duplication of style definitions across different selectors.
  • 12. PRINCIPLES OF DRY CSS (TL;DR) • Don't Repeat Yourself. Never repeat a style/property definition if you can avoid it. • Group selectors with shared properties rather than defining them separately.
  • 13. CREATING DRY CSS • Group selectors that share properties above the properties they share. • Name the groups based on their role in the design. • Use the name as an ID at the top of the list and a class at bottom.
  • 14. ORGANIZING DRY CSS • Decide on group types and groups as necessary for your design, operational needs and/or other CSS methodologies. • Recommended: Colors, Text, Shapes, Structures, Modules. • At right: GV’s DRY groups, visualized by CSSEdit for Mac* * http://macrabbit.com/espresso/
  • 15. KEEPING IT DRY • Make individual selectors as rare and sparse as possible, only use them as exceptions. • Always have an answer to "Why isn't this part of a group?" • Don’t go crazy. Benefits scale even if some definitions remain moist.
  • 16. BENEFITS OF DRY CSS •2 simple rules to follow that ensure a solid organizational structure. • Less CSS, shorter and smaller (kb) stylesheets. • Promotes good design practice and uniform updates. • Uses only philosophically and syntactically standard CSS.
  • 17. BENEFITS: PROMOTES CONCEPTUAL DESIGN • Encourages you to think in terms of style patterns (groups), rather than individual objects. • Naming of groups encourages rational organization of designs. • Listing all group members together encourages optimization and generalization of selectors because you see how interrelated/inheritable they are.
  • 18. BENEFITS: EDITS TO GROUPS AFFECT ALL MEMBERS • Avoids need to find all related styles to match changes. • Changes are less likely to be inconsistently applied. • When testing changes the dev sees all group members change as well. • Moving selectors between groups to restyle is fast and easy.
  • 19. BENEFITS: TAKES ADVANTAGE OF INSPECTORS • Inspecting an object shows cascade of groups it participates in. • Group "name" (starting ID, i.e. #SMALL-TEXT) is visible in inspector. • Seeing all group members informs dev of related elements that should be considered. • Live-edits expose the change in related items as well.
  • 20. BENEFITS: DOESN’T REQUIRE CHANGES TO HTML • Uses whatever classes and IDs are already present. • IfHTML needs editing it's only to add more detailed semantic classes to use in your DRY groups. • Useful when generated HTML is out of your control (WordPress core/plugins, 3rd party widgets) • Mainly relevant when comparing DRY with OOCSS.
  • 21. BENEFITS: COMPLETELY STANDARD • Simply an organizing principle for normal CSS. • Adheres to separation of style and content. • Bothbackward and forward compatible, from IE6 hacks to prefixed CSS3 properties. • CSS can be pasted anywhere and just work. • Groupscan be extracted and re-used elsewhere by removing group members and inserting new ones.
  • 22. BENEFITS: INTEGRATES WITH OTHER METHODOLOGIES • Compatible with most other CSS methodologies like grids, OOCSS* or SMACSS** because the way you organize your groups is up to you. • Progressiveenhancement and browser support is your choice. DRY only defines how you organize your selectors and properties. * https://github.com/stubbornella/oocss/wiki ** http://smacss.com/book/
  • 23. PERFORMANCE ISSUES? • TL;DR: Probably not. • "Formost web sites, the possible performance gains from optimizing CSS selectors will be small, and are not worth the costs." ~Steve Sounders* • Having many selectors does not inherently hurt performance. • SeeSteve Sounders research** for optimizations that matter (and can be applied to DRY CSS). * http://www.stevesouders.com/blog/2009/03/10/performance-impact-of-css-selectors/ ** http://www.stevesouders.com/blog/2009/06/18/simplifying-css-selectors/
  • 24. CSS PREPARSERS • Add new languages (LESS/SASS) based on CSS but with additional syntax and a new parsing layer to read it. • Variables to re-use values across definitions. Variables in LESS* • Mixins or inheritance to include a class inside another class. • All kinds of other programmy things (functions, switch conditions) Mixins in LESS* * E.g. http://lesscss.org/ and http://sass-lang.com/
  • 25. CSS PREPARSERS: CONSIDERATIONS • Allow for extensive programming by experts. • External frameworks (blueprint, grids etc.) can be included and updated without modification (don’t hack core). • BUT at the cost of destandardization and dependence on external libraries or software. It isn’t CSS. • Theycan still be misused to create wet, sloppy stylesheets. You still have to plan your design.
  • 26. CSS PREPARSERS: SOLUTIONS • Use for development only, publish natural CSS with themes. • Be careful to create CSS that is still elegant in natural form. • Use “Inheritance” rather than “mixins” to avoid repetition. *SASS examples from http://sass-lang.com/ LESS should have this feature soon.
  • 27. CSS PREPARSERS: TOOLS • WP-Less (WP plugin) Adds .less support to WP, but requires a version of the plugin on all sites: http://wordpress.org/extend/ plugins/wp-less/ • Codekit/Less.app (OSX only) Automatically compiles SASS/LESS into CSS during development http://incident57.com/codekit/
  • 28. DRY CSS REVIEW Group re-usable Name the Add selectors to properties groups logically various groups
  • 30. DRY CSS THEORIES, METHODS AND TOOLS FOR EFFICIENT AND SCALABLE STYLESHEETS Jeremy Clarke • http://jeremyclarke.org Creative Commons Share Alike http://creativecommons.org/licenses/by-sa/3.0/ Download these slides: http://slideshare.net/jeremyclarke

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n