Extending Tailwind config styles
I have extended some styles for the theme in my tailwind.config.js
file:
theme: {
extend: {
animation: {
'marquee': 'marquee 25s linear infinite',
},
keyframes: {
'marquee': {
from: { transform: 'translateX(0)' },
to: { transform: 'translateX(-100%)' },
}
},
marginLeft: {
'ml-16': '4.25rem'
}
},
},
However, whenever I make changes to this file to update the values and re-run npm run dev
or npm run build
the new changes don't take effect. They are not reflected in the compiled app-
Hey!
Can you confirm where did you find the information for the marginLeft
config?
Usually you can customize your spacing scale by editing theme.spacing
or theme.extend.spacing
in your tailwind.config.js
file rather than marginLeft
.
I've tested this that way and it works:
spacing: {
'16': '4.25rem',
},
Make sure to refer to the Tailwind docs:
No worries at all! Happy to hear that it works now!