hi ,
can somebody help ?
tailwind intellisence dsnt work on php-page in vs-code.
here is the img.
So have you done the steps listed in their troubleshooting faq? Particularly the last one?
Iâm gonna go ahead and guess your config file is badly formatted. Look at the coloration on line 22. Youâve accidentally closed your comment mid-line.
no , i used without commented part , but it dsnt work.
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./index.html"],
theme: {
extend: {},
},
plugins: [],
}
it works only for index.html
and not for php.
in commented code , are values i have tried in content: [â./index.htmlâ],
what
will be correct value in content: [" ."] for php pages ?
thnks
A wild stab in the dark here, but looking at the docs, you have included languages
If you click on the built in languages link âphpâ is on the list
https://github.com/tailwindlabs/tailwindcss-intellisense/blob/master/packages/tailwindcss-language-service/src/util/languages.ts
I could be way off here, but could it be something along the lines of adding this to your config?
{
"tailwindCSS.includeLanguages": {
"plaintext": "php"
}
}
Well for one this will work for PHP because tailwind is in by default for Laravel. Secondly, did you try just using ['./home.php']
and see if that works? By reference, here is how Laravel has it out of the boxâŚ
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
]
Also donât try to make one line match multiple file types. It is an array after all, so make each file match its own entry in the array. Just like you see above. You might have one that is for *.php
and another for *.html
etc.
I hope this helps.
I tried this ,
*content: [". / .php" ],
**content: [". / .php" , ". / .html"],
but still it ,dsnt work with php.in vs-code
I wonder if you tried
{
âtailwindCSS.includeLanguagesâ: {
âphpâ: âhtmlâ
}
}
and it doesnât work
what is wrong with this ?
thnks in advance.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.