forked from colmtuite/styleguide-export
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpositioning.scss
More file actions
125 lines (107 loc) · 2.4 KB
/
Copy pathpositioning.scss
File metadata and controls
125 lines (107 loc) · 2.4 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
//
// Positioning
// -------------------------
// Pin an element to the top left edge of its parent.
// -------------------------
.posPinTL {
@extend .position-absolute;
top: 0;
left: 0;
}
// Pin an element to the top right edge of its parent.
// -------------------------
.posPinTR {
@extend .position-absolute;
top: 0;
right: 0;
}
// Pin an element to the bottom left edge of its parent.
// -------------------------
.posPinBL {
@extend .position-absolute;
bottom: 0;
left: 0;
}
// Pin an element to the bottom left edge of its parent.
// -------------------------
.posPinBR {
@extend .position-absolute;
bottom: 0;
right: 0;
}
// Absolutely center an element vertically and horizontally
// -------------------------
.absolutelyCenter {
@extend .position-absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
// Fix an element to the top left edge.
// -------------------------
.posFixTL {
@extend .position-fixed;
top: 0;
left: 0;
}
// Fix an element to the top right edge.
// -------------------------
.posFixTR {
@extend .position-fixed;
top: 0;
right: 0;
}
// Fix an element to the bottom left edge.
// -------------------------
.posFixBL {
@extend .position-fixed;
bottom: 0;
left: 0;
}
// Fix an element to the bottom left edge.
// -------------------------
.posFixBR {
@extend .position-fixed;
bottom: 0;
right: 0;
}
// Make an element fill the available space while being pinned. Used where pinning to all corners
// yields results that we don't want.
// -------------------------
.posFill{
@extend .position-absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
// Pin an element to all corners. But when a width and/or height are
// provided, the element will be centered in its nearest
// relatively-positioned ancestor.
// -------------------------
.posPinAll {
@extend .position-absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
// Fix an element to all corners.
// -------------------------
.posFixAll {
@extend .position-fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
// Fix an element to all corners.
// -------------------------
.posOffScreen {
@extend .position-absolute;
top: -999999px;
left: -999999px;
}