I am trying to get the TailwindCSS IntelliSense working inside an inline script. I am using handlebars in a simple One-Pager, however the autocompletion doesn’t work in side the script tag.
<div id="template" class="w-4/5 swiper-wrapper lg:w-2/3">
<script id="output" type="text/x-handlebars-template">
{{#each images}}
<div class="swiper-slide">
<div class="swiper-carousel-animate-opacity">
<img class="bg-red" src="{{url}}" alt="{{alt}}" />
</div>
</div>
{{/each}}
</script>
</div>
I tried all the suggestions in the following thread (Tailwind CSS IntelliSense does not provide suggestions in a ReactJS project?) but it doesn’t work for the script. Would be nice, if someone could help.
2
Answers
The issue is now fixed.
https://github.com/tailwindlabs/tailwindcss-intellisense/issues/722
0.9.8
<script type="text/x-handlebars-template">
) (#726)If you handlebars template is a js variable, you need to prefix or suffix with something like "Styles"/"Classes" for example. and add the following to you vscode setting.json.