-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path_mixins.scss
80 lines (63 loc) · 1.69 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
/* Scott's Dope Mixins v0.4*/
/* A less configurable but more areodynamic transition mixin */
@mixin trans($sec: 0.2s) {
-webkit-transition: all $sec ease-out;
-moz-transition: all $sec ease-out;
-ms-transition: all $sec ease-out;
-o-transition: all $sec ease-out;
transition: all $sec ease-out;
}
/* Removes margin and padding and list style from lists */
@mixin noList {
padding: 0;
margin: 0;
li {
padding: 0;
margin: 0;
list-style: none;
}
}
/* Lightens background color on hover */
@mixin hovLight ($color) {
background: $color;
&:hover {
background: $color + 30;
}
}
/* Darkens background color on hover */
@mixin hovDark ($color) {
background: $color;
&:hover {
background: $color - 30;
}
}
/* A re-useable font mixin for whatever fonts you are using, allows for an optional color argument */
@mixin serif($size, $color:"") {
color: $color;
font: italic normal $size 'Droid Serif';
}
/* Cross browser opacity */
@mixin opacity($opacity) {
opacity: $opacity;
$opacity-ie: $opacity * 100;
filter: alpha(opacity=$opacity-ie); //IE8
}
/* REMS with a PX Fallback */
@function calculateRem($size) {
$remSize: $size / 16px;
@return $remSize * 1rem;
}
@mixin font-size($size) {
font-size: $size;
font-size: calculateRem($size);
}
/* REQUIRES COMPASS */
/* Faster gradients, if a stop is not specified a -20 of the start
is assigned for you this may be adjustable in the near future */
@mixin gradient($start, $stop:false) {
@if $stop {
@include background-image(linear-gradient($start, $stop));
} @else {
@include background-image(linear-gradient($start, $start - 20));
}
}