Newer
Older
$test-color-7: #257471;
$test-color-8: #68633f;
$test-color-9: rgb(0, 161, 255);
$test-color-10: #00ff58;
$test-color-11: #3e3d12;
$test-color-12: #f00;
@mixin uw-no-breakout {
//-ms-hyphens: auto;
//-moz-hyphens: auto;
//-webkit-hyphens: auto;
//hyphens: auto;
overflow-wrap: break-word;
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
word-wrap: break-word;
}
@mixin uw-contained-width($value:$max-width) {
Eric Bremner
committed
margin-left: auto;
margin-right: auto;
padding: 0 gesso-spacing(sm);
@include xl{
padding-left:0;
padding-right:0;
Eric Bremner
committed
}
@mixin uw-full-width {
max-width: 100%;
padding: 0;
Eric Bremner
committed
width: 100%;
}
@mixin uw-full-width-padding {
max-width: 100%;
padding: 0 gesso-spacing(sm);
width: 100%;
}
@mixin uw-full-width-margin {
left: 50%;
margin-left: -50vw;
margin-right: -50vw;
max-width: 100vw;
position: relative;
right: 50%;
width: 100vw;
}
Martin Leblanc
committed
left: inherit;
Martin Leblanc
committed
margin-right: -2rem;
max-width: inherit;
padding:inherit;
Martin Leblanc
committed
right: inherit;
width: inherit;
@mixin uw-contained-width-reset() {
margin-left:inherit;
margin-right: inherit;
max-width:inherit;
padding: inherit;
@include xl{
padding-left:inherit;
padding-right:inherit;
}
}
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
// Flexbox display
@mixin flexbox {
display: flex;
}
// Inline flex display
@mixin inline-flex {
display: inline-flex;
}
// The 'flex' shorthand
// - applies to: flex items
// <positive-number>, initial, auto, or none
@mixin flex($fg: 1, $fs: 0, $fb: auto) {
// Set a variable to be used by box-flex properties
$fg-boxflex: $fg;
// Box-Flex only supports a flex-grow value so lets grab the
// first item in the list and just return that.
@if type-of($fg) == 'list' {
$fg-boxflex: nth($fg, 1);
}
-webkit-box: $fg-boxflex;
-moz-box: $fg-boxflex;
-webkit-flex: $fg $fs $fb;
-ms-flex: $fg $fs $fb;
flex: $fg $fs $fb;
}
// Flex Flow Direction
// - applies to: flex containers
// row (default) | row-reverse | column | column-reverse
@mixin flex-direction($direction: row) {
@if $direction == row-reverse {
-webkit-box-direction: reverse;
-moz-box-direction: reverse;
-webkit-box-orient: horizontal;
-moz-box-orient: horizontal;
} @else if $direction == column {
-webkit-box-direction: normal;
-moz-box-direction: normal;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
} @else if $direction == column-reverse {
-webkit-box-direction: reverse;
-moz-box-direction: reverse;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
} @else {
-webkit-box-direction: normal;
-moz-box-direction: normal;
-webkit-box-orient: horizontal;
-moz-box-orient: horizontal;
}
-ms-flex-direction: $direction;
-webkit-flex-direction: $direction;
flex-direction: $direction;
}
// Flex Line Wrapping
// - applies to: flex containers
// nowrap | wrap | wrap-reverse
@mixin flex-wrap($value: nowrap) {
// No Webkit/FF Box fallback.
-webkit-flex-wrap: $value;
@if $value == nowrap {
-ms-flex-wrap: none;
} @else {
-ms-flex-wrap: $value;
}
flex-wrap: $value;
}
// Flex Direction and Wrap
// - applies to: flex containers
// <flex-direction> || <flex-wrap>
@mixin flex-flow($values: (row nowrap)) {
// No Webkit/FF Box fallback.
-webkit-flex-flow: $values;
-ms-flex-flow: $values;
flex-flow: $values;
}
// Display Order
// - applies to: flex items
// <integer>
@mixin order($int: 0) {
-webkit-box-ordinal-group: $int + 1;
-moz-box-ordinal-group: $int + 1;
-ms-flex-order: $int;
-webkit-order: $int;
order: $int;
}
// Flex grow factor
// - applies to: flex items
// <number>
@mixin flex-grow($int: 1) {
-webkit-box-flex: $int;
-moz-box-flex: $int;
-ms-flex: $int;
-webkit-flex-grow: $int;
flex-grow: $int;
}
// Flex shrink
// - applies to: flex item shrink factor
// <number>
@mixin flex-shrink($int: 0) {
-ms-flex: $int;
-webkit-flex-shrink: $int;
-moz-flex-shrink: $int;
flex-shrink: $int;
}
// Flex basis
// - the initial main size of the flex item
// - applies to: flex itemsnitial main size of the flex item
// <width>
@mixin flex-basis($value: auto) {
-webkit-flex-basis: $value;
flex-basis: $value;
}
// Axis Alignment
// - applies to: flex containers
// flex-start | flex-end | center | space-between | space-around
@mixin justify-content($value: flex-start) {
@if $value == flex-start {
-webkit-box-pack: start;
-moz-box-pack: start;
-ms-flex-pack: start;
} @else if $value == flex-end {
-webkit-box-pack: end;
-moz-box-pack: end;
-ms-flex-pack: end;
} @else if $value == space-between {
-webkit-box-pack: justify;
-moz-box-pack: justify;
-ms-flex-pack: justify;
} @else if $value == space-around {
-ms-flex-pack: distribute;
} @else {
-webkit-box-pack: $value;
-moz-box-pack: $value;
-ms-flex-pack: $value;
}
-webkit-justify-content: $value;
justify-content: $value;
}
// Packing Flex Lines
// - applies to: multi-line flex containers
// flex-start | flex-end | center | space-between | space-around | stretch
@mixin align-content($value: stretch) {
// No Webkit Box Fallback.
-webkit-align-content: $value;
@if $value == flex-start {
-ms-flex-line-pack: start;
} @else if $value == flex-end {
-ms-flex-line-pack: end;
} @else {
-ms-flex-line-pack: $value;
}
align-content: $value;
}
// Cross-axis Alignment
// - applies to: flex containers
// flex-start | flex-end | center | baseline | stretch
@mixin align-items($value: stretch) {
@if $value == flex-start {
-webkit-box-align: start;
-moz-box-align: start;
-ms-flex-align: start;
} @else if $value == flex-end {
-webkit-box-align: end;
-moz-box-align: end;
-ms-flex-align: end;
} @else {
-webkit-box-align: $value;
-moz-box-align: $value;
-ms-flex-align: $value;
}
-webkit-align-items: $value;
align-items: $value;
}
// Cross-axis Alignment
// - applies to: flex items
// auto | flex-start | flex-end | center | baseline | stretch
@mixin align-self($value: auto) {
// No Webkit Box Fallback.
-webkit-align-self: $value;
@if $value == flex-start {
-ms-flex-item-align: start;
} @else if $value == flex-end {
-ms-flex-item-align: end;
} @else {
-ms-flex-item-align: $value;
}
align-self: $value;
}
// Display of elements in gridded style.
@mixin uw-flex-grid($value: flexbox){
@if $value == inline-flex {
@include inline-flex();
}@else if $value == card{
@include flexbox();
@include flex-direction(column);
@include flexbox();
@include flex-flow(row wrap);
}
// Display of grid item.
@mixin uw-flex-grid-item(){
@include flex();
@include align-items(flex-start);
width:100%;
.uw-contained-width--narrow &,
.layout--uw-inverted-l-right &,
.layout--uw-inverted-l-left &,
.layout--uw-2-col &,
.layout--uw-3-col &,
.layout--uw-4-col &{
width:100% !important;
}
.uw-contained-width--wide &{
width:45% !important;
}
// Display of list item.
@mixin uw-flex-term-item(){
width:100%;
@include flex(1 1 auto);
@include flex-grow(1);
width: 45%;
}
}
// Display of elements in mosaic style.
@mixin uw-flex-mosaic(){