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

Are color previews supposed to work? #2

Open
sophiiss opened this issue Jul 8, 2022 · 7 comments
Open

Are color previews supposed to work? #2

sophiiss opened this issue Jul 8, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@sophiiss
Copy link

sophiiss commented Jul 8, 2022

I got a bit disappointed when the little squares showing the color preview didn't work.
I'm not sure if that's possible with plugins but it would be nice to have them.

image

@nekowinston
Copy link
Contributor

I'm guessing that's IntelliSense for TailwindCSS? I'm not using GUI editors a lot, so I have not noticed this until now, sorry about that.

My guess would be, that the Preview has no idea which colour to show, since it's dependent on the parent classes like mocha or latte.

@nekowinston
Copy link
Contributor

Just a quick update on this, I asked around the Discord, and color previews are not working at the moment, so it's not an issue on your end.

I reached out on the Tailwind Discord to get some additional input on how I could fix this. 🙂

@sophiiss
Copy link
Author

sophiiss commented Jul 8, 2022

Oh, okay!
I was gonna do some digging around and see if I can find something. Maybe the plugin requires some specific configuration for the IntelliSense to recognize them?

@nekowinston
Copy link
Contributor

I would be much obliged if you share any findings, hoping to get this fixed, if possible.

@nekowinston nekowinston added enhancement New feature or request help wanted Extra attention is needed labels Jul 8, 2022
@nekowinston nekowinston self-assigned this Jul 8, 2022
@nekowinston
Copy link
Contributor

nekowinston commented Jul 9, 2022

So after reaching out on the Tailwind Discord, I have learned about fallback colours in TailwindCSS.
This Tailwind Play demonstrates the feature: colours with fallbacks get colour previews, while those which solely depend on CSS variables do not.

I guess the question is, if showing the colour of a single flavour, e.g. mocha, is better than not showing any sort of colour preview at all.

@sophiiss
Copy link
Author

sophiiss commented Jul 9, 2022

In my opinion, it would be better to show mocha colors than not showing any. Although I see how that can be frustrating for some people if they're using another variant as default.

@nekowinston
Copy link
Contributor

I've played around with this quite a bit over the last days, sadly without making any headway at all.

Here are 4 approaches I've tried, none of them work:

I'd have preferred to include a fix for this with the next package version, but I'll create a release to fix #3 now.

I'm unsure if we could solve this issue at the moment.

@nekowinston nekowinston linked a pull request Aug 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants