timonweb / django-tailwind

Django + Tailwind CSS = 💚
https://django-tailwind.readthedocs.io
MIT License
1.45k stars 89 forks source link

Using `@apply` #128

Closed jeffpohlmeyer closed 2 years ago

jeffpohlmeyer commented 2 years ago

Quick question. If I want to set a primary color that is a combination of other colors, using a gradient, I would typically go to the main css file where I'm declaring

@tailwind base;
@tailwind components;
@tailwind utilities;

and add some sort of @apply directive

.btn-primary {
  @apply 'bg-gradient-to-r from-teal-500 to-cyan-600'
}

as an example. I'm not seeing in my local project where I would declare this and I'm wondering if I'm missing something.

jeffpohlmeyer commented 2 years ago

I'm a dumbass and didn't look at https://github.com/timonweb/django-tailwind/issues/16