Problem with @import with tailwindcss JIT and laravel
See original GitHub issueHi, I’m using tailwidcss JIT and laravel with laravel mix. I’ve a problem with css variables. I’ve three files: app.css, _variables.css and global.css. If I import the _variables.css file in global.css or in app.css it compiles correctly in app.min.css but I can’t see any changes related to css variables in browse. Instead if I put all the rules in one file, it works. I can’t figure why. Can you help me? Below my files:
app.css
@import "tailwindcss/base";
@import "tailwindcss/utilities";
@import "tailwindcss/components";
@import "partials/_variables.css";
@import "partials/_global.css";
_variables.css
:root {
/* Font family */
--main-font-family: "'Inter', sans-serif";
/* Width */
--max-width-content: "100rem";
/* Colors */
--color-primary: #006633;
--color-secondary: #FF7700;
}
_global.css
html {
@apply h-full font-base;
}
body {
@apply min-h-full font-base antialiased bg-primary;
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Laravel Mix 6.0.25 not building with @tailwindcss/jit
You're using the PostCSS plugin, yet you are attempting to compile SASS. Do it the following way instead. .postCss('resources/css/app.css', ...
Read more >Possible to run with Laravel Mix? #24 - GitHub
Super pumped to try Tailwind JIT. I'm having trouble adding it to a Statamic project using Laravel Mix to configure PostCSS, ...
Read more >Install Tailwind CSS with Laravel
Start by creating a new Laravel project if you don't have one set up already. The most common approach is to use the...
Read more >Using Tailwind's JIT compiler with Laravel Mix - Michael Dyrynda
First, install the JIT-compiler with NPM. 1npm install -D @tailwindcss/jit tailwindcss postcss. Next, ensure that your tailwind.
Read more >Error in running "npm run dev" - Laracasts
laravel -mix: github:JeffreyWay/laravel-mix#master; tailwind-css: ^2.0.4 ... at /var/www/html/work/node_modules/@tailwindcss/jit/src/index.js:50:11 at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As per the docs:
Quite right, thank you!