-
-
Notifications
You must be signed in to change notification settings - Fork 529
/
Copy path_utility.scss
223 lines (186 loc) · 3.74 KB
/
_utility.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
// =Utility Classes
// These silent classes, called with @extend, and never output to CSS unless specifically called.
// example:
// @extend %ir;
@mixin ir {
/* IE 6/7 fallback */
*text-indent: -9999px;
background-color: transparent;
border: 0;
overflow: hidden;
&:before {
content: "";
display: block;
height: 150%;
width: 0;
}
}
// Image Replacement
%ir {
@include ir;
}
%outer-container {
@include grid-container;
margin-left: auto;
margin-right: auto;
max-width: 1200px;
}
@mixin awesome-font() {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands';
font-weight: 900;
}
%pseudo-font {
@include awesome-font;
}
@mixin absolute-corners {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
%absolute-corners {
@include absolute-corners;
}
%pseudo-font-x-btn {
@extend %pseudo-font;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
line-height: 100%;
width: 100%;
height: 100%;
font-size: 14px;
color: inherit;
text-align: center;
}
%nav-item {
&:hover {
background: $lighterGray;
}
}
// Hide from both screenreaders and browsers: h5bp.com/u
%hidden {
display: none !important;
visibility: hidden;
}
// Hide only visually, but have it available for screenreaders: h5bp.com/v
%visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
// Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p
%focusable:active,
%focusable:focus {
@extend %visuallyhidden;
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
}
// Hide visually and from screenreaders, but maintain layout
%invisible {
visibility: hidden;
}
// Clearfix: contain floats
%clearfix {
.lt-ie8 {
*zoom: 1;
}
&:before,
&:after {
content: " "; /* 1 */
display: table; /* 2 */
}
&:after {
clear: both;
}
}
// Helper class to fix some Mozilla Flexbox issues. See _flexbox.scss
@-moz-document url-prefix() {
%mozbox {
box-sizing: border-box;
width: 100%;
}
}
/* Instead of writing the same code for every nav bar */
@mixin navigation-list {
list-style-type: none;
margin: 0;
overflow: hidden;
padding: 0;
>li {
display: block;
float: left;
&:last-child {
margin-right: 0;
}
}
}
@mixin navigation-break-list($break: 48em) {
list-style-type: none;
margin: 0;
overflow: hidden;
padding: 0;
>li {
@media only screen and (min-width: $break) {
display: block;
float: left;
&:last-child {
margin-right: 0;
}
}
}
}
@mixin responsive-table-bar() {
table:not(#modx-tree-panel-usergroup table, #modx-grid-lexicon table, #modx-panel-property-sets) {
display: block;
tbody {
display: block;
tr {
@include grid-container;
margin-left: auto;
margin-right: auto;
max-width: 1200px;
display: flex;
flex-wrap: wrap;
td {
display: inline-block;
float: left;
padding: 0 !important;
margin-bottom: 1em;
flex-grow: 1;
.x-btn {
margin-left: 3px;
margin-right: 3px;
}
}
}
}
}
}
@mixin textLink {
color: $colorSplash;
text-decoration-style: dotted;
text-decoration-color: scale-color($colorSplash, $lightness: 50%);
&:hover {
color: $black;
border-bottom-color: scale-color($black, $lightness: 40%);
}
}