CSS: Can You? !== Should You? Alice Brosey @ambroseya alice@alicebrosey.com
Jam on a biscuit. Photo credit to HTTPS://WWW.THECOUNTRYCOOK.NET/CREAM-BISCUITS-ONLY-2-INGREDIENTS/
CSS or JavaScript?
“For every project, there is a fine line between the role of CSS and the role of JavaScript, a balancing act.
Types of Developers ○ I want to do everything with JS because that’s “real development”. ○ I don’t know enough CSS so I will use mostly JS even if it’s hacked plugins ○ I want to do everything with CSS because that’s “cleaner”.
FIND THE BALANCE Figure out what is BEST, not what is EASIEST.
CSS ○ Harder different to debug ○ Not quite as dynamic ○ Easy to go too far overboard ○ One mistake can cascade through many places in the app Negative Support JavaScript ○ May get overly complex with dependencies ○ One bug can break the whole app ○ May lead to too little separation of concerns
CSS ○ Fewer dependencies ○ Better Performance?? ○ Separate the clothes from the body? ○ Don’t manipulate the DOM JavaScript ○ Easier to debug ○ Easier to test ○ Better Performance?? Positive Support
REDUCE YOUR TECHNICAL DEBT
This.
○ Calculations – calc() ○ Flexbox ○ CSS Grid Layout ○ Viewport Units (vh, vw, vmin, vmax) ○ Media Queries ○ Selectors and Pseudoselectors ○ Animation ○ Filter CSS Everyone Needs
THANKS! Any questions? You can find me at: @ambroseya alice@alicebrosey.com
Codestock2018 - CSS vs JS

Codestock2018 - CSS vs JS

  • 2.
    CSS: Can You? !==Should You? Alice Brosey @ambroseya alice@alicebrosey.com
  • 3.
    Jam on abiscuit. Photo credit to HTTPS://WWW.THECOUNTRYCOOK.NET/CREAM-BISCUITS-ONLY-2-INGREDIENTS/
  • 4.
  • 5.
    “For every project,there is a fine line between the role of CSS and the role of JavaScript, a balancing act.
  • 6.
    Types of Developers ○I want to do everything with JS because that’s “real development”. ○ I don’t know enough CSS so I will use mostly JS even if it’s hacked plugins ○ I want to do everything with CSS because that’s “cleaner”.
  • 9.
    FIND THE BALANCE Figureout what is BEST, not what is EASIEST.
  • 10.
    CSS ○ Harder differentto debug ○ Not quite as dynamic ○ Easy to go too far overboard ○ One mistake can cascade through many places in the app Negative Support JavaScript ○ May get overly complex with dependencies ○ One bug can break the whole app ○ May lead to too little separation of concerns
  • 11.
    CSS ○ Fewer dependencies ○Better Performance?? ○ Separate the clothes from the body? ○ Don’t manipulate the DOM JavaScript ○ Easier to debug ○ Easier to test ○ Better Performance?? Positive Support
  • 18.
  • 19.
  • 20.
    ○ Calculations –calc() ○ Flexbox ○ CSS Grid Layout ○ Viewport Units (vh, vw, vmin, vmax) ○ Media Queries ○ Selectors and Pseudoselectors ○ Animation ○ Filter CSS Everyone Needs
  • 21.
    THANKS! Any questions? You canfind me at: @ambroseya alice@alicebrosey.com

Editor's Notes