-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy path_mixins.scss
More file actions
181 lines (154 loc) · 3.39 KB
/
_mixins.scss
File metadata and controls
181 lines (154 loc) · 3.39 KB
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/**
* Media query breakpoints
*/
$desktopFloor: 64.0625em;
$tabletFloor: 40.063em;
$tabletCeiling: 64.0624em;
$mobileCeiling: 40em;
@mixin mobile {
@media only screen and (max-width: $mobileCeiling) {
@content;
}
}
@mixin tablet {
@media only screen and (min-width: $tabletFloor) {
@content;
}
}
@mixin mobileAndTablet {
@media only screen and (max-width: $tabletCeiling) {
@content;
}
}
@mixin desktop {
@media only screen and (min-width: $desktopFloor) {
@content;
}
}
@mixin landscape {
@media only screen and (min-width: 569px) and (max-width: 736px) and (orientation: landscape) {
@content;
}
}
@mixin smallLandscape {
@media only screen and (max-width: 568px) and (orientation: landscape) {
@content;
}
}
// type
@mixin klinicReg {
font-family: $klinic;
font-weight: 400;
letter-spacing: 0.0125em;
}
@mixin klinicBold {
font-family: $klinic;
font-weight: 500;
letter-spacing: 0.02em;
}
@mixin helvetica {
font-family: $font-family-sans-serif;
}
@mixin quote {
font-size: 0.875em;
font-family: $font-family-serif;
line-height: 1.7;
color: darken($light2, 33.33%);
padding: 0.5em 5%;
margin-right: -3.333em;
font-style: italic;
letter-spacing: 0.015em;
position: relative;
&:before {
content: "\“";
position: absolute;
font-size: 3em;
left: -0.125em;
top: -0.25em;
width: 1em;
opacity: 0.3;
z-index: 500;
}
}
// vertical alignment
@mixin fullheight {
min-height: 100%;
height: 100%;
}
@mixin centerer {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@mixin topper {
position: absolute;
top: 0%;
}
@mixin bottomer {
position: absolute;
bottom: 0%;
}
// css3
@mixin transition($property:all, $duration:0.3s, $easing:ease-in-out) {
transition: $property $duration $easing;
}
@mixin border-radius($radius1:3px, $radius2:3px) {
-webkit-border-radius: $radius1 $radius2 $radius1 $radius2;
-moz-border-radius: $radius1 $radius2 $radius1 $radius2;
border-radius: $radius1 $radius2 $radius1 $radius2;
}
@mixin box-shadow($xlength:0, $ylength:2px, $size:0, $color:rgba(30,30,30,0.25)) {
-webkit-box-shadow: $xlength $ylength $size $color;
-moz-box-shadow: $xlength $ylength $size $color;
box-shadow: $xlength $ylength $size $color;
}
@mixin keyframes($name) {
@-webkit-keyframes #{$name} {
@content;
}
@-moz-keyframes #{$name} {
@content;
}
@-o-keyframes #{$name} {
@content;
}
@keyframes #{$name} {
@content;
}
}
@mixin animation ($delay, $duration, $animation) {
-webkit-animation-delay: $delay;
-webkit-animation-duration: $duration;
-webkit-animation-name: $animation;
-webkit-animation-fill-mode: forwards;
-moz-animation-delay: $delay;
-moz-animation-duration: $duration;
-moz-animation-name: $animation;
-moz-animation-fill-mode: forwards;
animation-delay: $delay;
animation-duration: $duration;
animation-name: $animation;
animation-fill-mode: forwards;
}
// link effect
@mixin ripple($color: $pink) {
position: relative;
display: inline-block;
text-align: center;
@include transition;
&::after {
display: inline-block;
content: "";
background: $color;
height: 3px;
width: 10%;
opacity: 0;
margin: -0.75em auto 0;
@include transition;
}
&:hover::after {
width: 100%;
opacity: 1;
}
}