0

I have been using Tailwind CSS in VS Code. But suddenly I did notice I can't see the color preview.. A screenshot

I opened the laptop and started working again in the project.

I disabled all the extensions and reenabled again. . I restarted the laptop. In the input.css file when I switch the language mode to CSS . I can see it. But when I switch it back to postCSS , I can't see it again .

(

@tailwind base; 
@tailwind components;
@tailwind utilities;

) throws an unknown error.

I am expecting to see the color preview boxes on the left side again

Wahlstrommm
  • 684
  • 2
  • 7
  • 21
  • i am using two extensions actually . 1) Tailwindcss Intellisense v0.9.11. 2) PostCSS Language Support v1.0.9 As I am using tailwindcss so this : `@tailwind base; @tailwind components; @tailwind utilities;` creates an unknown rule @tailwind error. This 2nd extension solves the error. –  May 06 '23 at 07:25
  • does the behaviour revert to the one you want if you revert to older versions of those extensions? Do you know which extension (if any) was providing this feature? You can try older versions by right clicking the gear icon for the extension in the extension list and selecting the "Install Another Version..." option. Try doing a "binary search" through the versions for each of those two extensions and see if you can get back the behaviour you want. If so, then it might be a regression, which you should then report to the maintainers or ask them if it's by-design and not a regression. – starball May 06 '23 at 07:28
  • i was working on a project and then i ended my session. after few hours i opened the laotop again and when I went to modify the colors . it didn't worked. I noticed The color preview box is missing. –  May 06 '23 at 07:37
  • I did installed lower verions. but still it doesn't work. Is there something like hard reset. I even reinstalled the vs code. but when I open it again . I get where i was working before. –  May 06 '23 at 08:03
  • I think it's going to hard for anyone to help you without enough detail about how to reproduce the problem. I myself don't know what else to tell you to try. – starball May 06 '23 at 08:28
  • okay you can help me . what about a screen cast. –  May 06 '23 at 08:37
  • My we can we can uninstall everything and start from the beginning. . www.linkedin.com/in/bishalkar10. Connect with me on linkedin –  May 06 '23 at 08:40
  • possibly related issue that is supposedly fixed in version 0.9.8 of the Tailwind CSS extensions: https://github.com/tailwindlabs/tailwindcss-intellisense/issues/728. another issue supposedly fixed in 0.9.11: https://github.com/tailwindlabs/tailwindcss-intellisense/issues/750 – starball May 07 '23 at 07:25
  • Are you on VS Code 1.78? If so, does this issue still happen if you revert to VS Code 1.77? – starball May 07 '23 at 07:32
  • Also sounds related: https://github.com/tailwindlabs/tailwindcss-intellisense/issues/777 – starball May 07 '23 at 07:34
  • I have no clue when did it happen. The problem isn't with tailwind css intellisense v0.9.11 . Cause I was working with it since the last month. I opened the laptop. ran `npx tailwindcss -i ./input.css -o ./dist/output.css --watch` I wanted to play with color a little and the box is missing. It happened few days ago. I was doing installing , uninstalling , reboot , shutdown , delete the setting.json and it the box came back. Now it's gone. –  May 07 '23 at 08:57
  • does this issue still happen if you revert to VS Code 1.77? https://stackoverflow.com/q/49346733/11107541 – starball May 07 '23 at 09:02
  • I don't have the laptop with me. I am not at home. So couldn't check. And one thing. I was already having this trouble and then. That day I got the update the latest 1.78. :) –  May 07 '23 at 19:00
  • I revert back to vs code v1.77.2 and it's wroking fine –  May 14 '23 at 05:51

1 Answers1

0

Try enabling this setting:

Editor: Default Color Decorators    // set to true

See more at Visual studio code color picker

Mark
  • 143,421
  • 24
  • 428
  • 436