Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

redroseamit's avatar

laravel 9 browser inspection changes not appearing tailwind css inertia.

i found similar problem in "https://laracasts.com/discuss/channels/vite/laravel-9-vite-not-updating-tailwind-changes" this post but unable to get what is the reason happening ? as per understanding its look like compile is not working . please suggest here is the tailwind.config.js below.. i am working on default laravel welcome.vue component.

const defaultTheme = require('tailwindcss/defaultTheme');

/** @type {import('tailwindcss').Config} */
module.exports = {

   darkMode: 'class',
    content: [
        './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
        './vendor/laravel/jetstream/**/*.blade.php',
        './storage/framework/views/*.php',
        './resources/views/**/*.blade.php',
        './resources/js/**/*.vue',
    ],

    theme: {
        extend: {
            fontFamily: {
                sans: ['Nunito', ...defaultTheme.fontFamily.sans],
            },
        },
    },

    plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],


};

0 likes
8 replies
Sinnbeck's avatar

Is npm run dev running? What did you change?

redroseamit's avatar

@Sinnbeck npm run dev is working proper .. if i am doing any changes in any file its showing in dev but when i am going to browser inspect tool for changing background color etc its not appearing on page.

Sinnbeck's avatar

Or are you changing classes in the dom using the browser? Cause that isn't possible

redroseamit's avatar

sir browser is working proper.inspect tool working proper.. for below i am trying to change background color while changing bg-black to bg-slate.... but its not appearing earlier it was working

<nav class="w-full mx-auto bg-black shadow dark:bg-black dark:text-slate-400">

if i will remove w-full mx-auto or something changes are appearing its happening for background color.

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@redroseamit but you are changing it in the browser not in code? That's not possible. Tailwindcss only compiles classes that are used in code. So if dark:text-slate-400 isn't anywhere in your code, you cannot use it

It looks in all files in the content array in the config to find out what classes to create

1 like

Please or to participate in this conversation.