forked from jessepollak/card
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_mixins.scss
80 lines (76 loc) · 2.22 KB
/
_mixins.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
74
75
76
77
78
79
80
// only import a module once
// https://github.com/wilsonpage/sass-import-once
$modules: () !default;
@mixin exports($name) {
@if (index($modules, $name) == false) {
$modules: append($modules, $name);
@content;
}
}
@mixin shape() {
content: " ";
display: block;
}
@mixin card-texture($radial-gradient: true) {
$b1: rgba(255, 255, 255, 0);
$b2: opacify($b1, .03);
$b3: opacify($b1, .04);
$b4: opacify($b1, .05);
@if ($radial-gradient) {
@include background-image(
repeating-linear-gradient(45deg,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
repeating-linear-gradient(135deg,
$b4 1px, $b1 2px,
$b3 3px, $b2 4px
),
repeating-linear-gradient(90deg,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
repeating-linear-gradient(210deg,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
repeating-radial-gradient(circle at 30% 30%,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
repeating-radial-gradient(circle at 70% 70%,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
repeating-radial-gradient(circle at 90% 20%,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
repeating-radial-gradient(circle at 15% 80%,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
linear-gradient(-25deg, $b1 50%, opacify($b1, .2) 70%, $b1 90%)
);
} @else {
@include background-image(
repeating-linear-gradient(45deg,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
repeating-linear-gradient(135deg,
$b4 1px, $b1 2px,
$b3 3px, $b2 4px
),
repeating-linear-gradient(90deg,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
repeating-linear-gradient(210deg,
$b1 1px, $b2 2px,
$b3 3px, $b4 4px
),
linear-gradient(-25deg, $b1 50%, opacify($b1, .2) 70%, $b1 90%)
);
}
}