2 ms·
They're talking about the @apply directive. It takes a list of classes and creates a single class with those properties. Since Tailwind classes generally map al
by neurotrace 5y ago
They're talking about the @apply directive. It takes a list of classes and creates a single class with those properties. Since Tailwind classes generally map almost 1-to-1 for CSS rules, it'd be easier in my opinion to just write the CSS directly.
- kaishiro 5y agoI'm fully aware of what they're talking about. It's common usage in Tailwind to extract large collections of the utility classes back into reusable component classes which can be applied with a single @apply directive [1]. This being the case, this would not be a 1-to-1 mapping at all. [1] https://tailwindcss.com/docs/extracting-components https://tailwindcss.com/docs/extracting-components