uloncl's avatar

missing tailwind colours

there are certain colours that i know should be available as part of the default tailwind palette and yet when i try to use them they arent there, like im pretty sure the entire slate palette is just not there or half of the gray palette i can get 500 600 and 900 but all the other gray shades arent available.

do i need to export the colours manually somehow in the config or is laravel 10 using an older version of tailwind? im also using blade

0 likes
7 replies
Snapey's avatar

The only colours that will be available are the ones found in your design. There is no 'default' pallette.

uloncl's avatar

@Snapey ok so do i need to restart the app any time that i add a new colour to "recompile" or do i need to define that design somewhere

gych's avatar

@uloncl You should be able to use all the colors from the default color palette

Snapey's avatar

@uloncl all those colours are available to you, but you need a build step that scans your blade files to see what colours you are actually using. How you do this depends if you have other reasons for a front-end build process

puklipo's avatar

tailwind only builds "actually used css".

local

dev command provides automatic rebuilds and automatic browser refreshes.

npm run dev

exit : Ctrl+C

production

Run the build command every time during deployment.

// Deploy script
npm ci
npm run build
1 like
uloncl's avatar
uloncl
OP
Best Answer
Level 1

yeah ive been using npm run dev and laragon to test it, it might have been that i wasnt clearing the cache when i refreshed (doing ctrl+r instead of ctrl+shift+r or ctrl+F5), tho i did add all the colours to the tailwind config as below

    theme: {
        colors: {
        transparent: 'transparent',
        current: 'currentColor',
        black: colors.black,
        white: colors.white,
        slate: colors.slate,
        gray: colors.gray,
        zinc: colors.zinc,
        neutral: colors.neutral,
        stone: colors.stone,
		...,
		}

Please or to participate in this conversation.