yeun / open-color

Color scheme for UI design.
https://yeun.github.io/open-color/
MIT License
5.27k stars 239 forks source link

feat: Added Support for Tailwind CSS #116

Closed surjithctly closed 3 years ago

surjithctly commented 3 years ago

This PR adds support for Tailwind CSS.

Why

Tailwind CSS is a popular CSS Framework. It will help many people who are looking for a best alternative for their official color palette.

How

Tailwind CSS support presets in their tailwind.config.js. Using that users can easily include these colors.

  presets: [require("./open-color.js")],
Sanan4li commented 3 years ago

waiting for this PR to be merged. Although it will make CSS file a lot bigger but it's useful. Can you please share how I can use it in tailwind until this PR is merged?

surjithctly commented 3 years ago

Hi @Sanan4li

It won't make a bigger css file. You have to use JIT & Purge then only used colors will be available in production.

For the time being, you can directly copy and paste the open-color.js from my branch and import to tailwind with preset as shown above.

Sanan4li commented 3 years ago

Hi @Sanan4li

It won't make a bigger css file. You have to use JIT & Purge then only used colors will be available in production.

For the time being, you can directly copy and paste the open-color.js from my branch and import to tailwind with preset as shown above.

Thanks for the quick reply. Just a question that came to my mind, I have checked your open-color.js file and you have extended colors with the same name that already exists in the tailwind. So will these colors overwrite the existing colors? I hope this will be merged soon.

sairion commented 3 years ago

Not much important stuff, but would you remove style-converting parts from this PR? Otherwise, the PR looks OK to me.

surjithctly commented 3 years ago

Hey @sairion

Sorry, Not sure what you mean by style-converting parts. Could you explain it a bit further?

sairion commented 3 years ago

@surjithctly What I meant was, in the diff, there are many code changes converting single quotes into double quotes and such – and I don't think it is necessary.

surjithctly commented 3 years ago

Thanks. Its done :)

sairion commented 3 years ago

@surjithctly Awesome, thanks!