-
Notifications
You must be signed in to change notification settings - Fork 263
/
Copy path_extends.scss
157 lines (126 loc) · 3.47 KB
/
_extends.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
.text-center {
text-align: center;
}
.text-uppercase {
text-transform: uppercase;
}
.display-block {
display: block;
}
.display-inline {
display: inline;
}
.reset-margin {
margin: 0;
}
.reset-list {
margin: 0; padding: 0;
list-style: none;
li {
margin: 0;
padding: 0;
}
}
// Return the modulo of two numbers
@function mod($dividend,$divisor) {
@return $dividend - (floor($dividend/$divisor)*$divisor);
}
// Return the corrected angle or position for a css gradient
@function angle($deg) {
@if type-of($deg) == 'number' {
@return mod(abs($deg - 450), 360deg);
} @else {
$position: to + " ";
@each $pos in $deg {
$position: $position + opposite-position($pos) + " ";
}
@return $position;
}
}
@mixin linear-gradient-fix ($angle, $details) {
@include background(linear-gradient($angle, $details));
background: #{"linear-gradient(" + angle($angle) + ", " + $details + ")"};
}
@mixin apply-status-style($color) {
background: $color;
box-shadow: -4px 0px 4px darken($color, 5%) inset;
border-right-color: darken($color, 12%);
&:before {
@include linear-gradient-fix(34deg, (transparentize($color, 1), transparentize($color, 1) 50%, darken($color, 5%) 53%, $color 56%));
}
&:after {
@include linear-gradient-fix(-34deg, (transparentize($color, 1), transparentize($color, 1) 50%, darken($color, 5%) 53%, $color 56%));
}
}
@mixin secondary-title {
font-size: 2em;
line-height: 1;
font-family: $index-font-family;
font-weight: normal;
}
@mixin roll {
display: inline-block;
overflow: hidden;
vertical-align: top;
-webkit-perspective: 400px;
-moz-perspective: 400px;
-moz-perspective: 400px;
-webkit-perspective-origin: 50% 50%;
-moz-perspective-origin: 50% 50%;
perspective-origin: 50% 50%;
& span {
display: block;
position: relative;
padding: 0 2px;
-webkit-transition: all 400ms ease;
-moz-transition: all 400ms ease;
transition: all 400ms ease;
-webkit-transform-origin: 50% 0%;
-moz-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
&:hover span {
background: #111;
-webkit-transform: translate3d( 0px, 0px, -30px ) rotateX( 90deg );
-moz-transform: translate3d( 0px, 0px, -30px ) rotateX( 90deg );
transform: translate3d( 0px, 0px, -30px ) rotateX( 90deg );
}
& span:after {
content: attr(data-title);
display: block;
position: absolute;
left: 0;
top: 0;
padding: 0 2px;
color: #fff;
background: hsl(206, 80%, 30%);
-webkit-transform-origin: 50% 0%;
-moz-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg );
-moz-transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg );
transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg );
}
}
@mixin text-shadows($arg) {
$count: 0;
$textshadow: '';
@each $value in $arg {
$textshadow: $textshadow + $count + 'px ' + $count + 'px ';
}
}
@function solid-text-shadows($color,$width) {
$i: 1;
$text-shadow: "";
@while $i < ($width + 1) {
$text-shadow: $text-shadow + $i + "px " + $i + "px " + "1px " + $color;
@if($i != $width ) {
$text-shadow: $text-shadow + ", ";
}
$i: $i + 1;
}
@return unquote($text-shadow);
}