Open liamwh opened 7 hours ago
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: bg-
, fill-
, etc) of the new available colors:
https://github.com/skeletonlabs/skeleton/blob/next/packages/skeleton/src/plugin/extends/colors.ts#L9
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: https://github.com/skeletonlabs/skeleton/blob/next/packages/skeleton/src/plugin/utilities/presets.ts
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!
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