untymage's avatar

Tailwindcss extending colors not working

I wanna add custom color in gray category with new range 950 but its not working

extend: {
    colors: {
        gray: {
            '950': '#222'
        }
    }
}
0 likes
5 replies
Snapey's avatar

You are running npm to compile the css file?

untymage's avatar

@tykus yeah width working but gray not:

tailwind.config.js:

module.exports = {
    purge: [
        './resources/views/**/*.blade.php',
        './resources/css/**/*.css',
    ],
    theme: {
        extend: {
            width: {
                '72': '18rem',
                '84': '21rem',
                '96': '24rem',
            },
            colors: {
                gray: {
                    '950': '#222'
                }
            }
        }
    },
    variants: {},
    plugins: [
        require('@tailwindcss/custom-forms')
    ],

};

When i run npm run watch i will lost all of my colors style, @snapey :

 DONE  Compiled successfully in 3616ms22:19:02

<s> [webpack.Progress] 100%

       Asset      Size   Chunks             Chunk Names
/css/app.css  1.69 MiB  /js/app  [emitted]  /js/app
 + 1 hidden asset

and when i remove the gray key it working

untymage's avatar

I just realized i can only override the default value for example

Its working:

'900' : '#222'

But i cant define new range:

'950' : '#222'

is there anyway?

Please or to participate in this conversation.