You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gap utilities can be used on elements with a display type of `flex` or `grid` to create consistent gaps between child elements. This can replace the need for using margins in many cases.
10
+
11
+
Gap utilities are based on a global [spacing scale](/support/spacing) which helps keep spacing consistent. These utilities help us reduce the amount of custom CSS that share the same properties, and allows to achieve many different page layouts using the same styles.
12
+
13
+
14
+
## Naming convention
15
+
16
+
Since gap utilities have many variations and will be used in many places, we use a shorthand naming convention to help keep class names succinct.
17
+
18
+
| Shorthand | Description |
19
+
| --- | --- |
20
+
| g | gap |
21
+
| 0 | 0 |
22
+
| 1 | 4px |
23
+
| 2 | 8px |
24
+
| 3 | 16px |
25
+
| 4 | 24px |
26
+
| 5 | 32px |
27
+
| 6 | 40px |
28
+
| 7 | 48px |
29
+
| 8 | 64px |
30
+
| 9 | 80px |
31
+
| 10 | 96px |
32
+
| 11 | 112px |
33
+
| 12 | 128px |
34
+
35
+
36
+
## Reset gap
37
+
Reset gap values built into components with `g-0`.
38
+
39
+
40
+
## Responsive gaps
41
+
42
+
All gap utilities can be adjusted per [breakpoint](/utilities/grid#breakpoints) using the following formula: `g-[breakpoint]-[spacer]`. Each responsive style is applied to the specified breakpoint and up.
0 commit comments