gerillass 1.4.0 → 1.6.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.
- package/README.md +109 -50
- package/SKILL.md +189 -0
- package/gerillass.json +1869 -0
- package/package.json +12 -1
- package/scss/_gerillass-prefix.scss +48 -9
- package/scss/library/_all-buttons.scss +1 -1
- package/scss/library/_all-text-inputs.scss +1 -1
- package/scss/library/_antialias.scss +4 -0
- package/scss/library/_background-dots.scss +3 -0
- package/scss/library/_background-image.scss +2 -2
- package/scss/library/_border-box.scss +4 -0
- package/scss/library/_border-radius.scss +3 -1
- package/scss/library/_center.scss +3 -0
- package/scss/library/_columnizer.scss +5 -0
- package/scss/library/_except.scss +2 -0
- package/scss/library/_only.scss +2 -0
- package/scss/library/_remove.scss +1 -1
- package/scss/library/_scissors.scss +2 -0
- package/scss/library/_smartphone.scss +3 -1
- package/scss/library/_sprite.scss +4 -0
- package/scss/library/_tablet.scss +3 -1
- package/scss/library/_text-selection.scss +4 -0
- package/scss/library/_triangle.scss +1 -1
package/package.json
CHANGED
|
@@ -5,8 +5,18 @@
|
|
|
5
5
|
"homepage": "https://gerillass.com",
|
|
6
6
|
"author": "Halil İbrahim Çakıroğlu",
|
|
7
7
|
"main": "scss/_gerillass.scss",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"sass": "./scss/_gerillass.scss",
|
|
11
|
+
"default": "./scss/_gerillass.scss"
|
|
12
|
+
},
|
|
13
|
+
"./*": {
|
|
14
|
+
"sass": "./*",
|
|
15
|
+
"default": "./*"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
8
18
|
"license": "Apache-2.0",
|
|
9
|
-
"version": "1.
|
|
19
|
+
"version": "1.6.0",
|
|
10
20
|
"repository": {
|
|
11
21
|
"type": "git",
|
|
12
22
|
"url": "git+https://github.com/selfishprimate/gerillass.git"
|
|
@@ -37,6 +47,7 @@
|
|
|
37
47
|
"needs": "^3.0.0"
|
|
38
48
|
},
|
|
39
49
|
"scripts": {
|
|
50
|
+
"manifest": "node tools/build-manifest.js && node tools/build-skill.js",
|
|
40
51
|
"test": "jest"
|
|
41
52
|
},
|
|
42
53
|
"devDependencies": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
@content;
|
|
44
44
|
}
|
|
45
45
|
} @else {
|
|
46
|
-
@error "The argument must be `null` or one of the followings: #{
|
|
46
|
+
@error "The argument must be `null` or one of the followings: #{$list}.";
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
@content;
|
|
61
61
|
}
|
|
62
62
|
} @else {
|
|
63
|
-
@error "The argument must be `null` or one of the followings: #{
|
|
63
|
+
@error "The argument must be `null` or one of the followings: #{$list}";
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -91,6 +91,10 @@
|
|
|
91
91
|
-webkit-font-smoothing: antialiased;
|
|
92
92
|
-moz-osx-font-smoothing: grayscale;
|
|
93
93
|
}
|
|
94
|
+
} @else if not & and $value == "only" {
|
|
95
|
+
@error "`only` has no meaning at the root of a stylesheet, because there is no selector to limit the effect to. Call `antialias(\"only\")` inside a selector, or pass no argument at all.";
|
|
96
|
+
} @else {
|
|
97
|
+
@error "`#{$value}` is not a valid argument for `antialias`. Pass `\"only\"` inside a selector to affect just that element, or pass no argument at all.";
|
|
94
98
|
}
|
|
95
99
|
}
|
|
96
100
|
|
|
@@ -103,6 +107,9 @@
|
|
|
103
107
|
$diagonal: true,
|
|
104
108
|
$image: null
|
|
105
109
|
) {
|
|
110
|
+
@if $diagonal != true and $diagonal != false {
|
|
111
|
+
@error "`#{$diagonal}` is not a valid $diagonal for `background-dots`. Pass `true` or `false`.";
|
|
112
|
+
}
|
|
106
113
|
@if not $color {
|
|
107
114
|
$color: rgba(0, 0, 0, 0.1);
|
|
108
115
|
@if $diagonal == true {
|
|
@@ -174,11 +181,11 @@
|
|
|
174
181
|
),
|
|
175
182
|
url($image-url);
|
|
176
183
|
} @else {
|
|
177
|
-
@if index("deg", unit($filter-direction)) {
|
|
184
|
+
@if type-of($filter-direction) == "number" and index("deg", unit($filter-direction)) {
|
|
178
185
|
background-image: linear-gradient($filter-direction, $color-list),
|
|
179
186
|
url($image-url);
|
|
180
187
|
} @else {
|
|
181
|
-
@error "
|
|
188
|
+
@error "`#{$filter-direction}` is not a valid $filter-direction. Pass an angle such as `45deg`, or one of: #{map-keys($map-for-directions)}.";
|
|
182
189
|
}
|
|
183
190
|
}
|
|
184
191
|
} @else {
|
|
@@ -314,6 +321,10 @@
|
|
|
314
321
|
*::after {
|
|
315
322
|
box-sizing: border-box;
|
|
316
323
|
}
|
|
324
|
+
} @else if not & and $value == "only" {
|
|
325
|
+
@error "`only` has no meaning at the root of a stylesheet, because there is no selector to limit the effect to. Call `border-box(\"only\")` inside a selector, or pass no argument at all.";
|
|
326
|
+
} @else {
|
|
327
|
+
@error "`#{$value}` is not a valid argument for `border-box`. Pass `\"only\"` inside a selector to affect just that element, or pass no argument at all.";
|
|
317
328
|
}
|
|
318
329
|
}
|
|
319
330
|
|
|
@@ -358,7 +369,7 @@
|
|
|
358
369
|
border-bottom-left-radius: $value;
|
|
359
370
|
}
|
|
360
371
|
} @else {
|
|
361
|
-
@error "Corner value must be one of the followings: #{
|
|
372
|
+
@error "Corner value must be one of the followings: #{$list}.";
|
|
362
373
|
}
|
|
363
374
|
} @else if length($args) == 4 {
|
|
364
375
|
$args: __null($args, space, true);
|
|
@@ -366,6 +377,8 @@
|
|
|
366
377
|
border-top-right-radius: nth($args, 2);
|
|
367
378
|
border-bottom-right-radius: nth($args, 3);
|
|
368
379
|
border-bottom-left-radius: nth($args, 4);
|
|
380
|
+
} @else {
|
|
381
|
+
@error "`border-radius` takes 1, 2 or 4 arguments; you passed #{length($args)}. Use one radius for every corner, a corner name plus a radius, or four radii in top-left, top-right, bottom-right, bottom-left order.";
|
|
369
382
|
}
|
|
370
383
|
}
|
|
371
384
|
|
|
@@ -495,6 +508,9 @@
|
|
|
495
508
|
|
|
496
509
|
|
|
497
510
|
@mixin gls-center($axis: "both") {
|
|
511
|
+
@if not index("both" "horizontal" "vertical", $axis) {
|
|
512
|
+
@error "`#{$axis}` is not a valid $axis for `center`. Pass one of: both, horizontal, vertical.";
|
|
513
|
+
}
|
|
498
514
|
@if $axis == "both" or $axis == "vertical" {
|
|
499
515
|
top: 50%;
|
|
500
516
|
}
|
|
@@ -529,6 +545,9 @@
|
|
|
529
545
|
|
|
530
546
|
|
|
531
547
|
@mixin gls-columnizer($params...) {
|
|
548
|
+
@if length($params) < 1 or length($params) > 3 {
|
|
549
|
+
@error "`columnizer` takes 1 to 3 arguments; you passed #{length($params)}. Pass the column count, optionally a gutter length, and optionally a boolean telling the last row whether to fill.";
|
|
550
|
+
}
|
|
532
551
|
$columns: nth($params, 1);
|
|
533
552
|
$gutter: null;
|
|
534
553
|
$fill: false;
|
|
@@ -564,6 +583,8 @@
|
|
|
564
583
|
&:nth-child(#{$columns}n) {
|
|
565
584
|
margin-right: 0;
|
|
566
585
|
}
|
|
586
|
+
} @else {
|
|
587
|
+
@error "`#{nth($params, 2)}` is not a valid second argument for `columnizer`. Pass a gutter length such as `20px`, or a boolean telling the last row whether to fill.";
|
|
567
588
|
}
|
|
568
589
|
} @else if length($params) == 3 {
|
|
569
590
|
$gutter: nth($params, 2);
|
|
@@ -686,6 +707,8 @@
|
|
|
686
707
|
@content;
|
|
687
708
|
}
|
|
688
709
|
}
|
|
710
|
+
} @else {
|
|
711
|
+
@error "`#{$value}` is not a valid argument for `except`. Pass a positive or negative number, one of `first`, `last`, `odd`, `even`, or a selector such as `.foo`.";
|
|
689
712
|
}
|
|
690
713
|
} @else if length($params) > 1 {
|
|
691
714
|
$items: "";
|
|
@@ -877,6 +900,8 @@
|
|
|
877
900
|
@content;
|
|
878
901
|
}
|
|
879
902
|
}
|
|
903
|
+
} @else {
|
|
904
|
+
@error "`#{$value}` is not a valid argument for `only`. Pass a positive or negative number, one of `first`, `last`, `odd`, `even`, or a selector such as `.foo`.";
|
|
880
905
|
}
|
|
881
906
|
} @else if length($params) > 1 {
|
|
882
907
|
$list: ();
|
|
@@ -1005,7 +1030,7 @@
|
|
|
1005
1030
|
}
|
|
1006
1031
|
}
|
|
1007
1032
|
} @else {
|
|
1008
|
-
@error "
|
|
1033
|
+
@error "`remove` takes at most 2 arguments; you passed #{length($params)}. Pass nothing to hide the element outright, one breakpoint, `min`/`max` plus a breakpoint, or a start and an end breakpoint.";
|
|
1009
1034
|
}
|
|
1010
1035
|
}
|
|
1011
1036
|
|
|
@@ -1135,6 +1160,8 @@
|
|
|
1135
1160
|
#{nth($corners, 4)} 100%,
|
|
1136
1161
|
0 calc(100% - #{nth($corners, 4)})
|
|
1137
1162
|
);
|
|
1163
|
+
} @else {
|
|
1164
|
+
@error "`scissors` takes either 1 corner size or 4; you passed #{length($corners)}. Pass one length to cut every corner equally, or four lengths in top-left, top-right, bottom-right, bottom-left order.";
|
|
1138
1165
|
}
|
|
1139
1166
|
}
|
|
1140
1167
|
|
|
@@ -1185,9 +1212,11 @@
|
|
|
1185
1212
|
and (orientation: landscape) {
|
|
1186
1213
|
@content;
|
|
1187
1214
|
}
|
|
1215
|
+
} @else {
|
|
1216
|
+
@error "`#{$orientation}` is not a valid $orientation for `smartphone`. Pass `portrait`, `landscape`, or no orientation at all.";
|
|
1188
1217
|
}
|
|
1189
1218
|
} @else {
|
|
1190
|
-
@
|
|
1219
|
+
@error "`#{$device}` is not a device known to `smartphone`. Pass one of: #{map-keys($map-for-smartphones)}.";
|
|
1191
1220
|
}
|
|
1192
1221
|
}
|
|
1193
1222
|
|
|
@@ -1203,6 +1232,8 @@
|
|
|
1203
1232
|
display: inline-block;
|
|
1204
1233
|
background-image: url($image-url);
|
|
1205
1234
|
background-repeat: no-repeat;
|
|
1235
|
+
} @else {
|
|
1236
|
+
@error "`#{nth($params, 1)}` is not a valid image path for `sprite`. The path must end in .png, .jpg or .svg.";
|
|
1206
1237
|
}
|
|
1207
1238
|
} @else {
|
|
1208
1239
|
$position: nth($params, 1);
|
|
@@ -1215,6 +1246,8 @@
|
|
|
1215
1246
|
background-image: url($image-url);
|
|
1216
1247
|
background-position: $position;
|
|
1217
1248
|
background-repeat: no-repeat;
|
|
1249
|
+
} @else {
|
|
1250
|
+
@error "`sprite` takes 1 or 2 arguments; you passed #{length($params)}. Pass an image path, a background position, or both in that order.";
|
|
1218
1251
|
}
|
|
1219
1252
|
@content;
|
|
1220
1253
|
}
|
|
@@ -1257,9 +1290,11 @@
|
|
|
1257
1290
|
and (orientation: landscape) {
|
|
1258
1291
|
@content;
|
|
1259
1292
|
}
|
|
1293
|
+
} @else {
|
|
1294
|
+
@error "`#{$orientation}` is not a valid $orientation for `tablet`. Pass `portrait`, `landscape`, or no orientation at all.";
|
|
1260
1295
|
}
|
|
1261
1296
|
} @else {
|
|
1262
|
-
@
|
|
1297
|
+
@error "`#{$device}` is not a device known to `tablet`. Pass one of: #{map-keys($map-for-tablets)}.";
|
|
1263
1298
|
}
|
|
1264
1299
|
}
|
|
1265
1300
|
|
|
@@ -1318,6 +1353,10 @@
|
|
|
1318
1353
|
*::selection {
|
|
1319
1354
|
@content;
|
|
1320
1355
|
}
|
|
1356
|
+
} @else if not & and $value == "only" {
|
|
1357
|
+
@error "`only` has no meaning at the root of a stylesheet, because there is no selector to limit the effect to. Call `text-selection(\"only\")` inside a selector, or pass no argument at all.";
|
|
1358
|
+
} @else {
|
|
1359
|
+
@error "`#{$value}` is not a valid argument for `text-selection`. Pass `\"only\"` inside a selector to affect just that element, or pass no argument at all.";
|
|
1321
1360
|
}
|
|
1322
1361
|
}
|
|
1323
1362
|
|
|
@@ -1506,6 +1545,6 @@
|
|
|
1506
1545
|
@content;
|
|
1507
1546
|
}
|
|
1508
1547
|
} @else {
|
|
1509
|
-
@error "The argument for direction must be one of the followings: #{
|
|
1548
|
+
@error "The argument for direction must be one of the followings: #{$list-of-directions}";
|
|
1510
1549
|
}
|
|
1511
1550
|
}
|
|
@@ -25,5 +25,9 @@
|
|
|
25
25
|
-webkit-font-smoothing: antialiased;
|
|
26
26
|
-moz-osx-font-smoothing: grayscale;
|
|
27
27
|
}
|
|
28
|
+
} @else if not & and $value == "only" {
|
|
29
|
+
@error "`only` has no meaning at the root of a stylesheet, because there is no selector to limit the effect to. Call `antialias(\"only\")` inside a selector, or pass no argument at all.";
|
|
30
|
+
} @else {
|
|
31
|
+
@error "`#{$value}` is not a valid argument for `antialias`. Pass `\"only\"` inside a selector to affect just that element, or pass no argument at all.";
|
|
28
32
|
}
|
|
29
33
|
}
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
$diagonal: true,
|
|
8
8
|
$image: null
|
|
9
9
|
) {
|
|
10
|
+
@if $diagonal != true and $diagonal != false {
|
|
11
|
+
@error "`#{$diagonal}` is not a valid $diagonal for `background-dots`. Pass `true` or `false`.";
|
|
12
|
+
}
|
|
10
13
|
@if not $color {
|
|
11
14
|
$color: rgba(0, 0, 0, 0.1);
|
|
12
15
|
@if $diagonal == true {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
),
|
|
24
24
|
url($image-url);
|
|
25
25
|
} @else {
|
|
26
|
-
@if index("deg", unit($filter-direction)) {
|
|
26
|
+
@if type-of($filter-direction) == "number" and index("deg", unit($filter-direction)) {
|
|
27
27
|
background-image: linear-gradient($filter-direction, $color-list),
|
|
28
28
|
url($image-url);
|
|
29
29
|
} @else {
|
|
30
|
-
@error "
|
|
30
|
+
@error "`#{$filter-direction}` is not a valid $filter-direction. Pass an angle such as `45deg`, or one of: #{map-keys($map-for-directions)}.";
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
} @else {
|
|
@@ -22,5 +22,9 @@
|
|
|
22
22
|
*::after {
|
|
23
23
|
box-sizing: border-box;
|
|
24
24
|
}
|
|
25
|
+
} @else if not & and $value == "only" {
|
|
26
|
+
@error "`only` has no meaning at the root of a stylesheet, because there is no selector to limit the effect to. Call `border-box(\"only\")` inside a selector, or pass no argument at all.";
|
|
27
|
+
} @else {
|
|
28
|
+
@error "`#{$value}` is not a valid argument for `border-box`. Pass `\"only\"` inside a selector to affect just that element, or pass no argument at all.";
|
|
25
29
|
}
|
|
26
30
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
border-bottom-left-radius: $value;
|
|
40
40
|
}
|
|
41
41
|
} @else {
|
|
42
|
-
@error "Corner value must be one of the followings: #{
|
|
42
|
+
@error "Corner value must be one of the followings: #{$list}.";
|
|
43
43
|
}
|
|
44
44
|
} @else if length($args) == 4 {
|
|
45
45
|
$args: __null($args, space, true);
|
|
@@ -47,5 +47,7 @@
|
|
|
47
47
|
border-top-right-radius: nth($args, 2);
|
|
48
48
|
border-bottom-right-radius: nth($args, 3);
|
|
49
49
|
border-bottom-left-radius: nth($args, 4);
|
|
50
|
+
} @else {
|
|
51
|
+
@error "`border-radius` takes 1, 2 or 4 arguments; you passed #{length($args)}. Use one radius for every corner, a corner name plus a radius, or four radii in top-left, top-right, bottom-right, bottom-left order.";
|
|
50
52
|
}
|
|
51
53
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
3
|
@mixin center($axis: "both") {
|
|
4
|
+
@if not index("both" "horizontal" "vertical", $axis) {
|
|
5
|
+
@error "`#{$axis}` is not a valid $axis for `center`. Pass one of: both, horizontal, vertical.";
|
|
6
|
+
}
|
|
4
7
|
@if $axis == "both" or $axis == "vertical" {
|
|
5
8
|
top: 50%;
|
|
6
9
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
3
|
@mixin columnizer($params...) {
|
|
4
|
+
@if length($params) < 1 or length($params) > 3 {
|
|
5
|
+
@error "`columnizer` takes 1 to 3 arguments; you passed #{length($params)}. Pass the column count, optionally a gutter length, and optionally a boolean telling the last row whether to fill.";
|
|
6
|
+
}
|
|
4
7
|
$columns: nth($params, 1);
|
|
5
8
|
$gutter: null;
|
|
6
9
|
$fill: false;
|
|
@@ -36,6 +39,8 @@
|
|
|
36
39
|
&:nth-child(#{$columns}n) {
|
|
37
40
|
margin-right: 0;
|
|
38
41
|
}
|
|
42
|
+
} @else {
|
|
43
|
+
@error "`#{nth($params, 2)}` is not a valid second argument for `columnizer`. Pass a gutter length such as `20px`, or a boolean telling the last row whether to fill.";
|
|
39
44
|
}
|
|
40
45
|
} @else if length($params) == 3 {
|
|
41
46
|
$gutter: nth($params, 2);
|
package/scss/library/_only.scss
CHANGED
|
@@ -25,5 +25,7 @@
|
|
|
25
25
|
#{nth($corners, 4)} 100%,
|
|
26
26
|
0 calc(100% - #{nth($corners, 4)})
|
|
27
27
|
);
|
|
28
|
+
} @else {
|
|
29
|
+
@error "`scissors` takes either 1 corner size or 4; you passed #{length($corners)}. Pass one length to cut every corner equally, or four lengths in top-left, top-right, bottom-right, bottom-left order.";
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
and (orientation: landscape) {
|
|
17
17
|
@content;
|
|
18
18
|
}
|
|
19
|
+
} @else {
|
|
20
|
+
@error "`#{$orientation}` is not a valid $orientation for `smartphone`. Pass `portrait`, `landscape`, or no orientation at all.";
|
|
19
21
|
}
|
|
20
22
|
} @else {
|
|
21
|
-
@
|
|
23
|
+
@error "`#{$device}` is not a device known to `smartphone`. Pass one of: #{map-keys($map-for-smartphones)}.";
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
display: inline-block;
|
|
11
11
|
background-image: url($image-url);
|
|
12
12
|
background-repeat: no-repeat;
|
|
13
|
+
} @else {
|
|
14
|
+
@error "`#{nth($params, 1)}` is not a valid image path for `sprite`. The path must end in .png, .jpg or .svg.";
|
|
13
15
|
}
|
|
14
16
|
} @else {
|
|
15
17
|
$position: nth($params, 1);
|
|
@@ -22,6 +24,8 @@
|
|
|
22
24
|
background-image: url($image-url);
|
|
23
25
|
background-position: $position;
|
|
24
26
|
background-repeat: no-repeat;
|
|
27
|
+
} @else {
|
|
28
|
+
@error "`sprite` takes 1 or 2 arguments; you passed #{length($params)}. Pass an image path, a background position, or both in that order.";
|
|
25
29
|
}
|
|
26
30
|
@content;
|
|
27
31
|
}
|
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
and (orientation: landscape) {
|
|
17
17
|
@content;
|
|
18
18
|
}
|
|
19
|
+
} @else {
|
|
20
|
+
@error "`#{$orientation}` is not a valid $orientation for `tablet`. Pass `portrait`, `landscape`, or no orientation at all.";
|
|
19
21
|
}
|
|
20
22
|
} @else {
|
|
21
|
-
@
|
|
23
|
+
@error "`#{$device}` is not a device known to `tablet`. Pass one of: #{map-keys($map-for-tablets)}.";
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -14,5 +14,9 @@
|
|
|
14
14
|
*::selection {
|
|
15
15
|
@content;
|
|
16
16
|
}
|
|
17
|
+
} @else if not & and $value == "only" {
|
|
18
|
+
@error "`only` has no meaning at the root of a stylesheet, because there is no selector to limit the effect to. Call `text-selection(\"only\")` inside a selector, or pass no argument at all.";
|
|
19
|
+
} @else {
|
|
20
|
+
@error "`#{$value}` is not a valid argument for `text-selection`. Pass `\"only\"` inside a selector to affect just that element, or pass no argument at all.";
|
|
17
21
|
}
|
|
18
22
|
}
|