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

Change Tailwind defaults way #731

Open
aralroca opened this issue Jan 27, 2025 · 6 comments
Open

Change Tailwind defaults way #731

aralroca opened this issue Jan 27, 2025 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@aralroca
Copy link
Collaborator

Talked here by @ansarizafar, I've been thinking about it and one thing we can implement is that during the integration it creates a default .css file by default instead of using default values in build-time.

@aralroca aralroca added enhancement New feature or request good first issue Good for newcomers labels Jan 27, 2025
@aralroca
Copy link
Collaborator Author

CC: @rohits-web03

@rohits-web03
Copy link
Contributor

Talked here by @ansarizafar, I've been thinking about it and one thing we can implement is that during the integration it creates a default .css file by default instead of using default values in build-time.

Alright! I'll look into it

@aralroca
Copy link
Collaborator Author

@rohits-web03 currently these defaults are here

@import "tailwindcss/theme" layer(theme);
@import "tailwindcss/preflight" layer(base);
@import "tailwindcss/utilities" layer(utilities);

But then are used in build-time... Instead during the integration. Maybe we can directly replace it and use it only in this integration file: https://github.com/brisa-build/brisa/blob/e28fa95ef844350a6fa58dc4d119e35598c753e3/packages/brisa/src/cli/integrations/tailwindcss/index.ts

@ansarizafar
Copy link

Why not use Bun plugin for tailwindcss https://bun.sh/docs/bundler/fullstack#using-tailwindcss-in-html-routes

@aralroca
Copy link
Collaborator Author

@ansarizafar We will probably use it in the future, but it is still in its early stages. @AlbertSabate already tried to do this migration, but is better to don't do it yet. It only works for static .html paths and performs some replacements we don't want. Besides, our plugin allows Tailwind to be used inside the shadowRoot, since we use Web Components.

@rohits-web03
Copy link
Contributor

@rohits-web03 currently these defaults are here

brisa/packages/brisa-tailwindcss/index.ts

Lines 22 to 24 in c123384

     @import "tailwindcss/theme" layer(theme); 
     @import "tailwindcss/preflight" layer(base); 
     @import "tailwindcss/utilities" layer(utilities); 

But then are used in build-time... Instead during the integration. Maybe we can directly replace it and use it only in this integration file: https://github.com/brisa-build/brisa/blob/e28fa95ef844350a6fa58dc4d119e35598c753e3/packages/brisa/src/cli/integrations/tailwindcss/index.ts

Okay👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants