Skip to content

Instantly share code, notes, and snippets.

@LukeberryPi
Created October 30, 2023 17:02
Show Gist options
  • Save LukeberryPi/c9809f34a0796457107b9b86a6c14c78 to your computer and use it in GitHub Desktop.
Save LukeberryPi/c9809f34a0796457107b9b86a6c14c78 to your computer and use it in GitHub Desktop.
tailwind octopost
tailwind octopus
what tailwind is
a map of css properties
classes that have objective names and purposes
what tailwind isn’t
bootstrap
is a component library
one class in bootstrap is equivalent to hundreds of opinionated css properties
terrible to customize, bootstrap sites end up looking the same
inline styles
syntactic terror
magic numbers
not holistic by definition (cannot write media queries or selectors)
it WILL result in using two styling approaches (inline + something else)
will run into specificity terrors
tailwind axioms
anything you can do in vanilla css you can do in tailwind
what tailwind is good at
helping you create and enforce a design system
maintainability (colocation)
reusability (copy pasteable code)
what tailwind is bad at
being used without componentization (outside React, Vue, Angular)
dynamic css classes (can’t update because of zero runtime)
making html readable
generating readable outputs
you NEED to
use prettier-tailwind-plugin for automatic class sorting
to avoid issues with html class order !== css class order ()
use intellisense for class hovers (shows applied css classes)
study tailwind merge + cya
references
michel teló - https://youtu.be/EbFA4RQrc0w?si=TM2sI3KddQXdxdx7
cu e código - https://dev.to/lixeletto/os-limites-do-tailwind-css-55od
criador do tailwind - https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
@LukeberryPi
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment