-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_toolkit.scss
72 lines (63 loc) · 1.56 KB
/
_toolkit.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
// rem fallback - credits: http://zerosixthree.se/
@mixin font-size($size: 1.6) {
font-size: $size;
font-size: ($size / 16px) * 1rem;
}
@mixin opacity($opacity) {
opacity: $opacity;
$opacity-ie: $opacity * 100;
filter: alpha(opacity=$opacity-ie); //IE8
}
@mixin font-smoothing {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
// center vertically and/or horizontally an absolute positioned element
@mixin center($xy:xy) {
@if $xy == xy {
left: 50%;
top: 50%;
bottom: auto;
right: auto;
@include transform(translateX(-50%) translateY(-50%));
}
@else if $xy == x {
left: 50%;
right: auto;
@include transform(translateX(-50%));
}
@else if $xy == y {
top: 50%;
bottom: auto;
@include transform(translateY(-50%));
}
}
// Vertical Align
@mixin vertical-align($height: 50%) {
position: relative;
top: $height;
-webkit-transform: translateY(-$height);
-ms-transform: translateY(-$height);
transform: translateY(-$height);
}
// Calculate em values
@function em($target, $context: $base__font-size) {
@return ($target / $context) * 1em;
}
// Background Size
@mixin background-size($size: cover) {
-webkit-background-size: $size;
-moz-background-size: $size;
-o-background-size: $size;
background-size: $size;
}
@mixin box-sizing($box-model:border-box) {
-webkit-box-sizing: $box-model; // Safari <= 5
-moz-box-sizing: $box-model; // Firefox <= 19
box-sizing: $box-model;
}
// Size
@mixin size($width, $height: $width) {
width: $width;
height: $height;
}