-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
Support extra colours being added to the theme #2964
Comments
Hey @liamwh this is very much a feature I'd love to see added in the future. To set expectations, it likely won't make it by the upcoming Skeleton v3 release. There's two primary reasons for this:
To give you a more concrete example, here's how we inform Tailwind's built-in features (ex: We essentially loop through our combination or color names and shade values (50-950) to ensure Tailwind is aware of the new color values. Then the Skeleton theme inserts the matching CSS Custom Properties (aka variables) that provides the actual color value in an RGB format. So that part is straight forward. Additionally we follow a similar process to generate additional utility classes that Tailwind does not include by default. Examples being presets like you mention above. These follow a similar process where they are generated with a loop: So again, there's the possibly we could pass in additional color names via the plugin, include those in the source array for color names, and then allow these loops to generate the extra values. However, that's all theoretical. I have no idea if it's possible in practice! :) But even if it is, it may be more conducive to wait until Tailwind reconfigures things in their v4 release, and then implement it then. So with that said, I will mark this as part of our "future updates" milestone. Thanks for the suggestion! |
I think a nice alternative would be to provide exported utility functions that recreate your tailwind styles generation, so the end-developer can use it with their own list of colors and a name for it, while still outside of Skeleton's theme-space. |
@MrVauxs that only solves half the problem though - you get more colors for Tailwind native utilities, but you don't get them for any internal Skeleton features. If you're goal is to expand your Tailwind color palette, beyond what Tailwind and Skeleton provide, we're not a limiting factor for that. You can do that right now using the same mechanisms we do (in your And if you need a tool to generate a similar palette set, you can do that using the existing Theme Generator:
But again, you only get these color utilities:
You get no expansion to Skeleton's utility classes (color pairings, presets, color contrasts values, etc). I just don't think folks would be satisfied with that. But if they are, it's 100% possible today. |
Describe the feature in detail (code, mocks, or screenshots encouraged)
I want to be able to extend the number of colours in the theme, so that after adding the the
inform
colours to the theme, the following works:What type of pull request would this be?
Enhancement
Provide relevant links or additional information.
No response
The text was updated successfully, but these errors were encountered: