Skip to content

Commit a2f9aec

Browse files
committed
refactor(spacing): adjusted spacing on copy, page intro, blockquote & hr
affects: @buildit/gravity-ui-web
1 parent 18349c7 commit a2f9aec

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

packages/gravity-ui-web/src/sass/00-settings/_spacing.scss

+6-2
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ $grav-sp-inset-squished-l: $grav-sp-l $grav-sp-xl;
4949
$grav-sp-page-content-inset: $grav-sp-m;
5050

5151
// Multiplier for ostentatious copy on medium and above viewports
52-
$grav-sp-ostentatious-padding-multiplier: 8;
52+
$grav-sp-ostentatious-padding-left-multiplier: 8;
5353

5454
// Standard vertical gap between successive block elements
5555
// Note that is expressed as an `em` value, so it will scale according to the
5656
// `font-size` of the block elements it affects.
57-
$grav-sp-vertical-gap: 1em;
57+
$grav-sp-vertical-gap: 1.5em;
58+
// Larger vertical gap for use on specific block elements
59+
// Note that is expressed as an `em` value, so it will scale according to the
60+
// `font-size` of the block elements it affects.
61+
$grav-sp-vertical-gap-l: 2.5em;

packages/gravity-ui-web/src/sass/03-elements/_block-text.scss

+3-10
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@ pre {
55

66
blockquote {
77
@include grav-font-size(3);
8-
margin-bottom: 2 * $grav-sp-vertical-gap;
9-
10-
&:last-child {
11-
margin-bottom: $grav-sp-vertical-gap;
12-
}
13-
}
14-
15-
* + blockquote {
16-
margin-top: 2 * $grav-sp-vertical-gap;
8+
margin-top: $grav-sp-vertical-gap-l;
9+
margin-bottom: $grav-sp-vertical-gap-l;
1710
}
1811

1912
hr {
2013
@include grav-font-size(3);
21-
margin-top: 2 * $grav-sp-vertical-gap;
14+
margin-top: $grav-sp-vertical-gap-l;
2215
}

packages/gravity-ui-web/src/sass/05-components/03-organisms/00-page-structure/_02-page-intro.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
$grav-c-page-intro-notch-size: var(--grav-fs-plus-4);
33

44
@media all and (min-width: grav-breakpoint(medium)) {
5-
margin-top: 2 * $grav-sp-vertical-gap;
5+
margin-top: $grav-sp-vertical-gap-l;
66
}
77

88
> * {
@@ -39,7 +39,7 @@
3939
}
4040

4141
@media all and (min-width: grav-breakpoint(medium)) {
42-
@include grav-decoration-notch-out($grav-c-page-intro-notch-size, calc(#{$grav-sp-l} * #{$grav-sp-ostentatious-padding-multiplier}));
42+
@include grav-decoration-notch-out($grav-c-page-intro-notch-size, $grav-sp-l * $grav-sp-ostentatious-padding-left-multiplier);
4343
}
4444
}
4545
}

packages/gravity-ui-web/src/sass/05-components/03-organisms/_copy-ostentatious.scss

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
> * {
66
display: block;
7+
8+
+ * {
9+
margin-top: $grav-sp-vertical-gap-l;
10+
}
711
}
812

913
img {
@@ -29,6 +33,6 @@
2933
}
3034

3135
@media all and (min-width: grav-breakpoint(large)) {
32-
padding-left: calc(#{$grav-sp-l} * #{$grav-sp-ostentatious-padding-multiplier});
36+
padding-left: $grav-sp-l * $grav-sp-ostentatious-padding-left-multiplier;
3337
}
3438
}

0 commit comments

Comments
 (0)