Skip to content

Commit 1d15072

Browse files
Add block margins to the .component class
No longer scoped to being inside of the main element
1 parent 8cb99fc commit 1d15072

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

assets-src/styles/core.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
/*------------------------------------*\
7070
#Core components
7171
\*------------------------------------*/
72+
@import "sass/50-core-components/component";
7273
@import "sass/50-core-components/avatars";
7374
@import "sass/50-core-components/header";
7475
@import "sass/50-core-components/archive-banner";
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*------------------------------------*\
2+
#Component
3+
4+
Extra vertical margin on anything with a class of `.component`
5+
\*------------------------------------*/
6+
7+
.component {
8+
margin-block: rem(80);
9+
10+
@include mq($bp-tab-small) {
11+
margin-block: rem(100);
12+
}
13+
}
14+
15+
/* Full width components tend to have a background colour, where we don't want white space in between */
16+
.component.u-full-width + .component.u-full-width {
17+
margin-block: 0;
18+
}

assets-src/styles/sass/50-core-components/_main.scss

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,4 @@ main,
1515
max-inline-size: rem($max-width);
1616
padding-block: rem(24) rem(100);
1717
padding-inline: 5vw;
18-
}
19-
20-
// #main .component + .component {
21-
// margin-block-start: rem(80);
22-
//
23-
// @include mq($bp-tab-small) {
24-
// margin-block-start: rem(100);
25-
// }
26-
// }
27-
28-
// #main .component.u-full-width + .component.u-full-width {
29-
// margin-block-start: 0;
30-
// }
18+
}

0 commit comments

Comments
 (0)