-
Notifications
You must be signed in to change notification settings - Fork 300
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
[Tailwind CSS] Enable color exact values for standard tailwind colors via tailwind css config export. #102
Comments
If you had to import your Tailwind file so what I generate your colors,
would that make you happy?
…On Mon, Jun 10, 2024, 11:10 Nicolas C. ***@***.***> wrote:
Hi, I very much like your plugin, but while finishing my last pass of
usability evaluation I've hard time to figure out how to make sure that the
tailwind class for colors would match colors from our design.
Seems that I stumble on a blocker: tailwind classes seems to go through a
nearest value of the actual ones on the design. I've seen some alternative
to that, such as tailwinds bracket colors for non standard colors, but this
is too not a viable solution.
It looks like that the right solution would be a 2 stepped one: somehow,
exporting a tailwind configuration for the project colors with their name,
and then having FigmaToCode use those names in the tailwind class names.
There are questions left opened with such an approach, such as how to
handle colors names collisions, especially for figmas designs that are use
in a single project.
I'dont event know if it's feasible with figma plugin, but it looks to me
that any figma tailwind code generator will have to tackle this to achieve
a really valuable output
—
Reply to this email directly, view it on GitHub
<#102>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACVXFM45BGMMSSP3M6PFLLZGWXTRAVCNFSM6AAAAABJCMVHLGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2DIMBSHEYTCNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Well I don't know the extent of tailwind colors configuration complexity, but if I could import colors in a format compatible with tailwind colors configuration it would certainly to, as some figma plugins claims to be able to export that. Importing a complete |
After reflection maybe we could try to skip the config import add do a mix & match of using colors alias of the boundVariables and fallback to bracket syntax ( That way unnamed colors cannot be exported properly by any ways, and FigmaToCode doesn't have to deal with probable configurations mismatches. Does it looks sound to you ? |
so if you have a color variable, and it doesn't match 100% a pre-defined color, I use |
It looks like I greedily would like two feature, the one you describe "round to tailwind colors" to be able to disable it, and another "colors alias", that would use aliases when one is available. But I see how it can be a bit of work after reading the code. |
how would color alias work? Because most people wouldn't have a corresponding name in Figma, I guess. |
Yes exactly, to be of use, this alias feature requires to add the colors to tailwind, either manually or exported from figma, eg by using such a plugin |
If I made only the "disable color rounding" would you be happy already? 🥺
…On Mon, Jun 10, 2024, 16:55 Nicolas C. ***@***.***> wrote:
Yes exactly, to be of use, this alias feature requires to add the colors
to tailwind, either manually or exported from figma, eg by using such a
plugin
<https://www.figma.com/community/plugin/1246272456438744360/tw-styles>
—
Reply to this email directly, view it on GitHub
<#102 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACVXFMK57LCKLQWE7K6NPTZGYABRAVCNFSM6AAAAABJCMVHLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJZGE3TIMZZGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes I think it would be a good feature to have. I tried to experiment with naming and colors variables things got hectic pretty quickly, I think I'll comme back to you with proposal and code. |
Another option here might be to import the TW file and convert all values to library variables, then in future the user could update the variables rather than the plugin having to manually manage configuration. In fact, this plugin looks to already exist: Could use that, then export token names as-is. See other issue linked above. |
Hi, I very much like your plugin, but while finishing my last pass of usability evaluation I've hard time to figure out how to make sure that the tailwind class for colors would match colors from our design.
Seems that I stumble on a blocker: tailwind classes seems to go through a nearest value of the actual ones on the design. I've seen some alternative to that, such as tailwinds bracket colors for non standard colors, but this is too not a viable solution.
It looks like that the right solution would be a 2 stepped one: somehow, exporting a tailwind configuration for the project colors with their name, and then having FigmaToCode use those names in the tailwind class names.
There are questions left opened with such an approach, such as how to handle colors names collisions, especially for figmas designs that are use in a single tailwind project.
I'dont event know if it's feasible with figma plugin, but it looks to me that any figma tailwind code generator will have to tackle this to achieve a really valuable output
The text was updated successfully, but these errors were encountered: