This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_tools.spacing.scss
73 lines (55 loc) · 1.63 KB
/
_tools.spacing.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//
// Tools: Spacing
// ---
// Mixins to add padding and margin in rem with $px-fallback
//
// Horizontal spacing
// horizontal padding based on the alpha font size in rem
// use: @include padding-lr(#left, #right);
@mixin padding-lr($left: $columns-gutter, $right: $left) {
padding-left: $left * 1rem;
padding-right: $right * 1rem;
}
@mixin padding-left($left: $columns-gutter) {
padding-left: $left * 1rem;
}
@mixin padding-right($right: $columns-gutter) {
padding-right: $right * 1rem;
}
// horizontal margin based on the alpha font size in rem
// use: @include margin-lr(#left, #right);
@mixin margin-lr($left: $columns-gutter, $right: $left) {
margin-left: $left * 1rem;
margin-right: $right * 1rem;
}
@mixin margin-left($left: $columns-gutter) {
margin-left: $left * 1rem;
}
@mixin margin-right($right: 1) {
margin-right: $right * 1rem;
}
// Vertical spacing
// vertical padding based on the alpha font size in rem
// use: @include padding-tb(#top, #bottom);
@mixin padding-tb($top: $alpha-leading, $bottom: 0) {
padding-top: $top * 1rem;
padding-bottom: $bottom * 1rem;
}
@mixin padding-bottom($bottom: $alpha-leading) {
padding-bottom: $bottom * 1rem;
}
@mixin padding-top($top: $alpha-leading) {
padding-top: $top * 1rem;
}
// vertical margin based on the alpha font size in rem
// use: @include margin-tb(#top, #bottom);
@mixin margin-tb($top: $alpha-leading, $bottom: 0) {
margin-top: $top * 1rem;
margin-bottom: $bottom * 1rem;
}
@mixin margin-bottom($bottom: $alpha-leading) {
margin-bottom: $bottom * 1rem;
}
@mixin margin-top($top: 1) {
margin-top: $top * 1rem;
}