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
Copy file name to clipboardExpand all lines: modules/primer-support/docs/spacing.md
+16-15Lines changed: 16 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,21 +23,6 @@ The spacing scale is used for [margin](./utilities/margin) and [padding](./utili
23
23
24
24
See [primer-marketing-support](../primer-marketing-support) for the extended spacing scale used for marketing needs and the related y-axis spacing utilities for [margin](../primer-marketing-utilities/docs/margin.md) and [padding](../primer-marketing-utilities/docs/padding.md).
25
25
26
-
## Em-based spacing
27
-
Ems are used for spacing within components such as buttons and form elements. We stick to common fractions for em values so that, in combination with typography and line-height, the total height lands on sensible numbers.
28
-
29
-
We aim for whole numbers, however, GitHub's body font-size is 14px which is difficult to work with, so we sometimes can't achieve a whole number. Less desirable values are highlighted in <spanclass="text-red">red</span> below.
30
-
31
-
| Fraction | Y Padding (em) | Total height at 14px | Total height at 16px |
We recommend using the fractions shown above. To calculate values with other font-sizes or em values, we suggest using [Formula](http://jxnblk.com/formula/).
40
-
41
26
## Spacer Variables
42
27
43
28
These variables match the above scale and are encouraged to be used within components. They are also used in our [margin](./utilities/margin) and [padding utilities](./utilities/padding).
@@ -50,3 +35,19 @@ $spacer-4: 24px;
50
35
$spacer-5: 32px;
51
36
$spacer-6: 40px;
52
37
```
38
+
39
+
## Em-based spacing
40
+
Ems are used for spacing within components such as buttons and form elements. We stick to common fractions for em values so that, in combination with typography and line-height, the total height lands on sensible numbers.
41
+
42
+
We aim for whole numbers, however, GitHub's body font-size is 14px which is difficult to work with, so we sometimes can't achieve a whole number. Less desirable values are highlighted in <spanclass="text-red">red</span> below.
43
+
44
+
| Fraction | Y Padding (em) | Total height at 14px | Total height at 16px |
We recommend using the fractions shown above. To calculate values with other font-sizes or em values, we suggest using [Formula](http://jxnblk.com/formula/).
0 commit comments