How do I customize the margin value
The default margins for mr mt ml mb is 1em,How can I set these margins to use 18px or 20px? I'd also like to do something similar with padding.
my: margin : 20px 0
mx: margin : 0 20px
ml : margin-left: 20px
mt: margin-top: 20px
You can do that by customizing your theme.
You can customize your spacing scale by editing
theme.spacingortheme.extend.spacingin yourtailwind.config.jsfile.Alternatively, you can customize just the margin scale by editing
theme.marginortheme.extend.marginin yourtailwind.config.jsfile.Also, if you don't want to modify your theme, you can use arbitrary values for the utility classes, such as
m-[20px]ormy-[18px].Resource: https://tailwindcss.com/docs/margin#customizing-your-theme