Skip to content

Commit e39da67

Browse files
committed
spacing (margin, negativeMargin & padding)
1 parent e244553 commit e39da67

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/source/docs/spacing.blade.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,41 @@ For example, `.pt-2` would add `.5rem` of padding to the top of the element, `.m
4545
<div><code class="inline-block my-1 mr-1 px-1 py-1 font-mono border rounded">auto</code> auto <span class="text-slate-light text-xs">(margins only)</span></div>
4646
</div>
4747
</div>
48+
49+
## Customizing
50+
51+
### Responsive, Hover, and Focus Variants
52+
53+
By default, no hover, focus, or group-hover variants are generated for margin, negative margin and padding utilities.
54+
55+
You can control which variants are generated for the list utilities by modifying the `margin`, `negativeMargin` and `padding` property in the `modules` section of your Tailwind config file.
56+
57+
For example, this config will _also_ generate hover and focus variants of the margin utilities, hover variants of the negative margin utilities, and focus variants of the padding utilities:
58+
59+
```js
60+
{
61+
// ...
62+
modules: {
63+
// ...
64+
margin: ['responsive', 'hover', 'focus'],
65+
negativeMargin: ['responsive', 'hover'],
66+
padding: ['responsive', 'focus'],
67+
}
68+
}
69+
```
70+
71+
### Disabling
72+
73+
If you aren't using the margin, the negative margin, or padding utilities in your project, you can disable them entirely by setting the `margin`, `negativeMargin` and `padding` property to `false` in the `modules` section of your config file:
74+
75+
```js
76+
{
77+
// ...
78+
modules: {
79+
// ...
80+
margin: false,
81+
negativeMargin: false,
82+
padding: false,
83+
}
84+
}
85+
```

0 commit comments

Comments
 (0)