The perils of functional CSS(browserlondon.com)

4 months ago from Browser London

  • Dan OC, 4 months ago

    I am a huge fan of functional CSS. The part I really disliked was having to use a ton of classes for reusable elements.

    <!-- Repeating these classes for every button can be painful --> Button

    But then I saw the extracting-components page from Tailwind and I was sold.

    .btn-blue { @apply bg-blue-500 text-white font-bold py-2 px-4 rounded; }

    2 points