-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_position.scss
More file actions
44 lines (37 loc) · 800 Bytes
/
_position.scss
File metadata and controls
44 lines (37 loc) · 800 Bytes
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
/**
* ko-position
* =================================
* Usage:
* @include ko-position(absolute, 10px 20px 30px 10px);
*/
@mixin ko-position ($position: relative, $coordinates: 0 0 0 0) {
@if type-of($position) == list {
$coordinates: $position;
$position: relative;
}
$top: nth($coordinates, 1);
$right: nth($coordinates, 2);
$bottom: nth($coordinates, 3);
$left: nth($coordinates, 4);
position: $position;
@if $top == auto {
top: $top;
} @else if not(unitless($top)) {
top: $top;
}
@if $right == auto {
right: $right;
} @else if not(unitless($right)) {
right: $right;
}
@if $bottom == auto {
bottom: $bottom;
} @else if not(unitless($bottom)) {
bottom: $bottom;
}
@if $left == auto {
left: $left;
} @else if not(unitless($left)) {
left: $left;
}
}