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

Intellisense not showing colour preview swatches #113

Closed
mjbates7 opened this issue May 1, 2020 · 9 comments
Closed

Intellisense not showing colour preview swatches #113

mjbates7 opened this issue May 1, 2020 · 9 comments
Labels
bug Something isn't working

Comments

@mjbates7
Copy link

mjbates7 commented May 1, 2020

Hello,

Is there any reason why I wouldn't be seeing the colour preview swatches in the intellisense that pops up? I have all the class names available, but the colour swatches aren't appearing?

image

Transparent is the only one showing.
image

version info
tailwind 1.4.0
extension 0.2.0

vscode:
Version: 1.45.0-insider (user setup)
Date: 2020-05-01T05:22:54.431Z
Electron: 7.2.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363

I've reinstalled the plugin too and restarted vscode.

Many thanks

@bradlc
Copy link
Contributor

bradlc commented May 1, 2020

Hey @mjbates7. This is because of the new opacity modifiers in Tailwind 1.4:

/*  Before */
.bg-red-500 {
  background-color: #f56565
}

/* Now */
.bg-red-500 {
  --bg-opacity: 1;
  background-color: #f56565;
  background-color: rgba(245, 101, 101, var(--bg-opacity));
}

Currently the logic for plucking the color out of the styles is roughly "is there a single CSS property and is the value a color?"

I'm in the process of improving the logic which will fix this. I'll hopefully release a new alpha version this weekend with this included.

@bradlc bradlc added the bug Something isn't working label May 1, 2020
@mjbates7
Copy link
Author

mjbates7 commented May 1, 2020

Great - thanks for the quick response and clearing that up. I did wonder if it was 1.4 that had changed as I had just tried a 1.2/1.3 and it worked fine

bradlc pushed a commit that referenced this issue May 2, 2020
@bradlc
Copy link
Contributor

bradlc commented May 3, 2020

Fixed in v0.3.0-alpha.2 🎉

@alechp
Copy link

alechp commented May 13, 2020

Installed v0.3.0-alpha.2; works perfectly!

@nzrv
Copy link

nzrv commented May 14, 2020

thanks! works like a charm 👍

@francoisbeyers
Copy link

How do I update to the new v0.3.0-alpha.2 version please?

@alechp
Copy link

alechp commented May 26, 2020

How do I update to the new v0.3.0-alpha.2 version please?

You can access it in the releases page:
https://github.com/bradlc/vscode-tailwindcss/releases

How to install downloaded extension manually:
https://stackoverflow.com/questions/42017617/how-to-install-vs-code-extension-manually

@kabeza
Copy link

kabeza commented Jun 2, 2020

Hi

I thought it was a VSCode bug, but glad I could solve it here

https://stackoverflow.com/questions/62158642/problem-to-see-the-color-preview-when-autocomplete

@bradlc
Copy link
Contributor

bradlc commented Jun 11, 2020

v0.3.0 is available in the marketplace now 🎉

@bradlc bradlc closed this as completed Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants