Skip to content

Code Style - TailwindCSS

  • Use as much default Tailwind classes as possible
  • If possible use @apply in globals.css
  • Margins / paddings should be in rem
  • Try to avoid arbitrary values e.g. (pt-[395px]) when something occurs more than once. Extend the tailwind.config for this.
  • Use size-{x} instead of w-{x} h-{x}