Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global base styles #183

Open
llPekoll opened this issue Sep 2, 2023 · 1 comment
Open

Global base styles #183

llPekoll opened this issue Sep 2, 2023 · 1 comment

Comments

@llPekoll
Copy link

llPekoll commented Sep 2, 2023

How can I add base styles globally?
here step 3 there is the input.css
And in this file you can add query selector like

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

and this will set the class in all the project,
do there is a way to set a class globally in django-tailwind

Best.

@demsking
Copy link

demsking commented Sep 20, 2023

Put your code on theme/static_src/src/style.css:

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants