Grid or column view - column-span

Yes I know, the problem was with this dynamic col-span-{gridFlex} thing, Tailwind in buildtime doesn’t know what values will I use, so he is trying to purge out unused variables, unused css classes to make the deployed css smaller.

I will leave this here, if someone later has the same issue:

If you are trying to use dynamic css, like : col-span-{n} where n is dynamic, tailwind would know not what can be there, so you have options:

  • put those n, inside a variable
  • add all of these .col-span-x {grid-column: span x/span x;} config inside your main.css so tailwind can not purge this out

Hope it was helpful!