-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_00-mixins.scss
More file actions
253 lines (219 loc) · 5.57 KB
/
_00-mixins.scss
File metadata and controls
253 lines (219 loc) · 5.57 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
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
/////////////////////
// General Mixins (put specific ones in component files where applicable)
/// Mixin - Clearfix.
/// Adds clearfix based on http://bourbon.io/docs/#clearfix
/// use example = @include cleafix
@mixin clearfix {
&::after {
clear: both;
content: "";
display: table;
}
}
/// Mixin - list-reset
/// Reset list item defaults when no margin, padding, list styles needed
@mixin list-reset {
list-style: none;
margin: 0;
padding: 0;
}
/// Mixin - With Icon
/// Precede Text with SVG icon
@mixin with-icon {
background-size: cover;
content: "";
display: inline-block;
margin-right: 0.1em;
padding: 0.8em;
}
/// Mixin - More Link
/// Used in a number of views
@mixin more-link {
a {
font-size: 1.2rem;
line-height: 1.8rem;
font-weight: 600;
text-decoration: none;
&::before {
content: "»";
font-size: 1.2rem;
margin-right: 0.2em;
}
}
}
/// Mixin - Back Link
/// Used in a number of views
@mixin back-link {
display: block;
font-size: 1.2rem;
line-height: 1.8rem;
font-weight: 600;
text-decoration: none;
&::before {
content: "«";
font-size: 1.2rem;
margin-right: 0.2em;
}
}
/// Mixin - Body Copy
@mixin body-copy {
font-family: $font-body;
font-size: 1.2rem;
line-height: 2rem;
}
/// Mixin - Transition
@mixin transition($transition-property, $transition-time, $method) {
-webkit-transition: $transition-property $transition-time $method;
-moz-transition: $transition-property $transition-time $method;
-ms-transition: $transition-property $transition-time $method;
-o-transition: $transition-property $transition-time $method;
transition: $transition-property $transition-time $method;
}
/// Mixin - Standard Margin
@mixin margin {
margin-bottom: 1em;
}
@mixin fontawesome-far {
font-family: "Font Awesome 5 Free", "ars-maquette-web", sans-serif;
font-weight: 400;
}
@mixin fontawesome-fas {
font-family: "Font Awesome 5 Free", "ars-maquette-web", sans-serif;
font-weight: 900;
}
@mixin visually-hidden {
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px);
overflow: hidden;
height: 1px;
width: 1px;
word-wrap: normal;
}
@mixin dark-blue-stripe {
background-color: $dark-blue;
color: $white;
}
@mixin med-blue-stripe {
background-color: $med-blue;
color: $white;
}
// Set up container to vertically space its contents across the entire viewport
// Stick footer to bottom of page when there isn't enough content in the body.
// Loosely based on this fiddle: http://jsfiddle.net/n5BaR/
@mixin full-viewport {
display: flex;
flex-direction: column;
min-height: 100vh;
& #main-content {
flex: 1 1 auto;
}
}
@mixin rounded-corners {
border-radius: 0.25rem;
}
// BACKGROUNDS: Possible focus colors (4.5+ vs background)
// $white (#ffffff): $med-blue $green $gray $raspberry $dark-blue $dark-red $charcoal $black
// (#e5e5e5): $gray $raspberry $dark-blue $dark-red $charcoal $black
// $pale-gray (#e2dfdd): $raspberry $dark-blue $dark-red $charcoal $black
// $med-blue (#0077cc): $white $black
// $green (#5c7f1a): $white $black
// $raspberry (#a20067): $white $pale-gray $pale-blue $yellow
// $dark-blue (#004876): $white $pale-gray $pale-blue $yellow $light-orange
// $dark-red (#6f263d): $white $pale-gray $pale-blue $yellow $light-orange
// $charcoal (#1a1a1a): $white $pale-gray $pale-blue $yellow $light-orange $light-blue $orange
// $black (#000000): $white $pale-gray $pale-blue $yellow $light-orange $light-blue $orange $red $med-blue $green
//
// Background: focus color
// $white (#ffffff): $dark-blue
// (#e5e5e5): $dark-blue
// $pale-gray (#e2dfdd): $dark-blue
// $med-blue (#0077cc): $white
// $green (#5c7f1a): $white
// $raspberry (#a20067): $white
// $dark-blue (#004876): $white
// $dark-red (#6f263d): $white
// $charcoal (#1a1a1a): $white
// $black (#000000): $white
//
// Exceptions:
// unified search on homepage uses $light-orange on $dark-blue because it's otherwise confusing with the white form fields
@mixin focus($color: $dark-blue, $type:false) {// default should work against default white background
&:focus {
outline-offset: 2px;
outline: 3px solid $color;
@if $type == "link" {
text-decoration: underline solid;
}
}
}
// Force table to not be like tables anymore
@mixin untablify() {
&,
thead,
tbody,
th,
td,
tr {
display: block;
height: 100%;
}
thead {
@include visually-hidden;
}
th,
td {
border-bottom: none;
display: flex;
flex-flow: row wrap;
padding: 1rem;
box-sizing: border-box;
}
td {
/* Behave like a "row" */
border: none;
position: relative;
}
th[scope=row] {
width: auto;
}
tbody tr:first-of-type {
border-top: 1px solid $gray-lighter;
}
.col-header {
display: inline-block;
font-weight: bold;
padding-right: 0;
width: 100%;
word-break: break-all;
}
.col-content {
width: 100%;
padding-left: 2rem;
}
@include breakpoint($small-width) {
.col-header {
width: 50%;
padding-right: 1rem;
}
.col-content {
width: 50%;
padding-left: 0;
}
}
@include breakpoint($medium-width) {
.col-header {
width: 33%;
}
.col-content {
width: 67%;
}
}
@include breakpoint($large-width) {
.col-header {
width: 20%;
}
.col-content {
width: 80%;
}
}
}