Spacing
Learn how to customize the default spacing.
We'll cover the following...
Spacing used
We can use theme#spacing
or theme#extend#spacing
to override properties, such as padding, margins, width, height, and more. We replace the spacing, as shown below:
module.exports = {
theme: {
spacing: {
'small': 4px,
'medium': 12px,
'large': 36px
}
}
}
These new suffixes will apply anywhere the spacing goes. Therefore, we now have .p-small
, .h-medium
, ...