scut 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dist/_scut.scss +215 -48
- data/lib/scut.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89ad484b4586156d1895a2a56ac1a81422f587e2
|
4
|
+
data.tar.gz: ad230a5c6db948f0ec3c2b3ed9cc8236e9178cc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 309407020ce4d0053f411bc9bc3b8cee8b9b7ab21a007f58e73579ee3f00c978309b746493bf9ad6b8426bd825599e0ef955ace16000184e367866c36b8a7339
|
7
|
+
data.tar.gz: 44a4ed55aaa60e2acc10624d358b550c424797b0f6f112a1c4d2604b9132ffb7538a1fd7e94af6887bff415fa00e0bc50e7048b6a0720d69bfe0658aa573f4c0
|
data/dist/_scut.scss
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Scut, a collection of Sass utilities to ease and improve our implementations of common style-code patterns.
|
3
|
-
* v0.
|
3
|
+
* v0.7.0
|
4
4
|
* Docs at http://davidtheclark.github.io/scut
|
5
5
|
*/
|
6
6
|
|
@@ -27,8 +27,7 @@
|
|
27
27
|
@mixin scut-list-unstyled {
|
28
28
|
|
29
29
|
list-style-type: none;
|
30
|
-
|
31
|
-
padding: 0;
|
30
|
+
padding-left: 0;
|
32
31
|
|
33
32
|
}
|
34
33
|
|
@@ -118,9 +117,11 @@
|
|
118
117
|
|
119
118
|
// Depends on `scut-strip-unit`.
|
120
119
|
|
120
|
+
$scut-em-base: 16 !default;
|
121
|
+
|
121
122
|
@function scut-em (
|
122
123
|
$pixels,
|
123
|
-
$base:
|
124
|
+
$base: $scut-em-base
|
124
125
|
) {
|
125
126
|
|
126
127
|
// $base could be in em or px (no unit = px).
|
@@ -129,7 +130,30 @@
|
|
129
130
|
$multiplier: if(unit($base) == em, 16, 1);
|
130
131
|
$divisor: scut-strip-unit($base) * $multiplier;
|
131
132
|
|
132
|
-
|
133
|
+
$em-vals: null;
|
134
|
+
@each $val in $pixels {
|
135
|
+
$val-in-ems: (scut-strip-unit($val) / $divisor) * 1em;
|
136
|
+
$em-vals: append($em-vals, $val-in-ems);
|
137
|
+
}
|
138
|
+
@return $em-vals;
|
139
|
+
|
140
|
+
}
|
141
|
+
|
142
|
+
// SCUT PIXELS TO REMS
|
143
|
+
// http://davidtheclark.github.io/scut/#pixels-to-rems
|
144
|
+
|
145
|
+
// Depends on `scut-strip-unit`.
|
146
|
+
|
147
|
+
@function scut-rem (
|
148
|
+
$pixels
|
149
|
+
) {
|
150
|
+
|
151
|
+
$rem-vals: null;
|
152
|
+
@each $val in $pixels {
|
153
|
+
$val-in-rems: scut-strip-unit($val) / 16 * 1rem;
|
154
|
+
$rem-vals: append($rem-vals, $val-in-rems);
|
155
|
+
}
|
156
|
+
@return $rem-vals;
|
133
157
|
|
134
158
|
}
|
135
159
|
|
@@ -314,6 +338,28 @@
|
|
314
338
|
@include scut-image-replace;
|
315
339
|
}
|
316
340
|
|
341
|
+
// SCUT REMS WITH FALLBACK
|
342
|
+
// http://davidtheclark.github.io/scut/#rems_with_fallback
|
343
|
+
|
344
|
+
// Depends on scut-rem and scut-strip-unit
|
345
|
+
|
346
|
+
@mixin scut-rem-fallback (
|
347
|
+
$pixels,
|
348
|
+
$property: font-size
|
349
|
+
) {
|
350
|
+
|
351
|
+
$px-vals: null;
|
352
|
+
@each $val in $pixels {
|
353
|
+
$val-in-px: scut-strip-unit($val) * 1px;
|
354
|
+
$px-vals: append($px-vals, $val-in-px);
|
355
|
+
}
|
356
|
+
$rem-vals: scut-rem($pixels);
|
357
|
+
|
358
|
+
#{$property}: $px-vals;
|
359
|
+
#{$property}: $rem-vals;
|
360
|
+
|
361
|
+
}
|
362
|
+
|
317
363
|
// SCUT RESET
|
318
364
|
// http://davidtheclark.github.io/scut/#reset
|
319
365
|
|
@@ -584,16 +630,75 @@
|
|
584
630
|
}
|
585
631
|
|
586
632
|
|
633
|
+
// SCUT CENTER TRANSFORM
|
634
|
+
// http://davidtheclark.github.io/scut/#center_transform
|
635
|
+
|
636
|
+
@mixin scut-center-transform (
|
637
|
+
$axis: false // or x or y
|
638
|
+
) {
|
639
|
+
|
640
|
+
position: absolute;
|
641
|
+
|
642
|
+
@if $axis != x {
|
643
|
+
top: 50%;
|
644
|
+
margin-top: auto;
|
645
|
+
margin-bottom: auto;
|
646
|
+
}
|
647
|
+
|
648
|
+
@if $axis != y {
|
649
|
+
left: 50%;
|
650
|
+
margin-left: auto;
|
651
|
+
margin-right: auto;
|
652
|
+
}
|
653
|
+
|
654
|
+
$translate-val: null;
|
655
|
+
|
656
|
+
@if not $axis {
|
657
|
+
$translate-val: translate(-50%, -50%);
|
658
|
+
}
|
659
|
+
@else if $axis != x {
|
660
|
+
$translate-val: translateY(-50%);
|
661
|
+
}
|
662
|
+
@else if $axis != y {
|
663
|
+
$translate-val: translateX(-50%);
|
664
|
+
}
|
665
|
+
|
666
|
+
-webkit-transform: $translate-val;
|
667
|
+
-ms-transform: $translate-val;
|
668
|
+
transform: $translate-val;
|
669
|
+
}
|
670
|
+
|
671
|
+
%scut-center-transform {
|
672
|
+
@include scut-center-transform;
|
673
|
+
}
|
674
|
+
|
675
|
+
%scut-center-transform-x {
|
676
|
+
@include scut-center-transform(x);
|
677
|
+
}
|
678
|
+
|
679
|
+
%scut-center-transform-y {
|
680
|
+
@include scut-center-transform(y);
|
681
|
+
}
|
682
|
+
|
683
|
+
|
587
684
|
// SCUT FILL
|
588
685
|
// http://davidtheclark.github.io/scut/#fill
|
589
686
|
|
590
|
-
@mixin scut-fill
|
687
|
+
@mixin scut-fill (
|
688
|
+
$width-height: false
|
689
|
+
) {
|
591
690
|
|
592
691
|
position: absolute;
|
593
692
|
left: 0;
|
594
693
|
top: 0;
|
595
|
-
width
|
596
|
-
|
694
|
+
@if $width-height {
|
695
|
+
width: 100%;
|
696
|
+
height: 100%;
|
697
|
+
}
|
698
|
+
@else {
|
699
|
+
right: 0;
|
700
|
+
bottom: 0;
|
701
|
+
}
|
597
702
|
|
598
703
|
}
|
599
704
|
|
@@ -635,6 +740,53 @@
|
|
635
740
|
}
|
636
741
|
|
637
742
|
|
743
|
+
// SCUT LIST: CUSTOM
|
744
|
+
// http://davidtheclark.github.io/scut/#list_custom
|
745
|
+
|
746
|
+
@mixin scut-list-custom (
|
747
|
+
$content: "\2022",
|
748
|
+
$marker-width: 0.75em,
|
749
|
+
$pad: 0
|
750
|
+
) {
|
751
|
+
|
752
|
+
$content-val: null;
|
753
|
+
$counter: index($content, count);
|
754
|
+
@if $counter {
|
755
|
+
@if length($content) == 3 {
|
756
|
+
$content-val: counter(scutlistcounter, nth($content, 3))nth($content,2);
|
757
|
+
}
|
758
|
+
@else if length($content) == 2 {
|
759
|
+
$content-val: counter(scutlistcounter)nth($content,2);
|
760
|
+
}
|
761
|
+
@else {
|
762
|
+
$content-val: counter(scutlistcounter);
|
763
|
+
}
|
764
|
+
}
|
765
|
+
@else {
|
766
|
+
$content-val: $content;
|
767
|
+
}
|
768
|
+
|
769
|
+
padding-left: $marker-width + $pad;
|
770
|
+
list-style-type: none;
|
771
|
+
|
772
|
+
& > li {
|
773
|
+
position: relative;
|
774
|
+
@if $counter {
|
775
|
+
counter-increment: scutlistcounter;
|
776
|
+
}
|
777
|
+
&:before {
|
778
|
+
content: $content-val;
|
779
|
+
display: block;
|
780
|
+
position: absolute;
|
781
|
+
top: 0;
|
782
|
+
left: -$marker-width;
|
783
|
+
width: $marker-width;
|
784
|
+
@content;
|
785
|
+
}
|
786
|
+
}
|
787
|
+
|
788
|
+
}
|
789
|
+
|
638
790
|
// SCUT LIST: DIVIDED
|
639
791
|
// http://davidtheclark.github.io/scut/#list_divided
|
640
792
|
|
@@ -731,6 +883,8 @@
|
|
731
883
|
) {
|
732
884
|
|
733
885
|
@include scut-list-unstyled;
|
886
|
+
margin-top: 0;
|
887
|
+
margin-bottom: 0;
|
734
888
|
|
735
889
|
& > li {
|
736
890
|
display: $display;
|
@@ -1072,6 +1226,19 @@
|
|
1072
1226
|
@include scut-vcenter-td;
|
1073
1227
|
}
|
1074
1228
|
|
1229
|
+
// SCUT V-CENTER: TRANSFORM
|
1230
|
+
// http://davidtheclark.github.io/scut/#v-center_transform
|
1231
|
+
|
1232
|
+
// Depends on scut-center-transform
|
1233
|
+
|
1234
|
+
@mixin scut-vcenter-tt () {
|
1235
|
+
@include scut-center-transform(y);
|
1236
|
+
}
|
1237
|
+
|
1238
|
+
%scut-vcenter-tt {
|
1239
|
+
@include scut-vcenter-tt;
|
1240
|
+
}
|
1241
|
+
|
1075
1242
|
// BOOKENDS
|
1076
1243
|
// http://davidtheclark.github.io/scut/#bookends
|
1077
1244
|
|
@@ -1128,90 +1295,90 @@ $scut-space: "\0020";
|
|
1128
1295
|
// non-breaking space
|
1129
1296
|
$scut-nbsp: "\00a0";
|
1130
1297
|
|
1131
|
-
// quotation mark
|
1298
|
+
// quotation mark
|
1132
1299
|
$scut-quot: "\0022";
|
1133
|
-
// left single curly quote
|
1300
|
+
// left single curly quote
|
1134
1301
|
$scut-lsquo: "\2018";
|
1135
|
-
// right single curly quote
|
1302
|
+
// right single curly quote
|
1136
1303
|
$scut-rsquo: "\2019";
|
1137
|
-
// left double curly quote
|
1304
|
+
// left double curly quote
|
1138
1305
|
$scut-ldquo: "\201C";
|
1139
|
-
// right double curly quote
|
1306
|
+
// right double curly quote
|
1140
1307
|
$scut-rdquo: "\201D";
|
1141
|
-
// left single angle quote (guillemet)
|
1308
|
+
// left single angle quote (guillemet)
|
1142
1309
|
$scut-lsaquo: "\2039";
|
1143
|
-
// right single angle quote (guillemet)
|
1310
|
+
// right single angle quote (guillemet)
|
1144
1311
|
$scut-rsaquo: "\203A";
|
1145
|
-
// left double angle quote (guillemet)
|
1312
|
+
// left double angle quote (guillemet)
|
1146
1313
|
$scut-laquo: "\00ab";
|
1147
|
-
// right double angle quote (guillemet)
|
1314
|
+
// right double angle quote (guillemet)
|
1148
1315
|
$scut-raquo: "\00bb";
|
1149
1316
|
|
1150
|
-
// em dash (mutton)
|
1317
|
+
// em dash (mutton)
|
1151
1318
|
$scut-mdash: "\2014";
|
1152
|
-
// en dash (nut)
|
1319
|
+
// en dash (nut)
|
1153
1320
|
$scut-ndash: "\2013";
|
1154
|
-
// hyphen
|
1321
|
+
// hyphen
|
1155
1322
|
$scut-hyphen: "\2010";
|
1156
1323
|
|
1157
|
-
// ampersand
|
1324
|
+
// ampersand
|
1158
1325
|
$scut-amp: "\0026";
|
1159
|
-
// greater than
|
1326
|
+
// greater than
|
1160
1327
|
$scut-gt: "\003e";
|
1161
|
-
// less than
|
1328
|
+
// less than
|
1162
1329
|
$scut-lt: "\003c";
|
1163
|
-
// times
|
1330
|
+
// times
|
1164
1331
|
$scut-times: "\00D7";
|
1165
|
-
// big times
|
1332
|
+
// big times
|
1166
1333
|
$scut-bigtimes: "\2715";
|
1167
|
-
// checkmark
|
1334
|
+
// checkmark
|
1168
1335
|
$scut-checkmark: "\2713";
|
1169
1336
|
|
1170
|
-
// section sign (double S, hurricane, sectional symbol, the legal doughnut, signum
|
1337
|
+
// section sign (double S, hurricane, sectional symbol, the legal doughnut, signum sectionis)
|
1171
1338
|
$scut-sect: "\00a7";
|
1172
|
-
// paragraph symbol (pilcrow)
|
1339
|
+
// paragraph symbol (pilcrow)
|
1173
1340
|
$scut-para: "\00b6";
|
1174
1341
|
|
1175
|
-
// middot (interpunct, interpoint)
|
1342
|
+
// middot (interpunct, interpoint)
|
1176
1343
|
$scut-middot: "\00b7";
|
1177
|
-
// o-slash (slashed o)
|
1344
|
+
// o-slash (slashed o)
|
1178
1345
|
$scut-oslash: "\00f8";
|
1179
|
-
// bullet
|
1346
|
+
// bullet
|
1180
1347
|
$scut-bull: "\2022";
|
1181
|
-
// white bullet
|
1348
|
+
// white bullet
|
1182
1349
|
$scut-whibull: "\25E6";
|
1183
|
-
// horizontal ellipsis
|
1350
|
+
// horizontal ellipsis
|
1184
1351
|
$scut-hellip: "\2026";
|
1185
|
-
// vertical ellipsis
|
1352
|
+
// vertical ellipsis
|
1186
1353
|
$scut-vellip: "\22EE";
|
1187
|
-
// midline horizontal ellipsis
|
1354
|
+
// midline horizontal ellipsis
|
1188
1355
|
$scut-midhellip: "\22EF";
|
1189
1356
|
|
1190
|
-
// up-pointing triangle
|
1357
|
+
// up-pointing triangle
|
1191
1358
|
$scut-utri: "\25b2";
|
1192
|
-
// down-pointing triangle
|
1359
|
+
// down-pointing triangle
|
1193
1360
|
$scut-dtri: "\25bc";
|
1194
|
-
// left-pointing triangle
|
1361
|
+
// left-pointing triangle
|
1195
1362
|
$scut-ltri: "\25c0";
|
1196
|
-
// right-pointing triangle
|
1363
|
+
// right-pointing triangle
|
1197
1364
|
$scut-rtri: "\25b6";
|
1198
|
-
// up-pointing small triangle
|
1365
|
+
// up-pointing small triangle
|
1199
1366
|
$scut-ustri: "\25b4";
|
1200
|
-
// down-pointing small triangle
|
1367
|
+
// down-pointing small triangle
|
1201
1368
|
$scut-dstri: "\25be";
|
1202
|
-
// left-pointing small triangle
|
1369
|
+
// left-pointing small triangle
|
1203
1370
|
$scut-lstri: "\25c2";
|
1204
|
-
// right-pointing small triangle
|
1371
|
+
// right-pointing small triangle
|
1205
1372
|
$scut-rstri: "\25b8";
|
1206
|
-
// diamond
|
1373
|
+
// diamond
|
1207
1374
|
$scut-diamond: "\25c6";
|
1208
|
-
// fisheye
|
1375
|
+
// fisheye
|
1209
1376
|
$scut-fisheye: "\25c9";
|
1210
|
-
// bullseye
|
1377
|
+
// bullseye
|
1211
1378
|
$scut-bullseye: "\25ce";
|
1212
|
-
// circle
|
1379
|
+
// circle
|
1213
1380
|
$scut-circle: "\25cf";
|
1214
|
-
// white circle
|
1381
|
+
// white circle
|
1215
1382
|
$scut-whitecircle: "\25cb";
|
1216
1383
|
|
1217
1384
|
// SCUT FONT-FACE
|
data/lib/scut.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Clark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|