Skip to Main Content
Modern CSS with Tailwind, 2nd Edition
book

Modern CSS with Tailwind, 2nd Edition

by Noel Rappin
May 2022
Intermediate to advanced content levelIntermediate to advanced
104 pages
2h 24m
English
Pragmatic Bookshelf
Content preview from Modern CSS with Tailwind, 2nd Edition

Duplication

A common concern when looking at Tailwind and the long sets of class lists you often need to accomplish your design goals is how to manage duplication. That is, if you need to type class="text-6xl font-bold text-blue-700" for every h1, as we did in Introduction, isn’t that a lot of typing that needs to be consistent every time you need an h1? What if your h1 design changes?

Managing Duplication in Code

Tailwind does have a way to manage CSS class list duplication, but you’re also encouraged to see the duplication issue as part of your larger code setup, not only as a CSS issue. No matter what tool you’re using to build your HTML markup, it likely has component or function mechanisms you’re already using to reduce code duplication. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Tailwind CSS

Tailwind CSS

Ivaylo Gerchev
CSS in Depth

CSS in Depth

Keith Grant
Tiny CSS Projects

Tiny CSS Projects

Michael Gearon, Martine Dowden

Publisher Resources

ISBN: 9781680509892Errata Page