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-marketing-support/README.md
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,17 +9,6 @@
9
9
10
10
This repository is a module of the full [primer][primer] repository.
11
11
12
-
## Documentation
13
-
14
-
<!-- %docs
15
-
title: Variables
16
-
status: In review
17
-
-->
18
-
19
-
Documentation & refactor coming very soon
20
-
21
-
<!-- %enddocs -->
22
-
23
12
## Install
24
13
25
14
This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `support` with this command.
@@ -38,6 +27,31 @@ The source files included are written in [Sass][sass] (`scss`) You can simply po
38
27
39
28
You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._
40
29
30
+
## Documentation
31
+
32
+
<!-- %docs
33
+
title: Marketing support
34
+
status: new release
35
+
-->
36
+
37
+
### Extended spacing scale
38
+
This module extends the `primer-core` spacing scale for marketing site needs. These are useful for achieving bigger vertical spacing between sections on marketing sites.
39
+
40
+
Starting where the `primer-core` spacing scale ends at spacer 6, the marketing scale first steps up with `8px` for spacer 7 then steps in increments of `16px` from spacer 8 up to 12.
41
+
42
+
| Scale | Value |
43
+
|-------|-------|
44
+
| 7 | 48 |
45
+
| 8 | 64 |
46
+
| 9 | 80 |
47
+
| 10 | 96 |
48
+
| 11 | 112 |
49
+
| 12 | 128 |
50
+
51
+
See [primer-marketing-utilities](../primer-marketing-utilities) for related spacing utilities.
Marketing margin utilities extend [core margin utilities](../../primer-marketing-support/docs/spacing) across the y-axis only. The [marketing scale](../../primer-marketing-support) starts from spacer 7 up to 12, and steps first by `8px` for spacer 7 and continues in increments of `16px` for spacer 8 to 12.
8
+
9
+
## Y-axis margin utilities
10
+
11
+
Use marketing margin utilities to apply margin to top, bottom, or both y-axis of an element. These utilities can change or override default margins, and can be used with a spacing scale of 7-12.
All marketing margin utilities can be adjusted per [breakpoint](/styleguide/css/modules/grid#breakpoints) using the following formula: `m[y-direction]-[breakpoint]-[spacer]`. Each responsive style is applied to the specified breakpoint and up.
Marketing padding utilities extend [core margin utilities](../../primer-marketing-support/docs/spacing) across the y-axis only. The [marketing scale](../../primer-marketing-support) starts from spacer 7 up to 12, and steps first by `8px` for spacer 7 and continues in increments of `16px` for spacer 8 to 12.
8
+
9
+
## Y-axis padding utilities
10
+
11
+
Use marketing padding utilities to apply padding to top, bottom, or both y-axis of an element. These utilities can change or override default padding, and can be used with a spacing scale of 7-12.
All marketing padding utilities can be adjusted per [breakpoint](/styleguide/css/modules/grid#breakpoints) using the following formula: `p[y-direction]-[breakpoint]-[spacer]`. Each responsive style is applied to the specified breakpoint and up.
Copy file name to clipboardExpand all lines: modules/primer-support/docs/spacing.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ The spacing scale is a **base-8** scale. We chose a base-8 scale because eight i
21
21
22
22
The spacing scale is used for [margin](./utilities/margin) and [padding](./utilities/padding) utilities, and via variables within components.
23
23
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
+
24
26
## Em-based spacing
25
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.
0 commit comments