Closed arekuki closed 2 years ago
Anyone have an answer?
I'm having similar issues as detailed in #428. However, since I solved the directive highlighting issue with an extension, I closed #428 and wanted to consolidate the feedback in regards to issues with hover information and intellisense suggestions when using @screen.
Normal Property Hover Behavior:
No Hover Information Inside @screen Directive:
No Hover Information on @screen Directive:
Additionally, some autocomplete options appear when typing but is limited to "Text" autocompletion as opposed to the "Properties and Attributes" or "Constants" autocompletion (vscode defines types of completions here) you would typically see in a standard .css/.scss files (for properties and attributes) or an .html file (for tailwind class constants). The difference is shown below:
Normal Properties and Attributes Autocomplete in .css/.scss Files:
Normal Tailwind Constants Autocomplete in .html Files:
Unexpected Text Autocomplete in .css/.scss Files:
Finally, this issue is not present when using @apply in .css/.scss files leading me to believe that perhaps we can not use the @screen directive with standard CSS. Can anyone confirm?
I wanted to post a quick workaround for anyone who stumbles across this issue. You can replace @screen xl
with @media (min-width: theme('screens.xl'))
to provide suggestions with standard css/scss. Obviously much more verbose, but this allows you to continue to use the tailwind.config to control breakpoints while maintaining intellisense functionality.
Thanks for the answer. It is possible to replace @screen xl with @media (min-width: theme('screens.xl')).
@arekuusa Even with the workaround, I would consider leaving this issue open until a maintainer can confirm that behavior we experienced is the intended behavior.
Okay, for now, leave it open
Hey @arekuusa. I am unable to view your joxi.ru
links, but I think I understand the problem, and it's the same as #253: CSS IntelliSense does not work when nested inside Tailwind at-rules (e.g. @screen
, @layer
). I'm going to close this issue in favour of that one.
Hey @bradlc , I changed the links to pictures. Look here please. I read #253. Is the @screen directive not highlighted when using SCSS?
What version of Tailwind CSS IntelliSense are you using?
v0.7.2
What version of Tailwind CSS are you using?
2.2.19
What package manager are you using?
npm, gulp
What operating system are you using?
Windows 10
Reproduction URL
none
Describe your issue
Couldn't show SCSS / CSS suggestions because of @screen
Works to show SCSS / CSS suggestions without @screen
Waiting for an answer