Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tailwind CSS - Transitioning Away from Styled C...

Tailwind CSS - Transitioning Away from Styled Components

Presentation of Tailwind CSS for front-end developers. Quick focus regarding the transition from Styled Components to Tailwind CSS.

Overview

- Introduction
- Benefits and disadvantages of Tailwind CSS
- From Styled Components to Tailwind CSS
- Tailwind CSS every day
- CSS Frameworks based on Tailwind CSS
- The power of the GPTs
- The future of Tailwind CSS

David Dias

March 17, 2024
Tweet

More Decks by David Dias

Other Decks in Technology

Transcript

  1. Tailwind CSS Transitioning Away from Styled Components March 2024 By

    David Dias Photo by Hal Gatewood on Unsplash
  2. - Scope: no leak or clash with other styles -

    Component-based, code collocation - Dynamic styles based on props, states etc - Nice DX with automatic vendor pre fi xes, listing and support of theming. Solutions provided by CSS-in-JS
  3. - CSS included in the JavaScript bundle (performance bottleneck) -

    Doesn’t enforce re-usability and consistency (easy to create one off component) - Not the fastest way to prototype and developing - Less frequent releases, community is shrinking Problems faced using CSS-in-JS
  4. Overview • Introduction • Bene fi ts and disadvantages of

    Tailwind CSS • From Styled Components to Tailwind CSS • Tailwind CSS every day • CSS Frameworks based on Tailwind CSS • The power of the GPTs • The future of Tailwind CSS
  5. - Utility- fi rst CSS framework - Let you directly

    customize your HTML/components - Fully customizable - Focus on consistency, maintainability… What is Tailwind CSS?
  6. - Utility- fi rst CSS framework - Let you directly

    customize your HTML/components - Fully customizable - Focus on consistency, maintainability… What is Tailwind CSS?
  7. - Utility- fi rst CSS framework - Let you directly

    customize your HTML/components - Fully customizable - Focus on consistency, maintainability… What is Tailwind CSS?
  8. - Utility- fi rst CSS framework - Let you directly

    customize your HTML/components - Fully customizable - Focus on consistency, maintainability… What is Tailwind CSS?
  9. - It’s not a UI Kit: no prede fi ned

    components - Not a opinionated library What is NOT Tailwind CSS?
  10. - It’s not a UI Kit: no prede fi ned

    components - Not a opinionated library What is NOT Tailwind CSS?
  11. - Utility- fi rst vs component based - More in

    depth customization vs pre-build components - Small learning curve vs Bootstrap’s component-base design - CSS directly on the markup vs ready-made UI components Tailwind CSS vs Twitter Bootstrap
  12. - Utility- fi rst vs component based - More in

    depth customization vs pre-build components - Small learning curve vs Bootstrap’s component-base design - CSS directly on the markup vs ready-made UI components Tailwind CSS vs Twitter Bootstrap
  13. - Utility- fi rst vs component based - More in

    depth customization vs pre-build components - Small learning curve vs Bootstrap’s component-base design - CSS directly on the markup vs ready-made UI components Tailwind CSS vs Twitter Bootstrap
  14. - Utility- fi rst vs component based - More in

    depth customization vs pre-build components - Small learning curve vs Bootstrap’s component-base design - CSS directly on the markup vs ready-made UI components Tailwind CSS vs Twitter Bootstrap
  15. - Mobile fi rst - Fast to style / use

    - No need to fi nd the “best” class name - Not opinionated ( fl exible and customizable con fi g) - No side effects (due to common classes) - Strip and optimized unused CSS (CSS nano) Advantages of Tailwind CSS?
  16. - Mobile fi rst - Fast to style / use

    - No need to fi nd the “best” class name - Not opinionated ( fl exible and customizable con fi g) - No side effects (due to common classes) - Strip and optimized unused CSS (CSS nano) Advantages of Tailwind CSS?
  17. - Mobile fi rst - Fast to style / use

    - No need to fi nd the “best” class name - Not opinionated ( fl exible and customizable con fi g) - No side effects (due to common classes) - Strip and optimized unused CSS (CSS nano) Advantages of Tailwind CSS?
  18. - Mobile fi rst - Fast to style / use

    - No need to fi nd the “best” class name - Not opinionated ( fl exible and customizable con fi g) - No side effects (due to common classes) - Strip and optimized unused CSS (CSS nano) Advantages of Tailwind CSS?
  19. - Mobile fi rst - Fast to style / use

    - No need to fi nd the “best” class name - Not opinionated ( fl exible and customizable con fi g) - No side effects (due to common classes) - Strip and optimized unused CSS (CSS nano) Advantages of Tailwind CSS?
  20. - Mobile fi rst - Fast to style / use

    - No need to fi nd the “best” class name - Not opinionated ( fl exible and customizable con fi g) - No side effects (due to common classes) - Strip and optimized unused CSS (CSS nano) Advantages of Tailwind CSS?
  21. - Styling and HTML are mixed - Small learning curve

    (practice, practice, practice) - No pre-build components (Possible) Disadvantages of Tailwind CSS
  22. - Styling and HTML are mixed - Small learning curve

    (practice, practice, practice) - No pre-build components (Possible) Disadvantages of Tailwind CSS
  23. - Styling and HTML are mixed - Small learning curve

    (practice, practice, practice) - No pre-build components (Possible) Disadvantages of Tailwind CSS
  24. - Install Tailwind CSS - Update the con fi guration

    fi le - Start adding classes to the code
  25. - Tailwind v4 features a new engine: 10x faster, 35%

    smaller and Rust for critical parts - Zero-con fi guration content detection: automatically detects content fi les. - Tailwind becomes an all-in-one tool: integrates features like @import, vendor pre fi xing… - Addition of modern web features like native cascade layers, custom properties, and container queries.