tailwind newly added spacing overrides the defaults

I just added this custom spacing to tailwind: spacing: {main: '10%'} and other spacings eg.py-4 stopped working.
2 Replies
andersgee
andersgee2y ago
You probably replaced the defaults, you can keep them around like this:
const { spacing } = require("tailwindcss/defaultTheme");

...
theme: {
...
extend: {
spacing: { main: "10%", ...spacing },
const { spacing } = require("tailwindcss/defaultTheme");

...
theme: {
...
extend: {
spacing: { main: "10%", ...spacing },
venego
venegoOP2y ago
yes I did. I did not put that in extend. thanks
Want results from more Discord servers?
Add your server