gerillass 1.6.1 → 2.0.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 +39 -4
- package/SKILL.md +30 -31
- package/gerillass.json +205 -189
- package/package.json +3 -13
- package/scss/_gerillass.scss +8 -91
- package/scss/library/_adaptive.scss +4 -1
- package/scss/library/_after.scss +5 -2
- package/scss/library/_all-buttons.scss +6 -2
- package/scss/library/_all-text-inputs.scss +6 -2
- package/scss/library/_aspect-ratio.scss +27 -0
- package/scss/library/_background-dots.scss +12 -7
- package/scss/library/_background-image.scss +18 -11
- package/scss/library/_background-stripes.scss +14 -9
- package/scss/library/_before.scss +5 -2
- package/scss/library/_border-radius.scss +19 -15
- package/scss/library/_brand-logo.scss +3 -1
- package/scss/library/_breakpoint.scss +25 -20
- package/scss/library/_breakpointer.scss +4 -1
- package/scss/library/_center.scss +3 -1
- package/scss/library/_columnizer.scss +18 -13
- package/scss/library/_counter.scss +21 -18
- package/scss/library/_escape-to-parent.scss +3 -1
- package/scss/library/_except.scss +12 -8
- package/scss/library/_font-face.scss +17 -12
- package/scss/library/_index.scss +52 -0
- package/scss/library/_linear-gradient.scss +13 -7
- package/scss/library/_loadify.scss +15 -11
- package/scss/library/_only.scss +12 -8
- package/scss/library/_position.scss +10 -6
- package/scss/library/_radial-gradient.scss +15 -9
- package/scss/library/_remove.scss +17 -14
- package/scss/library/_reset-figure.scss +3 -1
- package/scss/library/_scissors.scss +24 -21
- package/scss/library/_smartphone.scss +10 -6
- package/scss/library/_sprite.scss +16 -12
- package/scss/library/_stretched-link.scss +3 -1
- package/scss/library/_tablet.scss +10 -6
- package/scss/library/_text-gradient.scss +13 -7
- package/scss/library/_text-shadow.scss +46 -40
- package/scss/library/_triangle.scss +15 -10
- package/scss/lists/_index.scss +8 -0
- package/scss/maps/_index.scss +8 -0
- package/scss/utilities/_clear-unit.scss +3 -1
- package/scss/utilities/_clear-whitespace.scss +9 -6
- package/scss/utilities/_convert-to-em.scss +5 -2
- package/scss/utilities/_convert-to-number.scss +10 -6
- package/scss/utilities/_fill-nulls.scss +18 -0
- package/scss/utilities/_font-sizer.scss +1 -1
- package/scss/utilities/_font-source.scss +15 -10
- package/scss/utilities/_index.scss +24 -0
- package/scss/utilities/_is-color.scss +8 -5
- package/scss/utilities/_is-gutter.scss +24 -0
- package/scss/utilities/_is-number.scss +4 -2
- package/scss/utilities/_is-time.scss +8 -3
- package/scss/utilities/_map-deep-get.scss +4 -2
- package/scss/utilities/_pixelify.scss +11 -7
- package/scss/utilities/_pseudo-selector.scss +4 -2
- package/scss/utilities/_remify.scss +3 -1
- package/scss/utilities/_shade.scss +10 -0
- package/scss/utilities/_shorthand-property.scss +13 -11
- package/scss/utilities/_tint.scss +10 -0
- package/scss/utilities/_validate-breakpoint.scss +9 -5
- package/scss/utilities/_validate-length.scss +10 -5
- package/scss/utilities/_validate-ratio.scss +27 -15
- package/scss/utilities/_validate-scissors.scss +16 -11
- package/scss/_gerillass-prefix.scss +0 -1586
- package/scss/library/_ratio-box.scss +0 -19
- package/scss/library/_responsive-video.scss +0 -19
- package/scss/utilities/_darken.scss +0 -7
- package/scss/utilities/_lighten.scss +0 -7
- package/scss/utilities/_null.scss +0 -16
package/package.json
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"license": "Apache-2.0",
|
|
19
|
-
"version": "
|
|
19
|
+
"version": "2.0.0",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
22
|
"url": "git+https://github.com/selfishprimate/gerillass.git"
|
|
23
23
|
},
|
|
24
24
|
"bugs": {
|
|
25
|
-
"url": "https://github.com/
|
|
25
|
+
"url": "https://github.com/selfishprimate/gerillass/issues"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"gerillass",
|
|
@@ -37,24 +37,14 @@
|
|
|
37
37
|
"sass-toolkit",
|
|
38
38
|
"sass-library",
|
|
39
39
|
"sass-framework",
|
|
40
|
-
"sass-tool-set"
|
|
41
|
-
"eyeglass-module"
|
|
40
|
+
"sass-tool-set"
|
|
42
41
|
],
|
|
43
|
-
"eyeglass": {
|
|
44
|
-
"sassDir": "scss",
|
|
45
|
-
"exports": false,
|
|
46
|
-
"name": "gerillass",
|
|
47
|
-
"needs": "^3.0.0"
|
|
48
|
-
},
|
|
49
42
|
"scripts": {
|
|
50
43
|
"manifest": "node tools/build-manifest.js && node tools/build-skill.js",
|
|
51
44
|
"test": "jest"
|
|
52
45
|
},
|
|
53
46
|
"devDependencies": {
|
|
54
47
|
"glob": "^11.0.0",
|
|
55
|
-
"gulp": "^5.0.1",
|
|
56
|
-
"gulp-concat": "^2.6.1",
|
|
57
|
-
"gulp-replace": "^1.1.4",
|
|
58
48
|
"jest": "^30.0.5",
|
|
59
49
|
"sass": "^1.90.0",
|
|
60
50
|
"sass-true": "^9.0.0"
|
package/scss/_gerillass.scss
CHANGED
|
@@ -1,98 +1,15 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
-
@use "sass:math";
|
|
3
2
|
|
|
4
3
|
// https://www.gerillass.com/
|
|
5
4
|
// Copyright 2020 by Halil İbrahim Çakıroğlu
|
|
6
5
|
// Apache License 2.0
|
|
7
6
|
|
|
8
|
-
@
|
|
9
|
-
@
|
|
10
|
-
@
|
|
11
|
-
@
|
|
12
|
-
@import "lists/list-of-length-units";
|
|
13
|
-
@import "lists/list-of-text-inputs";
|
|
14
|
-
|
|
15
|
-
@import "maps/map-for-breakpoints";
|
|
16
|
-
@import "maps/map-for-directions";
|
|
17
|
-
@import "maps/map-for-font-formats";
|
|
18
|
-
@import "maps/map-for-positions";
|
|
19
|
-
@import "maps/map-for-smartphones";
|
|
20
|
-
@import "maps/map-for-tablets";
|
|
21
|
-
|
|
22
|
-
@import "utilities/clear-unit";
|
|
23
|
-
@import "utilities/clear-whitespace";
|
|
24
|
-
@import "utilities/convert-to-em";
|
|
25
|
-
@import "utilities/convert-to-number";
|
|
26
|
-
@import "utilities/darken";
|
|
27
|
-
@import "utilities/font-sizer";
|
|
28
|
-
@import "utilities/font-source";
|
|
29
|
-
@import "utilities/is-color";
|
|
30
|
-
@import "utilities/is-number";
|
|
31
|
-
@import "utilities/is-time";
|
|
32
|
-
@import "utilities/lighten";
|
|
33
|
-
@import "utilities/map-deep-get";
|
|
34
|
-
@import "utilities/null";
|
|
35
|
-
@import "utilities/pixelify";
|
|
36
|
-
@import "utilities/pseudo-selector";
|
|
37
|
-
@import "utilities/remify";
|
|
38
|
-
@import "utilities/shorthand-property";
|
|
39
|
-
@import "utilities/validate-breakpoint";
|
|
40
|
-
@import "utilities/validate-length";
|
|
41
|
-
@import "utilities/validate-ratio";
|
|
42
|
-
@import "utilities/validate-scissors";
|
|
43
|
-
|
|
44
|
-
@import "library/adaptive";
|
|
45
|
-
@import "library/after";
|
|
46
|
-
@import "library/all-buttons";
|
|
47
|
-
@import "library/all-text-inputs";
|
|
48
|
-
@import "library/antialias";
|
|
49
|
-
@import "library/background-dots";
|
|
50
|
-
@import "library/background-image";
|
|
51
|
-
@import "library/background-stripes";
|
|
52
|
-
@import "library/before";
|
|
53
|
-
@import "library/border-box";
|
|
54
|
-
@import "library/border-radius";
|
|
55
|
-
@import "library/brand-logo";
|
|
56
|
-
@import "library/breakpoint";
|
|
57
|
-
@import "library/breakpointer";
|
|
58
|
-
@import "library/center";
|
|
59
|
-
@import "library/circle";
|
|
60
|
-
@import "library/clearfix";
|
|
61
|
-
@import "library/columnizer";
|
|
62
|
-
@import "library/counter";
|
|
63
|
-
@import "library/ellipsis";
|
|
64
|
-
@import "library/escape-to-parent";
|
|
65
|
-
@import "library/except";
|
|
66
|
-
@import "library/font-face";
|
|
67
|
-
@import "library/hide";
|
|
68
|
-
@import "library/linear-gradient";
|
|
69
|
-
@import "library/loadify";
|
|
70
|
-
@import "library/only";
|
|
71
|
-
@import "library/placeholder-shown";
|
|
72
|
-
@import "library/placeholder";
|
|
73
|
-
@import "library/position";
|
|
74
|
-
@import "library/radial-gradient";
|
|
75
|
-
@import "library/ratio-box";
|
|
76
|
-
@import "library/remove";
|
|
77
|
-
@import "library/reset-css";
|
|
78
|
-
@import "library/reset-figure";
|
|
79
|
-
@import "library/resizable";
|
|
80
|
-
@import "library/responsive-image";
|
|
81
|
-
@import "library/responsive-video";
|
|
82
|
-
@import "library/scissors";
|
|
83
|
-
@import "library/screen-agent";
|
|
84
|
-
@import "library/sizer";
|
|
85
|
-
@import "library/smartphone";
|
|
86
|
-
@import "library/sprite";
|
|
87
|
-
@import "library/stretched-link";
|
|
88
|
-
@import "library/tablet";
|
|
89
|
-
@import "library/text-gradient";
|
|
90
|
-
@import "library/text-image";
|
|
91
|
-
@import "library/text-selection";
|
|
92
|
-
@import "library/text-shadow";
|
|
93
|
-
@import "library/text-stroke";
|
|
94
|
-
@import "library/triangle";
|
|
95
|
-
|
|
96
|
-
// Import prefixed version of Gerillass
|
|
97
|
-
@import "gerillass-prefix";
|
|
7
|
+
@forward "lists";
|
|
8
|
+
@forward "maps";
|
|
9
|
+
@forward "utilities";
|
|
10
|
+
@forward "library";
|
|
98
11
|
|
|
12
|
+
// The gls- prefixed half of the API. Until 2.0.0 this was a generated file:
|
|
13
|
+
// gulpfile.js concatenated scss/library and rewrote "@mixin " to "@mixin gls-".
|
|
14
|
+
// The module system does the same thing in one line, so the generator is gone.
|
|
15
|
+
@forward "library" as gls-*;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "../maps/map-for-breakpoints" as *;
|
|
5
|
+
|
|
3
6
|
@mixin adaptive($gutter: 30px) {
|
|
4
|
-
$actual-breakpoints: map
|
|
7
|
+
$actual-breakpoints: map.remove($map-for-breakpoints, "xsmall");
|
|
5
8
|
margin: 0 auto;
|
|
6
9
|
@each $item, $value in $actual-breakpoints {
|
|
7
10
|
@media (min-width: #{$value}) {
|
package/scss/library/_after.scss
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:meta";
|
|
4
|
+
@use "sass:string";
|
|
5
|
+
|
|
3
6
|
@mixin after($content: null) {
|
|
4
7
|
&::after {
|
|
5
8
|
@if $content == null {
|
|
6
9
|
@content;
|
|
7
|
-
} @else if type-of($content) != "string" {
|
|
10
|
+
} @else if meta.type-of($content) != "string" {
|
|
8
11
|
@error "`#{$content}` is not a valid $content for `after`. Pass a string to use as the content value, a data- attribute name such as `\"data-label\"` to render it with attr(), or no argument at all and write the content yourself.";
|
|
9
12
|
} @else {
|
|
10
|
-
$data:
|
|
13
|
+
$data: string.slice($content, 1, 5);
|
|
11
14
|
@if $data == "data-" {
|
|
12
15
|
content: attr(#{$content});
|
|
13
16
|
@content;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "../lists/list-of-buttons" as *;
|
|
5
|
+
@use "../utilities/pseudo-selector" as *;
|
|
6
|
+
|
|
3
7
|
@mixin all-buttons($pseudo: null) {
|
|
4
8
|
$list: "hover", "focus", "active", "disabled";
|
|
5
9
|
@if not $pseudo {
|
|
6
10
|
#{$list-of-buttons} {
|
|
7
11
|
@content;
|
|
8
12
|
}
|
|
9
|
-
} @else if index($list, $pseudo) {
|
|
10
|
-
$all-buttons:
|
|
13
|
+
} @else if list.index($list, $pseudo) {
|
|
14
|
+
$all-buttons: pseudoSelector($list-of-buttons, $pseudo);
|
|
11
15
|
#{$all-buttons} {
|
|
12
16
|
@content;
|
|
13
17
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "../lists/list-of-text-inputs" as *;
|
|
5
|
+
@use "../utilities/pseudo-selector" as *;
|
|
6
|
+
|
|
3
7
|
@mixin all-text-inputs($pseudo: null) {
|
|
4
8
|
$list: "hover", "focus", "active", "invalid", "required", "disabled";
|
|
5
9
|
@if not $pseudo {
|
|
6
10
|
#{$list-of-text-inputs} {
|
|
7
11
|
@content;
|
|
8
12
|
}
|
|
9
|
-
} @else if index($list, $pseudo) {
|
|
10
|
-
$all-text-inputs:
|
|
13
|
+
} @else if list.index($list, $pseudo) {
|
|
14
|
+
$all-text-inputs: pseudoSelector($list-of-text-inputs, $pseudo);
|
|
11
15
|
#{$all-text-inputs} {
|
|
12
16
|
@content;
|
|
13
17
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "../utilities/validate-ratio" as *;
|
|
5
|
+
|
|
6
|
+
// Holds an element to a ratio, and closes the three gaps CSS leaves open when
|
|
7
|
+
// you set `aspect-ratio` by hand. All three were measured in a browser:
|
|
8
|
+
//
|
|
9
|
+
// * an <img> with a ratio but no `object-fit` is stretched, not cropped;
|
|
10
|
+
// * an <iframe> carries a 2px default border, so `width: 100%` overflows its
|
|
11
|
+
// container by 4px;
|
|
12
|
+
// * the ratio belongs on the element itself. On a wrapper it does nothing for
|
|
13
|
+
// an <iframe> inside, which keeps its intrinsic 300x150.
|
|
14
|
+
//
|
|
15
|
+
// Pass `null` as $fit to leave `object-fit` alone.
|
|
16
|
+
@mixin aspect-ratio($ratio: null, $fit: cover) {
|
|
17
|
+
@if $fit and not list.index("fill" "contain" "cover" "none" "scale-down", $fit) {
|
|
18
|
+
@error "`#{$fit}` is not a valid $fit for `aspect-ratio`. Pass one of: fill, contain, cover, none, scale-down, or null to leave object-fit alone.";
|
|
19
|
+
}
|
|
20
|
+
display: block;
|
|
21
|
+
width: 100%;
|
|
22
|
+
aspect-ratio: validateRatio($ratio);
|
|
23
|
+
border: 0;
|
|
24
|
+
@if $fit {
|
|
25
|
+
object-fit: $fit;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "sass:math";
|
|
5
|
+
@use "sass:meta";
|
|
6
|
+
@use "sass:string";
|
|
7
|
+
|
|
3
8
|
@mixin background-dots(
|
|
4
9
|
$color: null,
|
|
5
10
|
$size: 1em,
|
|
@@ -7,7 +12,7 @@
|
|
|
7
12
|
$diagonal: true,
|
|
8
13
|
$image: null
|
|
9
14
|
) {
|
|
10
|
-
@if $image != null and type-of($image) != "string" {
|
|
15
|
+
@if $image != null and meta.type-of($image) != "string" {
|
|
11
16
|
@error "`#{$image}` is not a valid $image for `background-dots`. Pass an image path as a string.";
|
|
12
17
|
}
|
|
13
18
|
@if $diagonal != true and $diagonal != false {
|
|
@@ -26,15 +31,15 @@
|
|
|
26
31
|
}
|
|
27
32
|
} @else if $color {
|
|
28
33
|
@if $diagonal == true {
|
|
29
|
-
background-image: radial-gradient(nth($color, 1) $size, transparent 0),
|
|
30
|
-
radial-gradient(nth($color, length($color)) $size, transparent 0);
|
|
34
|
+
background-image: radial-gradient(list.nth($color, 1) $size, transparent 0),
|
|
35
|
+
radial-gradient(list.nth($color, list.length($color)) $size, transparent 0);
|
|
31
36
|
background-position: math.div($gutter, 2) math.div($gutter, 2),
|
|
32
37
|
($gutter * 2) ($gutter * 2);
|
|
33
38
|
} @else if $diagonal == false {
|
|
34
|
-
background-image: radial-gradient(nth($color, 1) $size, transparent 0);
|
|
39
|
+
background-image: radial-gradient(list.nth($color, 1) $size, transparent 0);
|
|
35
40
|
background-position: math.div($gutter, 2) math.div($gutter, 2);
|
|
36
|
-
@if length($color) > 1 {
|
|
37
|
-
@error "Please do not pass more than one argument when you disable 'diagonal' property! Simply remove the argument(s) after '#{nth($color, 1)}' to resolve the problem.";
|
|
41
|
+
@if list.length($color) > 1 {
|
|
42
|
+
@error "Please do not pass more than one argument when you disable 'diagonal' property! Simply remove the argument(s) after '#{list.nth($color, 1)}' to resolve the problem.";
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
45
|
}
|
|
@@ -50,7 +55,7 @@
|
|
|
50
55
|
height: 100%;
|
|
51
56
|
top: 0;
|
|
52
57
|
left: 0;
|
|
53
|
-
background-image: url(unquote($image));
|
|
58
|
+
background-image: url(string.unquote($image));
|
|
54
59
|
background-repeat: no-repeat;
|
|
55
60
|
background-position: center;
|
|
56
61
|
background-size: cover;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@use "sass:math";
|
|
6
|
+
@use "sass:meta";
|
|
7
|
+
@use "../library/linear-gradient" as *;
|
|
8
|
+
@use "../maps/map-for-directions" as *;
|
|
9
|
+
|
|
3
10
|
@mixin background-image(
|
|
4
11
|
$image-url: null,
|
|
5
12
|
$filter-color: null,
|
|
@@ -7,27 +14,27 @@
|
|
|
7
14
|
) {
|
|
8
15
|
@if $image-url {
|
|
9
16
|
@if $filter-color {
|
|
10
|
-
@if length($filter-color) == 1 {
|
|
17
|
+
@if list.length($filter-color) == 1 {
|
|
11
18
|
background-image: linear-gradient(to top, $filter-color, $filter-color),
|
|
12
19
|
url($image-url);
|
|
13
|
-
} @else if length($filter-color) > 1 {
|
|
20
|
+
} @else if list.length($filter-color) > 1 {
|
|
14
21
|
$color-list: ();
|
|
15
|
-
@for $i from 1 through length($filter-color) {
|
|
16
|
-
$color-list: append($color-list, nth($filter-color, $i), comma);
|
|
22
|
+
@for $i from 1 through list.length($filter-color) {
|
|
23
|
+
$color-list: list.append($color-list, list.nth($filter-color, $i), comma);
|
|
17
24
|
}
|
|
18
25
|
@if $filter-direction {
|
|
19
|
-
@if map
|
|
26
|
+
@if map.has-key($map-for-directions, $filter-direction) {
|
|
20
27
|
background-image: linear-gradient(
|
|
21
|
-
map
|
|
28
|
+
map.get($map-for-directions, $filter-direction),
|
|
22
29
|
$color-list
|
|
23
30
|
),
|
|
24
31
|
url($image-url);
|
|
25
32
|
} @else {
|
|
26
|
-
@if type-of($filter-direction) == "number" and index("deg", unit($filter-direction)) {
|
|
33
|
+
@if meta.type-of($filter-direction) == "number" and list.index("deg", math.unit($filter-direction)) {
|
|
27
34
|
background-image: linear-gradient($filter-direction, $color-list),
|
|
28
35
|
url($image-url);
|
|
29
36
|
} @else {
|
|
30
|
-
@error "`#{$filter-direction}` is not a valid $filter-direction. Pass an angle such as `45deg`, or one of: #{map
|
|
37
|
+
@error "`#{$filter-direction}` is not a valid $filter-direction. Pass an angle such as `45deg`, or one of: #{map.keys($map-for-directions)}.";
|
|
31
38
|
}
|
|
32
39
|
}
|
|
33
40
|
} @else {
|
|
@@ -48,10 +55,10 @@
|
|
|
48
55
|
top: 0;
|
|
49
56
|
width: 100%;
|
|
50
57
|
height: 100%;
|
|
51
|
-
@if length($filter-color) == 1 {
|
|
58
|
+
@if list.length($filter-color) == 1 {
|
|
52
59
|
background: $filter-color;
|
|
53
|
-
} @else if length($filter-color) > 1 {
|
|
54
|
-
@include
|
|
60
|
+
} @else if list.length($filter-color) > 1 {
|
|
61
|
+
@include linear-gradient(
|
|
55
62
|
if(not $filter-direction, "top", $filter-direction),
|
|
56
63
|
$filter-color
|
|
57
64
|
);
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "sass:math";
|
|
5
|
+
@use "sass:meta";
|
|
6
|
+
@use "sass:string";
|
|
7
|
+
|
|
3
8
|
@mixin background-stripes(
|
|
4
9
|
$color: null,
|
|
5
10
|
$thickness: 1em,
|
|
6
11
|
$rotation: -45deg,
|
|
7
12
|
$image: null
|
|
8
13
|
) {
|
|
9
|
-
@if type-of($rotation) != "number" {
|
|
14
|
+
@if meta.type-of($rotation) != "number" {
|
|
10
15
|
@error "`#{$rotation}` is not a valid $rotation for `background-stripes`. Pass an angle such as `-45deg`, or a unitless number which is treated as degrees.";
|
|
11
16
|
}
|
|
12
|
-
@if $image != null and type-of($image) != "string" {
|
|
17
|
+
@if $image != null and meta.type-of($image) != "string" {
|
|
13
18
|
@error "`#{$image}` is not a valid $image for `background-stripes`. Pass an image path as a string.";
|
|
14
19
|
}
|
|
15
|
-
$validate-unit: if(not index("deg", unit($rotation)), $rotation + deg, $rotation);
|
|
16
|
-
$get-image: if($image, unquote(", ") + url(unquote($image)), unquote(""));
|
|
20
|
+
$validate-unit: if(not list.index("deg", math.unit($rotation)), $rotation + deg, $rotation);
|
|
21
|
+
$get-image: if($image, string.unquote(", ") + url(string.unquote($image)), string.unquote(""));
|
|
17
22
|
@if not $color {
|
|
18
23
|
$color: rgba(0, 0, 0, 0.1);
|
|
19
24
|
background-image: repeating-linear-gradient(
|
|
@@ -28,7 +33,7 @@
|
|
|
28
33
|
background-repeat: no-repeat;
|
|
29
34
|
background-size: cover;
|
|
30
35
|
}
|
|
31
|
-
} @else if length($color) == 1 {
|
|
36
|
+
} @else if list.length($color) == 1 {
|
|
32
37
|
background-image: repeating-linear-gradient(
|
|
33
38
|
$validate-unit,
|
|
34
39
|
$color 0,
|
|
@@ -41,12 +46,12 @@
|
|
|
41
46
|
background-repeat: no-repeat;
|
|
42
47
|
background-size: cover;
|
|
43
48
|
}
|
|
44
|
-
} @else if length($color) > 1 {
|
|
49
|
+
} @else if list.length($color) > 1 {
|
|
45
50
|
$list: ();
|
|
46
|
-
@for $i from 1 through length($color) {
|
|
47
|
-
$index-color: nth($color, $i);
|
|
51
|
+
@for $i from 1 through list.length($color) {
|
|
52
|
+
$index-color: list.nth($color, $i);
|
|
48
53
|
$style-rule: $index-color ($thickness * $i) - $thickness, $index-color $thickness * $i;
|
|
49
|
-
$list: append($list, $style-rule, comma);
|
|
54
|
+
$list: list.append($list, $style-rule, comma);
|
|
50
55
|
}
|
|
51
56
|
background-image: repeating-linear-gradient($validate-unit, $list) + $get-image;
|
|
52
57
|
@if $image {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:meta";
|
|
4
|
+
@use "sass:string";
|
|
5
|
+
|
|
3
6
|
@mixin before($content: null) {
|
|
4
7
|
&::before {
|
|
5
8
|
@if $content == null {
|
|
6
9
|
@content;
|
|
7
|
-
} @else if type-of($content) != "string" {
|
|
10
|
+
} @else if meta.type-of($content) != "string" {
|
|
8
11
|
@error "`#{$content}` is not a valid $content for `before`. Pass a string to use as the content value, a data- attribute name such as `\"data-label\"` to render it with attr(), or no argument at all and write the content yourself.";
|
|
9
12
|
} @else {
|
|
10
|
-
$data:
|
|
13
|
+
$data: string.slice($content, 1, 5);
|
|
11
14
|
@if $data == "data-" {
|
|
12
15
|
content: attr(#{$content});
|
|
13
16
|
@content;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "../lists/list-of-directions" as *;
|
|
5
|
+
@use "../utilities/fill-nulls" as *;
|
|
6
|
+
|
|
3
7
|
@mixin border-radius($args...) {
|
|
4
|
-
$list: join($list-of-directions, ("cross-left", "cross-right", "all"));
|
|
5
|
-
@if length($args) == 1 {
|
|
6
|
-
$value: nth($args, 1);
|
|
7
|
-
border-radius:
|
|
8
|
-
} @else if length($args) == 2 {
|
|
9
|
-
$corner: nth($args, 1);
|
|
10
|
-
$value: nth($args, 2);
|
|
11
|
-
@if index($list, $corner) {
|
|
8
|
+
$list: list.join($list-of-directions, ("cross-left", "cross-right", "all"));
|
|
9
|
+
@if list.length($args) == 1 {
|
|
10
|
+
$value: list.nth($args, 1);
|
|
11
|
+
border-radius: fillNulls($value, space);
|
|
12
|
+
} @else if list.length($args) == 2 {
|
|
13
|
+
$corner: list.nth($args, 1);
|
|
14
|
+
$value: list.nth($args, 2);
|
|
15
|
+
@if list.index($list, $corner) {
|
|
12
16
|
@if $corner == "top" {
|
|
13
17
|
border-top-left-radius: $value;
|
|
14
18
|
border-top-right-radius: $value;
|
|
@@ -41,13 +45,13 @@
|
|
|
41
45
|
} @else {
|
|
42
46
|
@error "Corner value must be one of the followings: #{$list}.";
|
|
43
47
|
}
|
|
44
|
-
} @else if length($args) == 4 {
|
|
45
|
-
$args:
|
|
46
|
-
border-top-left-radius: nth($args, 1);
|
|
47
|
-
border-top-right-radius: nth($args, 2);
|
|
48
|
-
border-bottom-right-radius: nth($args, 3);
|
|
49
|
-
border-bottom-left-radius: nth($args, 4);
|
|
48
|
+
} @else if list.length($args) == 4 {
|
|
49
|
+
$args: fillNulls($args, space, true);
|
|
50
|
+
border-top-left-radius: list.nth($args, 1);
|
|
51
|
+
border-top-right-radius: list.nth($args, 2);
|
|
52
|
+
border-bottom-right-radius: list.nth($args, 3);
|
|
53
|
+
border-bottom-left-radius: list.nth($args, 4);
|
|
50
54
|
} @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.";
|
|
55
|
+
@error "`border-radius` takes 1, 2 or 4 arguments; you passed #{list.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.";
|
|
52
56
|
}
|
|
53
57
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "../library/stretched-link" as *;
|
|
4
|
+
|
|
3
5
|
@mixin brand-logo($width, $height, $image-url: null) {
|
|
4
6
|
display: inline-block;
|
|
5
7
|
position: relative;
|
|
@@ -17,6 +19,6 @@
|
|
|
17
19
|
height: 1px;
|
|
18
20
|
overflow: hidden;
|
|
19
21
|
text-indent: 100%;
|
|
20
|
-
@include
|
|
22
|
+
@include stretched-link(after);
|
|
21
23
|
}
|
|
22
24
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@use "../maps/map-for-breakpoints" as *;
|
|
6
|
+
@use "../utilities/validate-breakpoint" as *;
|
|
7
|
+
|
|
3
8
|
@mixin breakpoint($params...) {
|
|
4
|
-
@if length($params) == 1 {
|
|
5
|
-
$value: nth($params, 1);
|
|
6
|
-
@if map
|
|
7
|
-
@media (width: map
|
|
9
|
+
@if list.length($params) == 1 {
|
|
10
|
+
$value: list.nth($params, 1);
|
|
11
|
+
@if map.has-key($map-for-breakpoints, $value) {
|
|
12
|
+
@media (width: map.get($map-for-breakpoints, $value)) {
|
|
8
13
|
@content;
|
|
9
14
|
}
|
|
10
15
|
} @else {
|
|
@@ -12,19 +17,19 @@
|
|
|
12
17
|
@content;
|
|
13
18
|
}
|
|
14
19
|
}
|
|
15
|
-
} @else if length($params) == 2 {
|
|
16
|
-
@if not index("only" "min" "max" "between", nth($params, 1)) {
|
|
17
|
-
$start: nth($params, 1);
|
|
18
|
-
$end: nth($params, 2);
|
|
19
|
-
@media (min-width: #{
|
|
20
|
+
} @else if list.length($params) == 2 {
|
|
21
|
+
@if not list.index("only" "min" "max" "between", list.nth($params, 1)) {
|
|
22
|
+
$start: list.nth($params, 1);
|
|
23
|
+
$end: list.nth($params, 2);
|
|
24
|
+
@media (min-width: #{validateBreakpoint($start)}) and (max-width: #{if(map.has-key($map-for-breakpoints, $end), validateBreakpoint($end) - 1, $end)}) {
|
|
20
25
|
@content;
|
|
21
26
|
}
|
|
22
27
|
} @else {
|
|
23
|
-
$mode: nth($params, 1);
|
|
24
|
-
$value: nth($params, 2);
|
|
28
|
+
$mode: list.nth($params, 1);
|
|
29
|
+
$value: list.nth($params, 2);
|
|
25
30
|
@if $mode == "only" {
|
|
26
|
-
@if map
|
|
27
|
-
@media (width: map
|
|
31
|
+
@if map.has-key($map-for-breakpoints, $value) {
|
|
32
|
+
@media (width: map.get($map-for-breakpoints, $value)) {
|
|
28
33
|
@content;
|
|
29
34
|
}
|
|
30
35
|
} @else {
|
|
@@ -33,8 +38,8 @@
|
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
} @else if $mode == "min" {
|
|
36
|
-
@if map
|
|
37
|
-
@media (min-width: map
|
|
41
|
+
@if map.has-key($map-for-breakpoints, $value) {
|
|
42
|
+
@media (min-width: map.get($map-for-breakpoints, $value)) {
|
|
38
43
|
@content;
|
|
39
44
|
}
|
|
40
45
|
} @else {
|
|
@@ -43,8 +48,8 @@
|
|
|
43
48
|
}
|
|
44
49
|
}
|
|
45
50
|
} @else if $mode == "max" {
|
|
46
|
-
@if map
|
|
47
|
-
@media (max-width: map
|
|
51
|
+
@if map.has-key($map-for-breakpoints, $value) {
|
|
52
|
+
@media (max-width: map.get($map-for-breakpoints, $value)) {
|
|
48
53
|
@content;
|
|
49
54
|
}
|
|
50
55
|
} @else {
|
|
@@ -53,9 +58,9 @@
|
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
} @else if $mode == "between" {
|
|
56
|
-
$start: nth($value, 1);
|
|
57
|
-
$end: nth($value, 2);
|
|
58
|
-
@media (min-width: #{
|
|
61
|
+
$start: list.nth($value, 1);
|
|
62
|
+
$end: list.nth($value, 2);
|
|
63
|
+
@media (min-width: #{validateBreakpoint($start)}) and (max-width: #{if(map.has-key($map-for-breakpoints, $end), validateBreakpoint($end) - 1, $end)}) {
|
|
59
64
|
@content;
|
|
60
65
|
}
|
|
61
66
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:meta";
|
|
4
|
+
@use "../maps/map-for-breakpoints" as *;
|
|
5
|
+
|
|
3
6
|
@mixin breakpointer($selector: null) {
|
|
4
|
-
@if $selector != null and type-of($selector) != "string" {
|
|
7
|
+
@if $selector != null and meta.type-of($selector) != "string" {
|
|
5
8
|
@error "`#{$selector}` is not a valid $selector for `breakpointer`. Pass a selector as a string, such as `\".debug\"`, or no argument at all to attach it to body.";
|
|
6
9
|
}
|
|
7
10
|
@if & {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
|
|
3
5
|
@mixin center($axis: "both") {
|
|
4
|
-
@if not index("both" "horizontal" "vertical", $axis) {
|
|
6
|
+
@if not list.index("both" "horizontal" "vertical", $axis) {
|
|
5
7
|
@error "`#{$axis}` is not a valid $axis for `center`. Pass one of: both, horizontal, vertical.";
|
|
6
8
|
}
|
|
7
9
|
@if $axis == "both" or $axis == "vertical" {
|