Skip to content

Commit 55a2bc0

Browse files
committed
Generate all margin / padding helper classes
1 parent 4de5c5f commit 55a2bc0

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

assets/_sass/utilities/_spacing.scss

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,36 @@
22
// Spacing
33
////////////////////
44

5-
.m-0 {
6-
margin: 0 !important;
5+
$spacer: 1em;
6+
7+
$spacers: (
8+
0: 0,
9+
1: ($spacer * .25),
10+
2: ($spacer * .5),
11+
3: $spacer,
12+
4: ($spacer * 2),
13+
5: ($spacer * 3),
14+
6: ($spacer * 4),
15+
7: ($spacer * 6)
16+
);
17+
18+
$xy-border: (
19+
top: t,
20+
bottom: b,
21+
left: l,
22+
right: r
23+
);
24+
25+
@each $prop, $letter in (margin: m, padding: p) {
26+
.#{$letter}-#{0} {
27+
#{$prop}: 0;
28+
}
29+
30+
@each $direction, $d in $xy-border {
31+
@each $unit, $em in $spacers {
32+
.#{$letter}#{$d}-#{$unit} {
33+
#{$prop}-#{$direction}: #{$em};
34+
}
35+
}
36+
}
737
}

projects.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
---
1111

1212
<div class="container">
13-
<h2>Open Source Projects</h2>
13+
<h2 class="mb-3">Open Source Projects</h2>
1414

1515
<ul class="card-grid">
1616
{% assign public_repositories = site.github.public_repositories | where:'archived', false | where:'fork', false | sort: 'stargazers_count' | reverse %}

0 commit comments

Comments
 (0)