brisa-build / brisa

The Web Platform Framework.
https://brisa.build
MIT License
436 stars 11 forks source link

Panda CSS integration #516

Closed osdiab closed 1 month ago

osdiab commented 1 month ago

For those of us who like atomic compiled styles like tailwind but don’t like crazy class names

https://panda-css.com/

aralroca commented 1 month ago

@osdiab , added to 1.0 routemap. Great idea

anusikh commented 1 month ago

i would like to work on it, if that's okay @aralroca

aralroca commented 1 month ago

@anusikh feel free! any contribution will be very welcomed! This is the Tailwind integration package that maybe helps as reference for Panda CSS: https://github.com/brisa-build/brisa/blob/71a374d32b4a85046695bb51338cbd0cfdf9b20d/packages/brisa-tailwindcss/index.ts#L1-L26

For now the CSS integration has 3 fields:

However, it is an internal API that you can change to adapt it, what it does have to go hand in hand with Tailwind, so the integration will be applied for both.

Then, you will have to add the changes in the CLI to be able to do brisa add pandacss:

https://github.com/brisa-build/brisa/blob/71a374d32b4a85046695bb51338cbd0cfdf9b20d/packages/brisa/cli.test.ts#L1319-L1335

And this CLI is calling this file:

https://github.com/brisa-build/brisa/blob/71a374d32b4a85046695bb51338cbd0cfdf9b20d/packages/brisa/src/cli/integrations/tailwindcss/index.ts#L1-L68

Things to keep in mind:

If you have any questions, don't hesitate to ask and I'll be glad to give you a hand.

anusikh commented 1 month ago

thanks for the valuable insight! i will be raising a PR shortly, may i know the target branch for the PR? in the CONTRIBUTING.md file, it says the PR must be created against the canary branch, but i suppose there is no canary branch

@aralroca

aralroca commented 1 month ago

@anusikh It is put this way in CONTRIBUTING.md because we were going to rename the main branch to canary, now it is done, if you refresh the page, the main branch is now called canary.

aralroca commented 1 month ago

is now available in 0.1.1-canary.2 prerelease. Later this week I will make the 0.1.1 release 💪🏽