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

Build color variables into templates #30

Open
balsama opened this issue Jun 22, 2022 · 3 comments
Open

Build color variables into templates #30

balsama opened this issue Jun 22, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@balsama
Copy link

balsama commented Jun 22, 2022

Tailwind comes with a large color palette.The provided templates use a combination of blue-600 for links and highlights. It would be nice if this was a variable so that developers could change it in one place to customize rather than throughout the templates.

@lauriii lauriii added the enhancement New feature or request label Jun 22, 2022
@lauriii
Copy link
Contributor

lauriii commented Jun 22, 2022

Are you asking for more structure to how the colors are being selected so that all uses of one color could be changed to something else more easily? Example of this would be something like this https://tailwindcss.com/docs/customizing-colors#aliasing-color-names.

@balsama
Copy link
Author

balsama commented Jun 23, 2022

Are you asking for more structure to how the colors are being selected so that all uses of one color could be changed to something else more easily?

Yes. I think I jumped to a solution in the issue summary. If I understand correctly, aliasing the current blue-600 class to highlight-color or something like that would work well (given you could easily change what highlight-color mapped to.

@fiasco
Copy link
Contributor

fiasco commented Jun 27, 2022

Just a side note I learned while building an app with this framework: tailwind relies on a JIT compiler that needs to see the class names in the react templates. If you try to dynamically build a class like color + '-600', it will not work as tailwind will fail to include the CSS required.

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

No branches or pull requests

3 participants