Closed 9585999 closed 6 years ago
There's no way you'll ever be able to access Tailwind's classes during the Less stage of compilation in any sane way because like you mentioned Tailwind is meant to run during the PostCSS step.
For your specific situation I would recommend using Tailwind's @apply
feature:
https://tailwindcss.com/docs/functions-and-directives#apply
...instead of using &:extend
in Less, because extend is sort of an anti-pattern and mixins are better for performance anyways.
@adamwathan thanks for your reply.
npm list --depth=0
node -v
v10.8.0
npm -v
6.4.0
Hi, I want to use Less with TailwindCss, and I'd like to work with @import (less, reference)
'~ tailwindcss / utilities.css'
with&:extend(.tailwind-utilites)
, but apparently at the time of compilation Less, css selectors do not exist yet, and on the output I get an emptypublic/css/app.css
...at the moment I first compile css, then Less, but this approach is clearly not what I need, since it has many shortcomings ...
Perhaps someone has a more elegant solution to this problem?