-
Notifications
You must be signed in to change notification settings - Fork 0
/
yxqdlj.css
82 lines (75 loc) · 1.56 KB
/
yxqdlj.css
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
// Strip the units from a value
@function strip-units($value) {
@return $value / ($value * 0 + 1);
}
// Calculate ems from a px value
@function em($px, $base-val: 16px) {
@if not unitless($px) {
$px: strip-units($px);
}
@if not unitless($base-val) {
$base-val: strip-units($base-val);
}
@return ($px / $base-val) * 1em;
}
// Managing Z-Layers & icon font names
@function z($layer: "base") {
@if not map-has-key($z-layers, $layer) {
@warn "No z-index found in $z-layers map for '#{$layer}'. Property omitted.";
}
@return map-get($z-layers, $layer);
}
// Clearfix
@mixin clearfix {
&:before,
&:after {
display: table;
content: "";
}
&:after {
clear: both;
}
}
// Sizing
@mixin size($width, $height: $width) {
width: $width;
height: $height;
}
// Align the right way
@mixin align($horizontal: true, $vertical: true) {
position: absolute;
@if ($horizontal and $vertical) {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} @else if ($horizontal) {
left: 50%;
transform: translate(-50%, 0);
} @else if ($vertical) {
top: 50%;
transform: translate(0, -50%);
}
}
@mixin visual-hide() {
border: 0;
clip: rect(0 0 0 0); height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
@mixin filter($opacity: 0.3, $background: #000) {
&:before {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
display: block;
content: " ";
background: $background;
opacity: $opacity;
transition: opacity 0.3s ease;
}
}