Skip to content

Commit 92ff98e

Browse files
authored
Merge pull request #298 from BeAPI/feature/block-spacing
Add mixin block spacing
2 parents 2b95c95 + 01d18d4 commit 92ff98e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* Block vertical spacing
3+
*/
4+
5+
@mixin block-vertical-spacing($type : margin, $spacing : var(--spacing--block-3)) {
6+
#{context-selector(".blocks-container > &", ".is-root-container &")} {
7+
#{$type}-top: $spacing;
8+
#{$type}-bottom: $spacing;
9+
10+
@if $type == padding {
11+
margin-top: 0;
12+
margin-bottom: 0;
13+
}
14+
}
15+
}

src/scss/02-tools/tools.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@
3232
@import "./m-sr-only";
3333
@import "./m-style-only";
3434
@import "./m-reduced-motion";
35+
@import "./m-block-vertical-spacing";

0 commit comments

Comments
 (0)