scut 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/dist/_scut.scss +1426 -0
- data/lib/scut.rb +10 -0
- metadata +61 -0
data/dist/_scut.scss
ADDED
@@ -0,0 +1,1426 @@
|
|
1
|
+
/*
|
2
|
+
* Scut, a collection of Sass utilities to ease and improve our implementations of common style-code patterns.
|
3
|
+
* v0.5.0
|
4
|
+
* Docs at http://davidtheclark.github.io/scut
|
5
|
+
*/
|
6
|
+
|
7
|
+
// SCUT CLEARFIX
|
8
|
+
// http://davidtheclark.github.io/scut/#clearfix
|
9
|
+
|
10
|
+
@mixin scut-clearfix {
|
11
|
+
|
12
|
+
&:after {
|
13
|
+
content: "";
|
14
|
+
display: table;
|
15
|
+
clear: both;
|
16
|
+
}
|
17
|
+
|
18
|
+
}
|
19
|
+
|
20
|
+
%scut-clearfix {
|
21
|
+
@include scut-clearfix;
|
22
|
+
}
|
23
|
+
|
24
|
+
// SCUT LIST: UNSTYLED
|
25
|
+
// http://davidtheclark.github.io/scut/#list_unstyled
|
26
|
+
|
27
|
+
@mixin scut-list-unstyled {
|
28
|
+
|
29
|
+
list-style-type: none;
|
30
|
+
margin: 0;
|
31
|
+
padding: 0;
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
%scut-list-unstyled {
|
36
|
+
@include scut-list-unstyled;
|
37
|
+
}
|
38
|
+
|
39
|
+
// SCUT LIST: FLOATED
|
40
|
+
// http://davidtheclark.github.io/scut/#list_floated
|
41
|
+
|
42
|
+
// Depends on `list-unstyled` and `clearfix`.
|
43
|
+
|
44
|
+
@mixin scut-list-floated (
|
45
|
+
$space: false,
|
46
|
+
$dir: left
|
47
|
+
) {
|
48
|
+
|
49
|
+
@include scut-list-unstyled;
|
50
|
+
@include scut-clearfix;
|
51
|
+
|
52
|
+
& > li {
|
53
|
+
float: $dir;
|
54
|
+
}
|
55
|
+
|
56
|
+
@if $space {
|
57
|
+
& > li + li {
|
58
|
+
margin-#{$dir}: $space;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
}
|
63
|
+
|
64
|
+
%scut-list-floated {
|
65
|
+
@include scut-list-floated;
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
// SCUT POSITIONING: COORDINATES
|
70
|
+
// http://davidtheclark.github.io/scut/#positioning_coordinates
|
71
|
+
|
72
|
+
@function scut-autoOrValue ($val) {
|
73
|
+
@if $val == a or $val == auto {
|
74
|
+
@return auto;
|
75
|
+
}
|
76
|
+
@else {
|
77
|
+
@return $val;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
@mixin scut-coords (
|
82
|
+
$coordinates: n n n n
|
83
|
+
) {
|
84
|
+
|
85
|
+
$top: nth($coordinates, 1);
|
86
|
+
$right: nth($coordinates, 2);
|
87
|
+
$bottom: nth($coordinates, 3);
|
88
|
+
$left: nth($coordinates, 4);
|
89
|
+
|
90
|
+
@if $top != n {
|
91
|
+
top: scut-autoOrValue($top);
|
92
|
+
}
|
93
|
+
@if $right != n {
|
94
|
+
right: scut-autoOrValue($right);
|
95
|
+
}
|
96
|
+
@if $bottom != n {
|
97
|
+
bottom: scut-autoOrValue($bottom);
|
98
|
+
}
|
99
|
+
@if $left != n {
|
100
|
+
left: scut-autoOrValue($left);
|
101
|
+
}
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
// SCUT STRIP UNIT
|
106
|
+
// http://davidtheclark.github.io/scut/#strip_unit
|
107
|
+
|
108
|
+
@function scut-strip-unit (
|
109
|
+
$num
|
110
|
+
) {
|
111
|
+
|
112
|
+
@return $num / ($num * 0 + 1);
|
113
|
+
|
114
|
+
}
|
115
|
+
|
116
|
+
// SCUT PIXELS TO EMS
|
117
|
+
// http://davidtheclark.github.io/scut/#pixels-to-ems
|
118
|
+
|
119
|
+
// Depends on `scut-strip-unit`.
|
120
|
+
|
121
|
+
@function scut-em (
|
122
|
+
$pixels,
|
123
|
+
$base: 16
|
124
|
+
) {
|
125
|
+
|
126
|
+
// $base could be in em or px (no unit = px).
|
127
|
+
// Adjust accordingly to create a $divisor that
|
128
|
+
// serves as context for $pixels.
|
129
|
+
$multiplier: if(unit($base) == em, 16, 1);
|
130
|
+
$divisor: scut-strip-unit($base) * $multiplier;
|
131
|
+
|
132
|
+
@return ($pixels / $divisor) * 1em;
|
133
|
+
|
134
|
+
}
|
135
|
+
|
136
|
+
// SCUT BORDER
|
137
|
+
// http://davidtheclark.github.io/scut/#border
|
138
|
+
|
139
|
+
@mixin scut-border (
|
140
|
+
$style,
|
141
|
+
$sides: n y
|
142
|
+
) {
|
143
|
+
|
144
|
+
@if length($sides) == 2 {
|
145
|
+
@if nth($sides, 1) != n {
|
146
|
+
border-top: $style;
|
147
|
+
border-bottom: $style;
|
148
|
+
}
|
149
|
+
@if nth($sides, 2) != n {
|
150
|
+
border-left: $style;
|
151
|
+
border-right: $style;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
@else if length($sides) == 4 {
|
156
|
+
@if nth($sides, 1) != n {
|
157
|
+
border-top: $style;
|
158
|
+
}
|
159
|
+
@if nth($sides, 2) != n {
|
160
|
+
border-right: $style;
|
161
|
+
}
|
162
|
+
@if nth($sides, 3) != n {
|
163
|
+
border-bottom: $style;
|
164
|
+
}
|
165
|
+
@if nth($sides, 4) != n {
|
166
|
+
border-left: $style;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
@else {
|
171
|
+
@warn "Scut-border requires a $sides argument of 2 or 4 values."
|
172
|
+
}
|
173
|
+
|
174
|
+
}
|
175
|
+
|
176
|
+
// SCUT CIRCLE
|
177
|
+
// http://davidtheclark.github.io/scut/#circle
|
178
|
+
|
179
|
+
@mixin scut-circle (
|
180
|
+
$size,
|
181
|
+
$color: inherit
|
182
|
+
) {
|
183
|
+
|
184
|
+
border-radius: 50%;
|
185
|
+
display: inline-block;
|
186
|
+
|
187
|
+
@if $color == inherit {
|
188
|
+
// If user wants to inherit the color,
|
189
|
+
// take advantage of the fact that border
|
190
|
+
// color defaults to the text color of the element.
|
191
|
+
border-width: $size / 2;
|
192
|
+
border-style: solid;
|
193
|
+
height: 0;
|
194
|
+
width: 0;
|
195
|
+
}
|
196
|
+
@else {
|
197
|
+
// Otherwise, just use background-color.
|
198
|
+
background-color: $color;
|
199
|
+
height: $size;
|
200
|
+
width: $size;
|
201
|
+
}
|
202
|
+
|
203
|
+
}
|
204
|
+
|
205
|
+
// SCUT COLOR SWAP
|
206
|
+
// http://davidtheclark.github.io/scut/#color_swap
|
207
|
+
|
208
|
+
@mixin scut-color-swap (
|
209
|
+
$off,
|
210
|
+
$on,
|
211
|
+
$duration: 0,
|
212
|
+
$bg: false
|
213
|
+
) {
|
214
|
+
|
215
|
+
$transition-properties: null;
|
216
|
+
$off-is-list: type-of($off) == list;
|
217
|
+
$on-is-list: type-of($on) == list;
|
218
|
+
|
219
|
+
// If $off IS a list,
|
220
|
+
// assign color and background-color.
|
221
|
+
@if $off-is-list {
|
222
|
+
color: nth($off, 1);
|
223
|
+
background-color: nth($off, 2);
|
224
|
+
$transition-properties: background-color, color;
|
225
|
+
}
|
226
|
+
|
227
|
+
// If $off IS NOT a list and $bg is TRUE,
|
228
|
+
// assign background-color.
|
229
|
+
@else if $bg and not $off-is-list {
|
230
|
+
background-color: $off;
|
231
|
+
$transition-properties: background-color;
|
232
|
+
}
|
233
|
+
|
234
|
+
// If $off IS NOT a list and $bg is FALSE,
|
235
|
+
// assign color.
|
236
|
+
@else {
|
237
|
+
color: $off;
|
238
|
+
$transition-properties: color;
|
239
|
+
}
|
240
|
+
|
241
|
+
// Only set-up transition if $duration != 0.
|
242
|
+
@if $duration != 0 {
|
243
|
+
transition-property: $transition-properties;
|
244
|
+
transition-duration: $duration;
|
245
|
+
}
|
246
|
+
|
247
|
+
&:hover,
|
248
|
+
&:focus {
|
249
|
+
|
250
|
+
// $on is treated the same as $off, above.
|
251
|
+
@if $on-is-list {
|
252
|
+
color: nth($on, 1);
|
253
|
+
background-color: nth($on, 2);
|
254
|
+
}
|
255
|
+
|
256
|
+
@else if $bg and not $on-is-list {
|
257
|
+
background-color: $on;
|
258
|
+
}
|
259
|
+
|
260
|
+
@else {
|
261
|
+
color: $on;
|
262
|
+
}
|
263
|
+
}
|
264
|
+
|
265
|
+
}
|
266
|
+
|
267
|
+
// SCUT HD BREAKPOINT
|
268
|
+
// http://davidtheclark.github.io/scut/#hd_breakpoint
|
269
|
+
|
270
|
+
@mixin scut-hd-bp (
|
271
|
+
$ratio: 1.3
|
272
|
+
) {
|
273
|
+
|
274
|
+
@media (-o-min-device-pixel-ratio: #{$ratio}/1),
|
275
|
+
(-webkit-min-device-pixel-ratio: #{$ratio}),
|
276
|
+
(min-resolution: #{round(96 * $ratio)}dpi) {
|
277
|
+
@content;
|
278
|
+
}
|
279
|
+
|
280
|
+
}
|
281
|
+
|
282
|
+
// SCUT HIDE VISUALLY
|
283
|
+
// http://davidtheclark.github.io/scut/#hide_visually
|
284
|
+
|
285
|
+
@mixin scut-hide-visually {
|
286
|
+
|
287
|
+
border: 0;
|
288
|
+
clip: rect(0 0 0 0);
|
289
|
+
height: 1px;
|
290
|
+
margin: -1px;
|
291
|
+
overflow: hidden;
|
292
|
+
padding: 0;
|
293
|
+
position: absolute;
|
294
|
+
width: 1px;
|
295
|
+
|
296
|
+
}
|
297
|
+
|
298
|
+
%scut-hide-visually {
|
299
|
+
@include scut-hide-visually;
|
300
|
+
}
|
301
|
+
|
302
|
+
// SCUT IMAGE REPLACEMENT
|
303
|
+
// http://davidtheclark.github.io/scut/#image_replacement
|
304
|
+
|
305
|
+
@mixin scut-image-replace {
|
306
|
+
|
307
|
+
text-indent: 102%;
|
308
|
+
white-space: nowrap;
|
309
|
+
overflow: hidden;
|
310
|
+
|
311
|
+
}
|
312
|
+
|
313
|
+
%scut-image-replace {
|
314
|
+
@include scut-image-replace;
|
315
|
+
}
|
316
|
+
|
317
|
+
// SCUT RESET
|
318
|
+
// http://davidtheclark.github.io/scut/#reset
|
319
|
+
|
320
|
+
@mixin scut-reset-border-box {
|
321
|
+
// Make everything a border-box, because why not?
|
322
|
+
*, *:before, *:after {
|
323
|
+
-moz-box-sizing: border-box;
|
324
|
+
box-sizing: border-box;
|
325
|
+
}
|
326
|
+
}
|
327
|
+
|
328
|
+
@mixin scut-reset-antialias {
|
329
|
+
// Antialias!
|
330
|
+
body {
|
331
|
+
-webkit-font-smoothing: antialiased;
|
332
|
+
}
|
333
|
+
}
|
334
|
+
|
335
|
+
@mixin scut-reset-semanticize {
|
336
|
+
// Make headers and <b> semantic, not presentational.
|
337
|
+
h1,
|
338
|
+
h2,
|
339
|
+
h3,
|
340
|
+
h4,
|
341
|
+
h5,
|
342
|
+
h6 {
|
343
|
+
font-size: 1em;
|
344
|
+
font-weight: normal;
|
345
|
+
margin: 0;
|
346
|
+
}
|
347
|
+
b {
|
348
|
+
font-weight: normal;
|
349
|
+
}
|
350
|
+
}
|
351
|
+
|
352
|
+
@mixin scut-reset-pointer {
|
353
|
+
// Clickable form elements should have a pointer.
|
354
|
+
label,
|
355
|
+
input,
|
356
|
+
textarea,
|
357
|
+
select,
|
358
|
+
option,
|
359
|
+
button {
|
360
|
+
cursor: pointer;
|
361
|
+
}
|
362
|
+
}
|
363
|
+
|
364
|
+
@mixin scut-reset-form {
|
365
|
+
fieldset {
|
366
|
+
border: 0;
|
367
|
+
margin: 0;
|
368
|
+
padding: 0;
|
369
|
+
}
|
370
|
+
textarea {
|
371
|
+
resize: vertical;
|
372
|
+
}
|
373
|
+
}
|
374
|
+
|
375
|
+
@mixin scut-reset-button {
|
376
|
+
// Reset default button styles, which are never used.
|
377
|
+
button {
|
378
|
+
background: transparent;
|
379
|
+
border: 0;
|
380
|
+
color: inherit;
|
381
|
+
font: inherit;
|
382
|
+
margin: 0;
|
383
|
+
outline: none;
|
384
|
+
padding: 0;
|
385
|
+
width: auto;
|
386
|
+
-webkit-appearance: none;
|
387
|
+
-webkit-font-smoothing: antialiased;
|
388
|
+
}
|
389
|
+
}
|
390
|
+
|
391
|
+
@mixin scut-reset-paragraphs {
|
392
|
+
// Some paragraph margins just get in the way.
|
393
|
+
p:first-of-type {
|
394
|
+
margin-top: 0;
|
395
|
+
}
|
396
|
+
p:last-of-type {
|
397
|
+
margin-bottom: 0;
|
398
|
+
}
|
399
|
+
}
|
400
|
+
|
401
|
+
// Call them all!
|
402
|
+
@mixin scut-reset {
|
403
|
+
@include scut-reset-border-box;
|
404
|
+
@include scut-reset-antialias;
|
405
|
+
@include scut-reset-semanticize;
|
406
|
+
@include scut-reset-pointer;
|
407
|
+
@include scut-reset-form;
|
408
|
+
@include scut-reset-button;
|
409
|
+
@include scut-reset-paragraphs;
|
410
|
+
}
|
411
|
+
|
412
|
+
// SCUT SELECTED
|
413
|
+
// http://davidtheclark.github.io/scut/#selected
|
414
|
+
|
415
|
+
@mixin scut-selected (
|
416
|
+
$active: false
|
417
|
+
) {
|
418
|
+
|
419
|
+
@if $active {
|
420
|
+
&:hover,
|
421
|
+
&:focus,
|
422
|
+
&:active {
|
423
|
+
@content;
|
424
|
+
}
|
425
|
+
}
|
426
|
+
@else {
|
427
|
+
&:hover,
|
428
|
+
&:focus {
|
429
|
+
@content;
|
430
|
+
}
|
431
|
+
}
|
432
|
+
|
433
|
+
}
|
434
|
+
|
435
|
+
// SCUT TRIANGLE
|
436
|
+
// http://davidtheclark.github.io/scut/#triangle
|
437
|
+
|
438
|
+
@mixin scut-triangle (
|
439
|
+
$direction: right,
|
440
|
+
$size: 0.75em,
|
441
|
+
$color: inherit
|
442
|
+
) {
|
443
|
+
|
444
|
+
display: inline-block;
|
445
|
+
height: 0;
|
446
|
+
width: 0;
|
447
|
+
// For improved appearance in some Webkit browsers
|
448
|
+
-webkit-transform: rotate(360deg);
|
449
|
+
|
450
|
+
// Set up some variables
|
451
|
+
$width: null;
|
452
|
+
$height: null;
|
453
|
+
$border-widths: null;
|
454
|
+
|
455
|
+
@if type-of($size) == list {
|
456
|
+
$width: nth($size, 1);
|
457
|
+
$height: nth($size, 2);
|
458
|
+
}
|
459
|
+
@else {
|
460
|
+
$width: $size;
|
461
|
+
$height: $size;
|
462
|
+
}
|
463
|
+
|
464
|
+
@if ($direction == up) or ($direction == down) {
|
465
|
+
// For up and down, width gets two borders but height only one,
|
466
|
+
// so divide second border-width value by 2
|
467
|
+
$border-widths: $height ($width / 2);
|
468
|
+
}
|
469
|
+
@else if ($direction == right) or ($direction == left) {
|
470
|
+
// For right and left, height gets two borders but width only one,
|
471
|
+
// so divide first border-width value by 2
|
472
|
+
$border-widths: ($height / 2) $width;
|
473
|
+
}
|
474
|
+
@else {
|
475
|
+
// For right triangles (the rest), both sides get two borders,
|
476
|
+
// so divide both by 2
|
477
|
+
$border-widths: ($height / 2) ($width / 2);
|
478
|
+
}
|
479
|
+
|
480
|
+
border-width: $border-widths;
|
481
|
+
border-style: solid;
|
482
|
+
|
483
|
+
|
484
|
+
// STANDARD TRIANGLES
|
485
|
+
|
486
|
+
@if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) {
|
487
|
+
border-color: transparent;
|
488
|
+
@if $direction == up {
|
489
|
+
border-bottom-color: $color;
|
490
|
+
border-top-width: 0;
|
491
|
+
}
|
492
|
+
@else if $direction == right {
|
493
|
+
border-left-color: $color;
|
494
|
+
border-right-width: 0;
|
495
|
+
}
|
496
|
+
@else if $direction == down {
|
497
|
+
border-top-color: $color;
|
498
|
+
border-bottom-width: 0;
|
499
|
+
}
|
500
|
+
@else if $direction == left {
|
501
|
+
border-right-color: $color;
|
502
|
+
border-left-width: 0;
|
503
|
+
}
|
504
|
+
}
|
505
|
+
|
506
|
+
|
507
|
+
// CORNER TRIANGLES
|
508
|
+
|
509
|
+
@else if ($direction == top-right) or ($direction == top-left) {
|
510
|
+
border-top-color: $color;
|
511
|
+
border-bottom-color: transparent;
|
512
|
+
@if $direction == top-right {
|
513
|
+
border-left-color: transparent;
|
514
|
+
border-right-color: $color;
|
515
|
+
}
|
516
|
+
@else if $direction == top-left {
|
517
|
+
border-left-color: $color;
|
518
|
+
border-right-color: transparent;
|
519
|
+
}
|
520
|
+
}
|
521
|
+
|
522
|
+
@else if ($direction == bottom-right) or ($direction == bottom-left) {
|
523
|
+
border-top-color: transparent;
|
524
|
+
border-bottom-color: $color;
|
525
|
+
@if $direction == bottom-right {
|
526
|
+
border-left-color: transparent;
|
527
|
+
border-right-color: $color;
|
528
|
+
}
|
529
|
+
@else if $direction == bottom-left {
|
530
|
+
border-left-color: $color;
|
531
|
+
border-right-color: transparent;
|
532
|
+
}
|
533
|
+
}
|
534
|
+
|
535
|
+
}
|
536
|
+
|
537
|
+
%scut-triangle {
|
538
|
+
@include scut-triangle;
|
539
|
+
}
|
540
|
+
|
541
|
+
// SCUT CENTER ABSOLUTELY
|
542
|
+
// http://davidtheclark.github.io/scut/#center_absolutely
|
543
|
+
|
544
|
+
@mixin scut-center-absolutely (
|
545
|
+
$dimensions
|
546
|
+
) {
|
547
|
+
|
548
|
+
$width: nth($dimensions, 1);
|
549
|
+
$height: nth($dimensions, 2);
|
550
|
+
|
551
|
+
position: absolute;
|
552
|
+
|
553
|
+
@if $width != n {
|
554
|
+
width: $width;
|
555
|
+
left: 50%;
|
556
|
+
margin-left: (-$width / 2);
|
557
|
+
}
|
558
|
+
|
559
|
+
@if $height != n {
|
560
|
+
height: $height;
|
561
|
+
top: 50%;
|
562
|
+
margin-top: (-$height / 2);
|
563
|
+
}
|
564
|
+
|
565
|
+
}
|
566
|
+
|
567
|
+
// SCUT CENTER BLOCK
|
568
|
+
// http://davidtheclark.github.io/scut/#center_block
|
569
|
+
|
570
|
+
@mixin scut-center-block (
|
571
|
+
$max-width: false
|
572
|
+
) {
|
573
|
+
|
574
|
+
margin-left: auto;
|
575
|
+
margin-right: auto;
|
576
|
+
@if $max-width {
|
577
|
+
max-width: $max-width;
|
578
|
+
}
|
579
|
+
|
580
|
+
}
|
581
|
+
|
582
|
+
%scut-center-block {
|
583
|
+
@include scut-center-block;
|
584
|
+
}
|
585
|
+
|
586
|
+
|
587
|
+
// SCUT FILL
|
588
|
+
// http://davidtheclark.github.io/scut/#fill
|
589
|
+
|
590
|
+
@mixin scut-fill {
|
591
|
+
|
592
|
+
position: absolute;
|
593
|
+
left: 0;
|
594
|
+
top: 0;
|
595
|
+
width: 100%;
|
596
|
+
height: 100%;
|
597
|
+
|
598
|
+
}
|
599
|
+
|
600
|
+
%scut-fill {
|
601
|
+
@include scut-fill;
|
602
|
+
}
|
603
|
+
|
604
|
+
// SCUT FONTICON-LABEL
|
605
|
+
// http://davidtheclark.github.io/scut/#fonticon_label
|
606
|
+
|
607
|
+
@mixin scut-fonticon-label (
|
608
|
+
$font,
|
609
|
+
$glyph,
|
610
|
+
$space: 0.25em,
|
611
|
+
$side: before
|
612
|
+
) {
|
613
|
+
|
614
|
+
&:#{$side} {
|
615
|
+
content: $glyph;
|
616
|
+
font-family: $font;
|
617
|
+
font-style: normal;
|
618
|
+
font-weight: normal;
|
619
|
+
-webkit-font-smoothing: antialiased;
|
620
|
+
display: inline-block;
|
621
|
+
vertical-align: middle;
|
622
|
+
|
623
|
+
@if $side == before and $space != 0 {
|
624
|
+
margin-right: $space;
|
625
|
+
}
|
626
|
+
@else if $side == after and $space != 0 {
|
627
|
+
margin-left: $space;
|
628
|
+
}
|
629
|
+
|
630
|
+
// Add any additional styling.
|
631
|
+
@content;
|
632
|
+
|
633
|
+
}
|
634
|
+
|
635
|
+
}
|
636
|
+
|
637
|
+
|
638
|
+
// SCUT LIST: DIVIDED
|
639
|
+
// http://davidtheclark.github.io/scut/#list_divided
|
640
|
+
|
641
|
+
// Depends on `list-floated`, which depends in turn on `list-unstyled` and `clearfix`.
|
642
|
+
|
643
|
+
@mixin scut-list-divided (
|
644
|
+
$divider: "|",
|
645
|
+
$space: 0.5em,
|
646
|
+
$dir: left,
|
647
|
+
$height: false
|
648
|
+
) {
|
649
|
+
|
650
|
+
@include scut-list-floated($dir: $dir);
|
651
|
+
|
652
|
+
$pseudo: if($dir == left, 'before', 'after');
|
653
|
+
|
654
|
+
// If an explicit height is passed,
|
655
|
+
// things are different: All <li>s
|
656
|
+
// need the pseudo-element (to force height),
|
657
|
+
// but the first's must be hidden.
|
658
|
+
|
659
|
+
@if $height {
|
660
|
+
& > li {
|
661
|
+
height: $height;
|
662
|
+
}
|
663
|
+
& > li:#{$pseudo} {
|
664
|
+
height: $height;
|
665
|
+
content: $divider;
|
666
|
+
display: inline-block;
|
667
|
+
vertical-align: middle;
|
668
|
+
@content;
|
669
|
+
}
|
670
|
+
& > li:first-child:#{$pseudo} {
|
671
|
+
width: 0;
|
672
|
+
overflow: hidden;
|
673
|
+
}
|
674
|
+
}
|
675
|
+
|
676
|
+
& > li + li:#{$pseudo} {
|
677
|
+
@if not $height {
|
678
|
+
content: $divider;
|
679
|
+
display: inline-block;
|
680
|
+
@content;
|
681
|
+
}
|
682
|
+
margin-left: $space;
|
683
|
+
margin-right: $space;
|
684
|
+
}
|
685
|
+
|
686
|
+
}
|
687
|
+
|
688
|
+
%scut-list-bar {
|
689
|
+
@include scut-list-divided;
|
690
|
+
}
|
691
|
+
|
692
|
+
%scut-list-breadcrumb {
|
693
|
+
@include scut-list-divided("/");
|
694
|
+
}
|
695
|
+
|
696
|
+
// SCUT LIST: INLINE
|
697
|
+
// http://davidtheclark.github.io/scut/#list_inline
|
698
|
+
|
699
|
+
// Depends on `list-unstyled`.
|
700
|
+
|
701
|
+
@mixin scut-list-inline (
|
702
|
+
$space: false
|
703
|
+
) {
|
704
|
+
|
705
|
+
@include scut-list-unstyled;
|
706
|
+
|
707
|
+
& > li {
|
708
|
+
display: inline-block;
|
709
|
+
}
|
710
|
+
|
711
|
+
@if $space {
|
712
|
+
& > li + li {
|
713
|
+
margin-left: $space;
|
714
|
+
}
|
715
|
+
}
|
716
|
+
|
717
|
+
}
|
718
|
+
|
719
|
+
%scut-list-inline {
|
720
|
+
@include scut-list-inline;
|
721
|
+
}
|
722
|
+
|
723
|
+
// SCUT LIST: PUNCTUATED
|
724
|
+
// http://davidtheclark.github.io/scut/#list_punctuated
|
725
|
+
|
726
|
+
// Depends on `list-unstyled`.
|
727
|
+
|
728
|
+
@mixin scut-list-punctuated (
|
729
|
+
$divider: ", ",
|
730
|
+
$display: inline
|
731
|
+
) {
|
732
|
+
|
733
|
+
@include scut-list-unstyled;
|
734
|
+
|
735
|
+
& > li {
|
736
|
+
display: $display;
|
737
|
+
&:not(:last-child):after {
|
738
|
+
content: $divider;
|
739
|
+
}
|
740
|
+
}
|
741
|
+
|
742
|
+
}
|
743
|
+
|
744
|
+
%scut-list-comma {
|
745
|
+
@include scut-list-punctuated;
|
746
|
+
}
|
747
|
+
|
748
|
+
// SCUT MARGIN
|
749
|
+
// http://davidtheclark.github.io/scut/#margin
|
750
|
+
|
751
|
+
@mixin scut-margin (
|
752
|
+
$margin
|
753
|
+
) {
|
754
|
+
|
755
|
+
@if length($margin) == 1 and $margin != n {
|
756
|
+
margin-top: $margin;
|
757
|
+
margin-right: $margin;
|
758
|
+
margin-bottom: $margin;
|
759
|
+
margin-left: $margin;
|
760
|
+
}
|
761
|
+
|
762
|
+
@if length($margin) == 2 {
|
763
|
+
$margin-y: nth($margin, 1);
|
764
|
+
$margin-x: nth($margin, 2);
|
765
|
+
@if $margin-y != n {
|
766
|
+
margin-top: $margin-y;
|
767
|
+
margin-bottom: $margin-y;
|
768
|
+
}
|
769
|
+
@if $margin-x != n {
|
770
|
+
margin-left: $margin-x;
|
771
|
+
margin-right: $margin-x;
|
772
|
+
}
|
773
|
+
}
|
774
|
+
|
775
|
+
@if length($margin) == 3 {
|
776
|
+
$margin-y-top: nth($margin, 1);
|
777
|
+
$margin-x: nth($margin, 2);
|
778
|
+
$margin-y-bottom: nth($margin, 3);
|
779
|
+
@if $margin-y-top != n {
|
780
|
+
margin-top: $margin-y-top;
|
781
|
+
}
|
782
|
+
@if $margin-x != n {
|
783
|
+
margin-right: $margin-x;
|
784
|
+
margin-left: $margin-x;
|
785
|
+
}
|
786
|
+
@if $margin-y-bottom != n {
|
787
|
+
margin-bottom: $margin-y-bottom;
|
788
|
+
}
|
789
|
+
}
|
790
|
+
|
791
|
+
@if length($margin) == 4 {
|
792
|
+
$margin-top: nth($margin, 1);
|
793
|
+
$margin-right: nth($margin, 2);
|
794
|
+
$margin-bottom: nth($margin, 3);
|
795
|
+
$margin-left: nth($margin, 4);
|
796
|
+
@if $margin-top != n {
|
797
|
+
margin-top: $margin-top;
|
798
|
+
}
|
799
|
+
@if $margin-right != n {
|
800
|
+
margin-right: $margin-right;
|
801
|
+
}
|
802
|
+
@if $margin-bottom != n {
|
803
|
+
margin-bottom: $margin-bottom;
|
804
|
+
}
|
805
|
+
@if $margin-left != n {
|
806
|
+
margin-left: $margin-left;
|
807
|
+
}
|
808
|
+
}
|
809
|
+
|
810
|
+
}
|
811
|
+
|
812
|
+
// SCUT PADDING
|
813
|
+
// http://davidtheclark.github.io/scut/#padding
|
814
|
+
|
815
|
+
@mixin scut-padding (
|
816
|
+
$padding
|
817
|
+
) {
|
818
|
+
|
819
|
+
@if length($padding) == 1 and $padding != n {
|
820
|
+
padding-top: $padding;
|
821
|
+
padding-right: $padding;
|
822
|
+
padding-bottom: $padding;
|
823
|
+
padding-left: $padding;
|
824
|
+
}
|
825
|
+
|
826
|
+
@if length($padding) == 2 {
|
827
|
+
$padding-y: nth($padding, 1);
|
828
|
+
$padding-x: nth($padding, 2);
|
829
|
+
@if $padding-y != n {
|
830
|
+
padding-top: $padding-y;
|
831
|
+
padding-bottom: $padding-y;
|
832
|
+
}
|
833
|
+
@if $padding-x != n {
|
834
|
+
padding-left: $padding-x;
|
835
|
+
padding-right: $padding-x;
|
836
|
+
}
|
837
|
+
}
|
838
|
+
|
839
|
+
@if length($padding) == 3 {
|
840
|
+
$padding-y-top: nth($padding, 1);
|
841
|
+
$padding-x: nth($padding, 2);
|
842
|
+
$padding-y-bottom: nth($padding, 3);
|
843
|
+
@if $padding-y-top != n {
|
844
|
+
padding-top: $padding-y-top;
|
845
|
+
}
|
846
|
+
@if $padding-x != n {
|
847
|
+
padding-right: $padding-x;
|
848
|
+
padding-left: $padding-x;
|
849
|
+
}
|
850
|
+
@if $padding-y-bottom != n {
|
851
|
+
padding-bottom: $padding-y-bottom;
|
852
|
+
}
|
853
|
+
}
|
854
|
+
|
855
|
+
@if length($padding) == 4 {
|
856
|
+
$padding-top: nth($padding, 1);
|
857
|
+
$padding-right: nth($padding, 2);
|
858
|
+
$padding-bottom: nth($padding, 3);
|
859
|
+
$padding-left: nth($padding, 4);
|
860
|
+
@if $padding-top != n {
|
861
|
+
padding-top: $padding-top;
|
862
|
+
}
|
863
|
+
@if $padding-right != n {
|
864
|
+
padding-right: $padding-right;
|
865
|
+
}
|
866
|
+
@if $padding-bottom != n {
|
867
|
+
padding-bottom: $padding-bottom;
|
868
|
+
}
|
869
|
+
@if $padding-left != n {
|
870
|
+
padding-left: $padding-left;
|
871
|
+
}
|
872
|
+
}
|
873
|
+
}
|
874
|
+
|
875
|
+
// SCUT POSITIONING: ABSOLUTE
|
876
|
+
// http://davidtheclark.github.io/scut/#positioning_absolute
|
877
|
+
|
878
|
+
// Depends on `positioning-coordinates`.
|
879
|
+
|
880
|
+
@mixin scut-absolute (
|
881
|
+
$coordinates: 0 n n 0
|
882
|
+
) {
|
883
|
+
|
884
|
+
position: absolute;
|
885
|
+
@include scut-coords($coordinates);
|
886
|
+
|
887
|
+
}
|
888
|
+
|
889
|
+
%scut-absolute {
|
890
|
+
@include scut-absolute;
|
891
|
+
}
|
892
|
+
|
893
|
+
// SCUT POSITIONING: FIXED
|
894
|
+
// http://davidtheclark.github.io/scut/#positioning_fixed
|
895
|
+
|
896
|
+
// Depends on `positioning-coordinates`.
|
897
|
+
|
898
|
+
@mixin scut-fixed (
|
899
|
+
$coordinates: 0 n n 0
|
900
|
+
) {
|
901
|
+
|
902
|
+
position: fixed;
|
903
|
+
@include scut-coords($coordinates);
|
904
|
+
|
905
|
+
}
|
906
|
+
|
907
|
+
%scut-fixed {
|
908
|
+
@include scut-fixed;
|
909
|
+
}
|
910
|
+
|
911
|
+
// SCUT POSITIONING: RELATIVE
|
912
|
+
// http://davidtheclark.github.io/scut/#positioning_relative
|
913
|
+
|
914
|
+
// Depends on `positioning-coordinates`.
|
915
|
+
|
916
|
+
@mixin scut-relative (
|
917
|
+
$coordinates: n n n n
|
918
|
+
) {
|
919
|
+
|
920
|
+
position: relative;
|
921
|
+
@include scut-coords($coordinates);
|
922
|
+
|
923
|
+
}
|
924
|
+
|
925
|
+
// SCUT RATIO-BOX
|
926
|
+
// http://davidtheclark.github.io/scut/#ratio-box
|
927
|
+
|
928
|
+
@mixin scut-ratio-box (
|
929
|
+
$ratio: 1/1,
|
930
|
+
$inner: ".scut-inner"
|
931
|
+
) {
|
932
|
+
|
933
|
+
overflow: hidden;
|
934
|
+
position: relative;
|
935
|
+
|
936
|
+
// The container's height, as a percentage of the
|
937
|
+
// container's width, is set by assigning
|
938
|
+
// padding-top to a pseudo-element.
|
939
|
+
&:before {
|
940
|
+
content: "";
|
941
|
+
display: block;
|
942
|
+
height: 0;
|
943
|
+
padding-top: (1 / $ratio) * 100%;
|
944
|
+
}
|
945
|
+
|
946
|
+
// The inner element simply fills up the container.
|
947
|
+
& > #{$inner} {
|
948
|
+
position: absolute;
|
949
|
+
left: 0;
|
950
|
+
top: 0;
|
951
|
+
width: 100%;
|
952
|
+
height: 100%;
|
953
|
+
}
|
954
|
+
|
955
|
+
}
|
956
|
+
|
957
|
+
%scut-ratio-box {
|
958
|
+
@include scut-ratio-box;
|
959
|
+
}
|
960
|
+
|
961
|
+
// SCUT SIZE
|
962
|
+
// http://davidtheclark.github.io/scut/#size
|
963
|
+
|
964
|
+
@mixin scut-size(
|
965
|
+
$size
|
966
|
+
) {
|
967
|
+
|
968
|
+
@if length($size) == 1 {
|
969
|
+
width: $size;
|
970
|
+
height: $size;
|
971
|
+
}
|
972
|
+
@else if length($size) == 2 {
|
973
|
+
width: nth($size, 1);
|
974
|
+
height: nth($size, 2);
|
975
|
+
}
|
976
|
+
|
977
|
+
}
|
978
|
+
|
979
|
+
// SCUT STICKY FOOTER
|
980
|
+
// http://davidtheclark.github.io/scut/#sticky_footer
|
981
|
+
|
982
|
+
@mixin scut-sticky-footer (
|
983
|
+
$height,
|
984
|
+
$wrapper: ".wrapper",
|
985
|
+
$footer: ".scut-sticky"
|
986
|
+
) {
|
987
|
+
|
988
|
+
html,
|
989
|
+
body {
|
990
|
+
height: 100%;
|
991
|
+
}
|
992
|
+
|
993
|
+
#{$wrapper} {
|
994
|
+
min-height: 100%;
|
995
|
+
margin-bottom: -$height;
|
996
|
+
&:after {
|
997
|
+
content: "";
|
998
|
+
display: block;
|
999
|
+
}
|
1000
|
+
}
|
1001
|
+
#{$wrapper}:after,
|
1002
|
+
#{$footer} {
|
1003
|
+
height: $height;
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
// SCUT V-CENTER: INLINE-BLOCK
|
1009
|
+
// http://davidtheclark.github.io/scut/#v-center_inline-block
|
1010
|
+
|
1011
|
+
@mixin scut-vcenter-ib (
|
1012
|
+
$inner: ".scut-inner"
|
1013
|
+
) {
|
1014
|
+
|
1015
|
+
// The inner element is vertically centered
|
1016
|
+
// by middle-aligning it with an inline pseudo-element
|
1017
|
+
// whose height is 100%.
|
1018
|
+
|
1019
|
+
&:before {
|
1020
|
+
content: "";
|
1021
|
+
height: 100%;
|
1022
|
+
display: inline-block;
|
1023
|
+
vertical-align: middle;
|
1024
|
+
// A small negative right margin is set
|
1025
|
+
// to account for the default
|
1026
|
+
// word-spacing of inline-block.
|
1027
|
+
margin-right: -0.25em;
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
& > #{$inner} {
|
1031
|
+
display: inline-block;
|
1032
|
+
vertical-align: middle;
|
1033
|
+
}
|
1034
|
+
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
%scut-vcenter-ib {
|
1038
|
+
@include scut-vcenter-ib;
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
|
1042
|
+
// SCUT V-CENTER: LINE-HEIGHT
|
1043
|
+
// http://davidtheclark.github.io/scut/#v-center_line-height
|
1044
|
+
|
1045
|
+
@mixin scut-vcenter-lh (
|
1046
|
+
$height
|
1047
|
+
) {
|
1048
|
+
|
1049
|
+
height: $height;
|
1050
|
+
line-height: $height;
|
1051
|
+
|
1052
|
+
}
|
1053
|
+
|
1054
|
+
// SCUT V-CENTER: TABLE DISPLAY
|
1055
|
+
// http://davidtheclark.github.io/scut/#v-center_table_display
|
1056
|
+
|
1057
|
+
@mixin scut-vcenter-td (
|
1058
|
+
$inner: ".scut-inner"
|
1059
|
+
) {
|
1060
|
+
|
1061
|
+
display: table;
|
1062
|
+
|
1063
|
+
& > #{$inner} {
|
1064
|
+
display: table-cell;
|
1065
|
+
vertical-align: middle;
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
|
1071
|
+
%scut-vcenter-td {
|
1072
|
+
@include scut-vcenter-td;
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
// BOOKENDS
|
1076
|
+
// http://davidtheclark.github.io/scut/#bookends
|
1077
|
+
|
1078
|
+
@mixin scut-bookends (
|
1079
|
+
$space: 0.5em,
|
1080
|
+
$content: ""
|
1081
|
+
) {
|
1082
|
+
|
1083
|
+
$content-list: length($content) == 2;
|
1084
|
+
|
1085
|
+
// If $content is a list or there $space exist,
|
1086
|
+
// set some pseudo-element-specific rules.
|
1087
|
+
@if $content-list or $space {
|
1088
|
+
&:before {
|
1089
|
+
@if $content-list {
|
1090
|
+
content: nth($content, 1);
|
1091
|
+
}
|
1092
|
+
@if $space {
|
1093
|
+
margin-right: $space;
|
1094
|
+
}
|
1095
|
+
}
|
1096
|
+
&:after {
|
1097
|
+
@if $content-list {
|
1098
|
+
content: nth($content, 2);
|
1099
|
+
}
|
1100
|
+
@if $space {
|
1101
|
+
margin-left: $space;
|
1102
|
+
}
|
1103
|
+
}
|
1104
|
+
}
|
1105
|
+
|
1106
|
+
// Then set some rules that apply to both
|
1107
|
+
// pseudo-elements.
|
1108
|
+
&:before,
|
1109
|
+
&:after {
|
1110
|
+
display: inline-block;
|
1111
|
+
|
1112
|
+
@if $content and length($content) == 1 {
|
1113
|
+
content: $content;
|
1114
|
+
}
|
1115
|
+
|
1116
|
+
// Any additional styling applies to both.
|
1117
|
+
@content;
|
1118
|
+
|
1119
|
+
}
|
1120
|
+
|
1121
|
+
}
|
1122
|
+
|
1123
|
+
// SCUT CSS CHARACTERS
|
1124
|
+
// http://davidtheclark.github.io/scut/#characters
|
1125
|
+
|
1126
|
+
// space
|
1127
|
+
$scut-space: "\0020";
|
1128
|
+
// non-breaking space
|
1129
|
+
$scut-nbsp: "\00a0";
|
1130
|
+
|
1131
|
+
// quotation mark "
|
1132
|
+
$scut-quot: "\0022";
|
1133
|
+
// left single curly quote ‘
|
1134
|
+
$scut-lsquo: "\2018";
|
1135
|
+
// right single curly quote ’
|
1136
|
+
$scut-rsquo: "\2019";
|
1137
|
+
// left double curly quote “
|
1138
|
+
$scut-ldquo: "\201C";
|
1139
|
+
// right double curly quote ”
|
1140
|
+
$scut-rdquo: "\201D";
|
1141
|
+
// left single angle quote (guillemet) ‹
|
1142
|
+
$scut-lsaquo: "\2039";
|
1143
|
+
// right single angle quote (guillemet) ›
|
1144
|
+
$scut-rsaquo: "\203A";
|
1145
|
+
// left double angle quote (guillemet) «
|
1146
|
+
$scut-laquo: "\00ab";
|
1147
|
+
// right double angle quote (guillemet) »
|
1148
|
+
$scut-raquo: "\00bb";
|
1149
|
+
|
1150
|
+
// em dash (mutton) — [should look longer]
|
1151
|
+
$scut-mdash: "\2014";
|
1152
|
+
// en dash (nut) – [between a hyphen and an em dash in length]
|
1153
|
+
$scut-ndash: "\2013";
|
1154
|
+
// hyphen -
|
1155
|
+
$scut-hyphen: "\2010";
|
1156
|
+
|
1157
|
+
// ampersand &
|
1158
|
+
$scut-amp: "\0026";
|
1159
|
+
// greater than >
|
1160
|
+
$scut-gt: "\003e";
|
1161
|
+
// less than <
|
1162
|
+
$scut-lt: "\003c";
|
1163
|
+
// times ×
|
1164
|
+
$scut-times: "\00D7";
|
1165
|
+
// big times ✕
|
1166
|
+
$scut-bigtimes: "\2715";
|
1167
|
+
// checkmark ✓
|
1168
|
+
$scut-checkmark: "\2713";
|
1169
|
+
|
1170
|
+
// section sign (double S, hurricane, sectional symbol, the legal doughnut, signum sectiōnis) §
|
1171
|
+
$scut-sect: "\00a7";
|
1172
|
+
// paragraph symbol (pilcrow) ¶
|
1173
|
+
$scut-para: "\00b6";
|
1174
|
+
|
1175
|
+
// middot (interpunct, interpoint) ·
|
1176
|
+
$scut-middot: "\00b7";
|
1177
|
+
// o-slash (slashed o) Ø
|
1178
|
+
$scut-oslash: "\00f8";
|
1179
|
+
// bullet •
|
1180
|
+
$scut-bull: "\2022";
|
1181
|
+
// white bullet ◦
|
1182
|
+
$scut-whibull: "\25E6";
|
1183
|
+
// horizontal ellipsis …
|
1184
|
+
$scut-hellip: "\2026";
|
1185
|
+
// vertical ellipsis ⋮
|
1186
|
+
$scut-vellip: "\22EE";
|
1187
|
+
// midline horizontal ellipsis ⋯
|
1188
|
+
$scut-midhellip: "\22EF";
|
1189
|
+
|
1190
|
+
// up-pointing triangle ▲
|
1191
|
+
$scut-utri: "\25b2";
|
1192
|
+
// down-pointing triangle ▼
|
1193
|
+
$scut-dtri: "\25bc";
|
1194
|
+
// left-pointing triangle ◀
|
1195
|
+
$scut-ltri: "\25c0";
|
1196
|
+
// right-pointing triangle ▶
|
1197
|
+
$scut-rtri: "\25b6";
|
1198
|
+
// up-pointing small triangle ▴
|
1199
|
+
$scut-ustri: "\25b4";
|
1200
|
+
// down-pointing small triangle ▾
|
1201
|
+
$scut-dstri: "\25be";
|
1202
|
+
// left-pointing small triangle ◂
|
1203
|
+
$scut-lstri: "\25c2";
|
1204
|
+
// right-pointing small triangle ▸
|
1205
|
+
$scut-rstri: "\25b8";
|
1206
|
+
// diamond ◆
|
1207
|
+
$scut-diamond: "\25c6";
|
1208
|
+
// fisheye ◉
|
1209
|
+
$scut-fisheye: "\25c9";
|
1210
|
+
// bullseye ◎
|
1211
|
+
$scut-bullseye: "\25ce";
|
1212
|
+
// circle ●
|
1213
|
+
$scut-circle: "\25cf";
|
1214
|
+
// white circle ○
|
1215
|
+
$scut-whitecircle: "\25cb";
|
1216
|
+
|
1217
|
+
// SCUT FONT-FACE
|
1218
|
+
// http://davidtheclark.github.io/scut/#font-face
|
1219
|
+
|
1220
|
+
@mixin scut-font-face (
|
1221
|
+
$font-family,
|
1222
|
+
$file-path,
|
1223
|
+
$weight: normal,
|
1224
|
+
$style: normal
|
1225
|
+
) {
|
1226
|
+
|
1227
|
+
@font-face {
|
1228
|
+
font-family: $font-family;
|
1229
|
+
font-weight: $weight;
|
1230
|
+
font-style: $style;
|
1231
|
+
|
1232
|
+
src: url('#{$file-path}.eot');
|
1233
|
+
src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'),
|
1234
|
+
url('#{$file-path}.woff') format('woff'),
|
1235
|
+
url('#{$file-path}.ttf') format('truetype'),
|
1236
|
+
url('#{$file-path}.svg##{$font-family}') format('svg');
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
}
|
1240
|
+
|
1241
|
+
// SCUT HANGING INDENT
|
1242
|
+
// http://davidtheclark.github.io/scut/#hanging_indent
|
1243
|
+
|
1244
|
+
@mixin scut-hanging-indent (
|
1245
|
+
$indent: 1em
|
1246
|
+
) {
|
1247
|
+
|
1248
|
+
// padding-left creates the indent,
|
1249
|
+
// while text-indent pulls the first line
|
1250
|
+
// back to the edge.
|
1251
|
+
|
1252
|
+
padding-left: $indent;
|
1253
|
+
text-indent: -$indent;
|
1254
|
+
|
1255
|
+
}
|
1256
|
+
|
1257
|
+
%scut-hanging-indent {
|
1258
|
+
@include scut-hanging-indent;
|
1259
|
+
}
|
1260
|
+
|
1261
|
+
// SCUT INDENTED PARAGRAPHS
|
1262
|
+
// http://davidtheclark.github.io/scut/#indented_paragraphs
|
1263
|
+
|
1264
|
+
@mixin scut-indented-ps (
|
1265
|
+
$indent: 1.5em,
|
1266
|
+
$no-first-indent: true
|
1267
|
+
) {
|
1268
|
+
|
1269
|
+
p {
|
1270
|
+
margin: 0;
|
1271
|
+
text-indent: $indent;
|
1272
|
+
}
|
1273
|
+
|
1274
|
+
@if $no-first-indent {
|
1275
|
+
p:first-of-type {
|
1276
|
+
text-indent: 0;
|
1277
|
+
}
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
}
|
1281
|
+
|
1282
|
+
%scut-indented-ps {
|
1283
|
+
@include scut-indented-ps;
|
1284
|
+
}
|
1285
|
+
|
1286
|
+
// SCUT KEY-VALUE
|
1287
|
+
// http://davidtheclark.github.io/scut/#key-value
|
1288
|
+
|
1289
|
+
@mixin scut-key-val (
|
1290
|
+
$divider: ":",
|
1291
|
+
$pad: 0.25em,
|
1292
|
+
$indent: 1em,
|
1293
|
+
$spacing: 0,
|
1294
|
+
$pad-left: 0
|
1295
|
+
) {
|
1296
|
+
|
1297
|
+
& > dt {
|
1298
|
+
clear: both;
|
1299
|
+
float: left;
|
1300
|
+
&:after {
|
1301
|
+
content: $divider;
|
1302
|
+
margin-right: $pad;
|
1303
|
+
@if $pad-left != 0 {
|
1304
|
+
margin-left: $pad-left;
|
1305
|
+
}
|
1306
|
+
}
|
1307
|
+
}
|
1308
|
+
|
1309
|
+
& > dd {
|
1310
|
+
margin-left: $indent;
|
1311
|
+
@if $spacing != 0 {
|
1312
|
+
margin-bottom: $spacing;
|
1313
|
+
}
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
}
|
1317
|
+
|
1318
|
+
%scut-key-val {
|
1319
|
+
@include scut-key-val;
|
1320
|
+
}
|
1321
|
+
|
1322
|
+
// SCUT LINK: BOTTOM-BORDERED
|
1323
|
+
// http://davidtheclark.github.io/scut/#link_bottom-bordered
|
1324
|
+
|
1325
|
+
@mixin scut-link-bb (
|
1326
|
+
$color: inherit,
|
1327
|
+
$style: solid,
|
1328
|
+
$width: 1px
|
1329
|
+
) {
|
1330
|
+
|
1331
|
+
text-decoration: none;
|
1332
|
+
|
1333
|
+
border-bottom-width: $width;
|
1334
|
+
border-bottom-style: $style;
|
1335
|
+
@if $color != inherit {
|
1336
|
+
border-bottom-color: $color;
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
}
|
1340
|
+
|
1341
|
+
%scut-link-bb {
|
1342
|
+
@include scut-link-bb;
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
// SCUT REVERSE ITALICS
|
1346
|
+
// http://davidtheclark.github.io/scut/#reverse-italics
|
1347
|
+
|
1348
|
+
@mixin scut-reverse-italics (
|
1349
|
+
$elements: false
|
1350
|
+
) {
|
1351
|
+
|
1352
|
+
$element-list: em, cite, i;
|
1353
|
+
@each $el in $elements {
|
1354
|
+
$element-list: append($element-list, unquote($el), comma)
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
font-style: italic;
|
1358
|
+
#{$element-list} {
|
1359
|
+
font-style: normal;
|
1360
|
+
}
|
1361
|
+
|
1362
|
+
}
|
1363
|
+
|
1364
|
+
%scut-reverse-italics {
|
1365
|
+
@include scut-reverse-italics;
|
1366
|
+
}
|
1367
|
+
|
1368
|
+
// SCUT SIDE-LINED
|
1369
|
+
// http://davidtheclark.github.io/scut/#side-lined
|
1370
|
+
|
1371
|
+
@mixin scut-side-lined (
|
1372
|
+
$height: 1px,
|
1373
|
+
$space: 0.5em,
|
1374
|
+
$color: inherit,
|
1375
|
+
$style: solid,
|
1376
|
+
$v-adjust: false,
|
1377
|
+
$double: false
|
1378
|
+
) {
|
1379
|
+
|
1380
|
+
display: block;
|
1381
|
+
overflow: hidden;
|
1382
|
+
text-align: center;
|
1383
|
+
|
1384
|
+
&:before,
|
1385
|
+
&:after {
|
1386
|
+
content: "";
|
1387
|
+
display: inline-block;
|
1388
|
+
vertical-align: middle;
|
1389
|
+
position: relative;
|
1390
|
+
width: 50%;
|
1391
|
+
|
1392
|
+
border-top-style: $style;
|
1393
|
+
border-top-width: $height;
|
1394
|
+
|
1395
|
+
@if $color != inherit {
|
1396
|
+
border-top-color: $color;
|
1397
|
+
}
|
1398
|
+
|
1399
|
+
@if $v-adjust != false {
|
1400
|
+
bottom: $v-adjust;
|
1401
|
+
}
|
1402
|
+
|
1403
|
+
@if $double != false {
|
1404
|
+
height: $double;
|
1405
|
+
border-bottom-style: $style;
|
1406
|
+
border-bottom-width: $height;
|
1407
|
+
@if $color != inherit {
|
1408
|
+
border-bottom-color: $color;
|
1409
|
+
}
|
1410
|
+
}
|
1411
|
+
}
|
1412
|
+
|
1413
|
+
&:before {
|
1414
|
+
right: $space;
|
1415
|
+
margin-left: -50%;
|
1416
|
+
}
|
1417
|
+
&:after {
|
1418
|
+
left: $space;
|
1419
|
+
margin-right: -50%;
|
1420
|
+
}
|
1421
|
+
|
1422
|
+
}
|
1423
|
+
|
1424
|
+
%scut-side-lined {
|
1425
|
+
@include scut-side-lined;
|
1426
|
+
}
|