SlideShare una empresa de Scribd logo
1 de 34
JavierEspaña
                                               CSS GOOD PRACTICES
                                               FOR TEAMWORK AND BIG SCALE PROJECTS
                                               We've all been through the bad experience of taking a project and find
                                               absolute chaos on the stylesheet and/or discover that each member of
                                               the team has done things their way. Let's not even talk about retaking a
                                               project after a long time and not being able to find what we did or how
                                               we did it.
                                               This talk tries to give solutions to these issues for a better
                                               development and the organization of our projects, specially in the use
                                               of CSS.




        Introduction                                    Practices                                                  Questions
A brief intro to the talk and my 10 years of   We will lay out the issues of big scale                    I’ll hear your questions and we’ll try to find
experience in design and web development.      development and it’s solutions.                            solutions to them.




                                                                                                                                                     Contact
©JavierEspaña                                                                            Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana
INTERESTED IN THIS TALK?
                  If you want me to give this conference at your event,
                    company or even via online meeting contact me:
                               info@javierespana.com




                             Please don’t steal this material




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   1
DESIGN AND WEB DEVELOPMENT
BRIEF INTRODUCTION




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   2
DESIGN AND WEB DEVELOPMENT
SOME WORDS ABOUT ME




                                                                           javierespana.com




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   3
DESIGN AND WEB DEVELOPMENT
SOME OF MY WORKS




            MTV EMA 2011                                     Steve Argyle                               Kid’s Choice Awards 2011
          http://ema.mtv.co.uk/                     http://www.steveargyle.com/                          http://kca.mundonick.com/




JavierEspaña                      Contact
                                  Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana                                4
DESIGN AND WEB DEVELOPMENT
SOME OF MY WORKS




            Cuenca D’Amico                                   MTV at the Movies                                    Sunmesa Events
     http://www.cuencadamico.com.ar/                        http://movies.mtv.co.uk/                         http://www.sunmesaevents.com/




JavierEspaña                           Contact
                                       Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana                                   5
DESIGN AND WEB DEVELOPMENT
ABOUT THIS TALK




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   6
DESIGN AND WEB DEVELOPMENT
GOOD PRACTICES




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   7
DESIGN AND WEB DEVELOPMENT
BE ORGANIZED
  Create and mantain a correct folder structure for your projects




                                                                 vs




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   8
DESIGN AND WEB DEVELOPMENT
BE ORGANIZED
  Separate and index CSS using comments




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   9
DESIGN AND WEB DEVELOPMENT
USE COMMENTS
  Take advantage of them to leave notes for future developers




                                                                 +




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   10
DESIGN AND WEB DEVELOPMENT
USE RESET STYLESHEETS
  They are essential for any good cross-browser development




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   11
DESIGN AND WEB DEVELOPMENT
PAY ATTENTION TO NAMES
  Give classes semantic sense




                                                                   vs




JavierEspaña                    Contact
                                Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   12
DESIGN AND WEB DEVELOPMENT
PAY ATTENTION TO NAMES
  Make reading the CSS easier using lowercase selectors and properties




                                                                vs




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   13
DESIGN AND WEB DEVELOPMENT
PAY ATTENTION TO NAMES
  Group up selectors to make the reading and updates easier




                                                                vs




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   14
DESIGN AND WEB DEVELOPMENT
MIND YOUR WRITING
  Take a team desition and make it count




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   15
DESIGN AND WEB DEVELOPMENT
MIND YOUR WRITING
  Choose and easy way for everyone to follow




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   16
DESIGN AND WEB DEVELOPMENT
MIND YOUR WRITING
  Short notation help you keep the code clean




                                                                vs




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   17
DESIGN AND WEB DEVELOPMENT
MIND YOUR WRITING
  Again, group up selectors with the same behavior




                                                                vs




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   18
DESIGN AND WEB DEVELOPMENT
MIND YOUR WRITING
  Avoid using long selectors without a need




                                                                 vs




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   19
DESIGN AND WEB DEVELOPMENT
A QUICK NOTE
                             ABOUT SPECIFICITY



JavierEspaña                   Contact
                               Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   20
DESIGN AND WEB DEVELOPMENT
WHAT IS SPECIFICITY?
  It’s the way CSS determines which rule takes precedence for an object




            0                           1                                                2                     3
            Inline                      IDs                                           Classes               Elements
                                                                            Pseudo-classes & Attributes   Pseudo-Elements




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana                           21
DESIGN AND WEB DEVELOPMENT
WHAT IS SPECIFICITY?
  It’s the way CSS determines which rule takes precedence for an object




       0                       0                                                0                         0
                  0                            0                                                    1               0
            Inline                      IDs                                           Classes               Elements
                                                                            Pseudo-classes & Attributes   Pseudo-Elements




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana                           22
DESIGN AND WEB DEVELOPMENT
WHAT IS SPECIFICITY?
  It’s the way CSS determines which rule takes precedence for an object




       0                       1                                                1                         1
                  1                            0                                                    0               0
            Inline                      IDs                                           Classes               Elements
                                                                            Pseudo-classes & Attributes   Pseudo-Elements




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana                           23
DESIGN AND WEB DEVELOPMENT
BACK TO
                             GOOD PRACTICES



JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   24
DESIGN AND WEB DEVELOPMENT
DIFFERENT BROWSERS
  You can approach the issue with different stylesheets or CSS hacks




               Javascript                             Condicionales IE                              CSS Hacks




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana               25
DESIGN AND WEB DEVELOPMENT
TAKE ADVANTAGE
                  OF THE NEW PRACTICES



JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   26
DESIGN AND WEB DEVELOPMENT
CONDITIONAL IE COMMENTS
  Declare your documents using different classes for each browser




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   27
DESIGN AND WEB DEVELOPMENT
ORGANIZE YOUR CSS3
  Keep your new CSS3 declarations ordered correctly to avoid future issues




                                                                  +




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   28
DESIGN AND WEB DEVELOPMENT
GENERAL RULES




JavierEspaña                  Contact
                              Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   29
DESIGN AND WEB DEVELOPMENT
IMPORTANT DETAILS
  Things we should not forget in our developments




                Validate                                     Minify                                Techniques / Scripts




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana                          30
DESIGN AND WEB DEVELOPMENT
THANK YOU!




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   31
DESIGN AND WEB DEVELOPMENT
KEEP IN TOUCH
                                  Web: javierespana.com
                                       Blog: moonward.net
                                   Twitter: @javierespana




                             QUESTIONS?

JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   32
DESIGN AND WEB DEVELOPMENT
THANKS FOR YOUR TIME!




JavierEspaña                 Contact
                             Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana   33
DESIGN AND WEB DEVELOPMENT

Más contenido relacionado

Destacado

Communicating research. Lessons from advertising and journalism
Communicating research. Lessons from advertising and journalism Communicating research. Lessons from advertising and journalism
Communicating research. Lessons from advertising and journalism Iriss
 
A taxonomy of search strategies and their design implications
A taxonomy of search strategies and their design implicationsA taxonomy of search strategies and their design implications
A taxonomy of search strategies and their design implicationsTony Russell-Rose
 
ベトナム家庭訪問レポート(ホーチミン富裕層宅)
ベトナム家庭訪問レポート(ホーチミン富裕層宅)ベトナム家庭訪問レポート(ホーチミン富裕層宅)
ベトナム家庭訪問レポート(ホーチミン富裕層宅)Q&Me Vietnam Market Research
 
Historia de la pintura dominicana
Historia de la pintura dominicanaHistoria de la pintura dominicana
Historia de la pintura dominicanaDeisy Rodriguez
 
La historia de la pintura
La  historia de la pinturaLa  historia de la pintura
La historia de la pinturasliderosa
 
Germany- Complete culture of Germany in one presentation
Germany- Complete culture of Germany in one presentationGermany- Complete culture of Germany in one presentation
Germany- Complete culture of Germany in one presentationDushyant Singh Chouhan
 
Egnergy Presentation
Egnergy PresentationEgnergy Presentation
Egnergy PresentationShane Egner
 

Destacado (10)

ベトナムのバイクについて
ベトナムのバイクについてベトナムのバイクについて
ベトナムのバイクについて
 
facts of Germany
facts of Germanyfacts of Germany
facts of Germany
 
Communicating research. Lessons from advertising and journalism
Communicating research. Lessons from advertising and journalism Communicating research. Lessons from advertising and journalism
Communicating research. Lessons from advertising and journalism
 
A taxonomy of search strategies and their design implications
A taxonomy of search strategies and their design implicationsA taxonomy of search strategies and their design implications
A taxonomy of search strategies and their design implications
 
ベトナム家庭訪問レポート(ホーチミン富裕層宅)
ベトナム家庭訪問レポート(ホーチミン富裕層宅)ベトナム家庭訪問レポート(ホーチミン富裕層宅)
ベトナム家庭訪問レポート(ホーチミン富裕層宅)
 
Historia de la pintura dominicana
Historia de la pintura dominicanaHistoria de la pintura dominicana
Historia de la pintura dominicana
 
Vértebras
VértebrasVértebras
Vértebras
 
La historia de la pintura
La  historia de la pinturaLa  historia de la pintura
La historia de la pintura
 
Germany- Complete culture of Germany in one presentation
Germany- Complete culture of Germany in one presentationGermany- Complete culture of Germany in one presentation
Germany- Complete culture of Germany in one presentation
 
Egnergy Presentation
Egnergy PresentationEgnergy Presentation
Egnergy Presentation
 

Similar a CSS Good Practices

Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015Christian Heilmann
 
Programming for Non-Programmers - SXSW Vegas 2014
Programming for Non-Programmers - SXSW Vegas 2014Programming for Non-Programmers - SXSW Vegas 2014
Programming for Non-Programmers - SXSW Vegas 2014Chris Castiglione
 
The State of the Web - Helsinki meetup
The State of the Web - Helsinki meetupThe State of the Web - Helsinki meetup
The State of the Web - Helsinki meetupChristian Heilmann
 
Personal Branding
Personal BrandingPersonal Branding
Personal BrandingDigiArabs
 
Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015Christian Heilmann
 
Rapid Fullstack Development
Rapid Fullstack DevelopmentRapid Fullstack Development
Rapid Fullstack DevelopmentAshley Davis
 
2Creating Connecting Cultivating Learning Communities
2Creating Connecting Cultivating Learning Communities2Creating Connecting Cultivating Learning Communities
2Creating Connecting Cultivating Learning CommunitiesBarbara Lindsey
 
Programming for Non-programmers PFNP @ Razorfish
Programming for Non-programmers PFNP @ Razorfish Programming for Non-programmers PFNP @ Razorfish
Programming for Non-programmers PFNP @ Razorfish Chris Castiglione
 
Vine presentation
Vine presentationVine presentation
Vine presentationcpmaran
 
Surviving (and Thriving in) the Online Identity Wars
Surviving (and Thriving in) the Online Identity WarsSurviving (and Thriving in) the Online Identity Wars
Surviving (and Thriving in) the Online Identity WarsJohn McCrea
 
Sixtrackstoyourvirtualassistantsuccess
SixtrackstoyourvirtualassistantsuccessSixtrackstoyourvirtualassistantsuccess
Sixtrackstoyourvirtualassistantsuccesss m
 
Six tracks to your virtual assistant success in 2017!
Six tracks to your virtual assistant success in 2017!Six tracks to your virtual assistant success in 2017!
Six tracks to your virtual assistant success in 2017!Eleaza Rose Devilleres
 
TourVine-phpapp01
TourVine-phpapp01TourVine-phpapp01
TourVine-phpapp01Alexa4224
 
Are We There Yet? Create, Manage & Measure Your Web Campaign Success
Are We There Yet?  Create, Manage & Measure Your Web Campaign SuccessAre We There Yet?  Create, Manage & Measure Your Web Campaign Success
Are We There Yet? Create, Manage & Measure Your Web Campaign SuccessJoel Dixon
 
Designer vs Developer: BE THE UNICORN
Designer vs Developer: BE THE UNICORNDesigner vs Developer: BE THE UNICORN
Designer vs Developer: BE THE UNICORNSara Cannon
 
How to Launch an Online Business Doing What You Love
How to Launch an Online Business Doing What You LoveHow to Launch an Online Business Doing What You Love
How to Launch an Online Business Doing What You Love5Four Digital
 
Bridging the Gap: From WordPress beginner to WordPress Wizard
Bridging the Gap: From WordPress beginner to WordPress WizardBridging the Gap: From WordPress beginner to WordPress Wizard
Bridging the Gap: From WordPress beginner to WordPress WizardMatthew Vaccaro
 
Blending Social Media in WordPress
Blending Social Media in WordPressBlending Social Media in WordPress
Blending Social Media in WordPressYahya Ayob
 

Similar a CSS Good Practices (20)

Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015Mind the Gap - State of the Browser 2015
Mind the Gap - State of the Browser 2015
 
Programming for Non-Programmers - SXSW Vegas 2014
Programming for Non-Programmers - SXSW Vegas 2014Programming for Non-Programmers - SXSW Vegas 2014
Programming for Non-Programmers - SXSW Vegas 2014
 
The State of the Web - Helsinki meetup
The State of the Web - Helsinki meetupThe State of the Web - Helsinki meetup
The State of the Web - Helsinki meetup
 
Personal Branding
Personal BrandingPersonal Branding
Personal Branding
 
Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015Erase and Rewind - Open Web Camp 2015
Erase and Rewind - Open Web Camp 2015
 
Rapid Fullstack Development
Rapid Fullstack DevelopmentRapid Fullstack Development
Rapid Fullstack Development
 
2Creating Connecting Cultivating Learning Communities
2Creating Connecting Cultivating Learning Communities2Creating Connecting Cultivating Learning Communities
2Creating Connecting Cultivating Learning Communities
 
Programming for Non-programmers PFNP @ Razorfish
Programming for Non-programmers PFNP @ Razorfish Programming for Non-programmers PFNP @ Razorfish
Programming for Non-programmers PFNP @ Razorfish
 
Vine presentation
Vine presentationVine presentation
Vine presentation
 
Surviving (and Thriving in) the Online Identity Wars
Surviving (and Thriving in) the Online Identity WarsSurviving (and Thriving in) the Online Identity Wars
Surviving (and Thriving in) the Online Identity Wars
 
CANVA TUTORIAL FOR BEGINNERS
CANVA TUTORIAL FOR BEGINNERSCANVA TUTORIAL FOR BEGINNERS
CANVA TUTORIAL FOR BEGINNERS
 
Sixtrackstoyourvirtualassistantsuccess
SixtrackstoyourvirtualassistantsuccessSixtrackstoyourvirtualassistantsuccess
Sixtrackstoyourvirtualassistantsuccess
 
Six tracks to your virtual assistant success in 2017!
Six tracks to your virtual assistant success in 2017!Six tracks to your virtual assistant success in 2017!
Six tracks to your virtual assistant success in 2017!
 
TourVine-phpapp01
TourVine-phpapp01TourVine-phpapp01
TourVine-phpapp01
 
Are We There Yet? Create, Manage & Measure Your Web Campaign Success
Are We There Yet?  Create, Manage & Measure Your Web Campaign SuccessAre We There Yet?  Create, Manage & Measure Your Web Campaign Success
Are We There Yet? Create, Manage & Measure Your Web Campaign Success
 
Designer vs Developer: BE THE UNICORN
Designer vs Developer: BE THE UNICORNDesigner vs Developer: BE THE UNICORN
Designer vs Developer: BE THE UNICORN
 
How to Launch an Online Business Doing What You Love
How to Launch an Online Business Doing What You LoveHow to Launch an Online Business Doing What You Love
How to Launch an Online Business Doing What You Love
 
Bridging the Gap: From WordPress beginner to WordPress Wizard
Bridging the Gap: From WordPress beginner to WordPress WizardBridging the Gap: From WordPress beginner to WordPress Wizard
Bridging the Gap: From WordPress beginner to WordPress Wizard
 
Winning building 201_all_day
Winning building 201_all_dayWinning building 201_all_day
Winning building 201_all_day
 
Blending Social Media in WordPress
Blending Social Media in WordPressBlending Social Media in WordPress
Blending Social Media in WordPress
 

Último

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
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
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Último (20)

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
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
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

CSS Good Practices

  • 1. JavierEspaña CSS GOOD PRACTICES FOR TEAMWORK AND BIG SCALE PROJECTS We've all been through the bad experience of taking a project and find absolute chaos on the stylesheet and/or discover that each member of the team has done things their way. Let's not even talk about retaking a project after a long time and not being able to find what we did or how we did it. This talk tries to give solutions to these issues for a better development and the organization of our projects, specially in the use of CSS. Introduction Practices Questions A brief intro to the talk and my 10 years of We will lay out the issues of big scale I’ll hear your questions and we’ll try to find experience in design and web development. development and it’s solutions. solutions to them. Contact ©JavierEspaña Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana
  • 2. INTERESTED IN THIS TALK? If you want me to give this conference at your event, company or even via online meeting contact me: info@javierespana.com Please don’t steal this material JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 1 DESIGN AND WEB DEVELOPMENT
  • 3. BRIEF INTRODUCTION JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 2 DESIGN AND WEB DEVELOPMENT
  • 4. SOME WORDS ABOUT ME javierespana.com JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 3 DESIGN AND WEB DEVELOPMENT
  • 5. SOME OF MY WORKS MTV EMA 2011 Steve Argyle Kid’s Choice Awards 2011 http://ema.mtv.co.uk/ http://www.steveargyle.com/ http://kca.mundonick.com/ JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 4 DESIGN AND WEB DEVELOPMENT
  • 6. SOME OF MY WORKS Cuenca D’Amico MTV at the Movies Sunmesa Events http://www.cuencadamico.com.ar/ http://movies.mtv.co.uk/ http://www.sunmesaevents.com/ JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 5 DESIGN AND WEB DEVELOPMENT
  • 7. ABOUT THIS TALK JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 6 DESIGN AND WEB DEVELOPMENT
  • 8. GOOD PRACTICES JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 7 DESIGN AND WEB DEVELOPMENT
  • 9. BE ORGANIZED Create and mantain a correct folder structure for your projects vs JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 8 DESIGN AND WEB DEVELOPMENT
  • 10. BE ORGANIZED Separate and index CSS using comments JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 9 DESIGN AND WEB DEVELOPMENT
  • 11. USE COMMENTS Take advantage of them to leave notes for future developers + JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 10 DESIGN AND WEB DEVELOPMENT
  • 12. USE RESET STYLESHEETS They are essential for any good cross-browser development JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 11 DESIGN AND WEB DEVELOPMENT
  • 13. PAY ATTENTION TO NAMES Give classes semantic sense vs JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 12 DESIGN AND WEB DEVELOPMENT
  • 14. PAY ATTENTION TO NAMES Make reading the CSS easier using lowercase selectors and properties vs JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 13 DESIGN AND WEB DEVELOPMENT
  • 15. PAY ATTENTION TO NAMES Group up selectors to make the reading and updates easier vs JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 14 DESIGN AND WEB DEVELOPMENT
  • 16. MIND YOUR WRITING Take a team desition and make it count JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 15 DESIGN AND WEB DEVELOPMENT
  • 17. MIND YOUR WRITING Choose and easy way for everyone to follow JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 16 DESIGN AND WEB DEVELOPMENT
  • 18. MIND YOUR WRITING Short notation help you keep the code clean vs JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 17 DESIGN AND WEB DEVELOPMENT
  • 19. MIND YOUR WRITING Again, group up selectors with the same behavior vs JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 18 DESIGN AND WEB DEVELOPMENT
  • 20. MIND YOUR WRITING Avoid using long selectors without a need vs JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 19 DESIGN AND WEB DEVELOPMENT
  • 21. A QUICK NOTE ABOUT SPECIFICITY JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 20 DESIGN AND WEB DEVELOPMENT
  • 22. WHAT IS SPECIFICITY? It’s the way CSS determines which rule takes precedence for an object 0 1 2 3 Inline IDs Classes Elements Pseudo-classes & Attributes Pseudo-Elements JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 21 DESIGN AND WEB DEVELOPMENT
  • 23. WHAT IS SPECIFICITY? It’s the way CSS determines which rule takes precedence for an object 0 0 0 0 0 0 1 0 Inline IDs Classes Elements Pseudo-classes & Attributes Pseudo-Elements JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 22 DESIGN AND WEB DEVELOPMENT
  • 24. WHAT IS SPECIFICITY? It’s the way CSS determines which rule takes precedence for an object 0 1 1 1 1 0 0 0 Inline IDs Classes Elements Pseudo-classes & Attributes Pseudo-Elements JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 23 DESIGN AND WEB DEVELOPMENT
  • 25. BACK TO GOOD PRACTICES JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 24 DESIGN AND WEB DEVELOPMENT
  • 26. DIFFERENT BROWSERS You can approach the issue with different stylesheets or CSS hacks Javascript Condicionales IE CSS Hacks JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 25 DESIGN AND WEB DEVELOPMENT
  • 27. TAKE ADVANTAGE OF THE NEW PRACTICES JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 26 DESIGN AND WEB DEVELOPMENT
  • 28. CONDITIONAL IE COMMENTS Declare your documents using different classes for each browser JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 27 DESIGN AND WEB DEVELOPMENT
  • 29. ORGANIZE YOUR CSS3 Keep your new CSS3 declarations ordered correctly to avoid future issues + JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 28 DESIGN AND WEB DEVELOPMENT
  • 30. GENERAL RULES JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 29 DESIGN AND WEB DEVELOPMENT
  • 31. IMPORTANT DETAILS Things we should not forget in our developments Validate Minify Techniques / Scripts JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 30 DESIGN AND WEB DEVELOPMENT
  • 32. THANK YOU! JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 31 DESIGN AND WEB DEVELOPMENT
  • 33. KEEP IN TOUCH Web: javierespana.com Blog: moonward.net Twitter: @javierespana QUESTIONS? JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 32 DESIGN AND WEB DEVELOPMENT
  • 34. THANKS FOR YOUR TIME! JavierEspaña Contact Web: javierespana.com / Blog: moonward.net / Twitter: @javierespana 33 DESIGN AND WEB DEVELOPMENT