gerillass 0.0.6 → 3.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.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +13 -0
  3. data/README.md +328 -0
  4. data/SKILL.md +282 -0
  5. data/gerillass.json +2713 -0
  6. data/lib/gerillass/engine.rb +55 -0
  7. data/lib/gerillass/jekyll.rb +13 -0
  8. data/lib/gerillass.rb +26 -0
  9. data/scss/_gerillass.scss +15 -0
  10. data/scss/internal/_color-problem.scss +99 -0
  11. data/scss/internal/_color-stops-problem.scss +94 -0
  12. data/scss/internal/_condition-width.scss +22 -0
  13. data/scss/internal/_custom-property-in.scss +25 -0
  14. data/scss/internal/_gradient.scss +425 -0
  15. data/scss/internal/_image-value.scss +68 -0
  16. data/scss/internal/_is-condition-value.scss +94 -0
  17. data/scss/internal/_is-css-function.scss +21 -0
  18. data/scss/internal/_is-size.scss +22 -0
  19. data/scss/internal/_keyword-value.scss +76 -0
  20. data/scss/internal/_length-problem.scss +127 -0
  21. data/scss/internal/_sibling-index.scss +51 -0
  22. data/scss/internal/_words.scss +35 -0
  23. data/scss/library/_adaptive.scss +31 -0
  24. data/scss/library/_after.scss +28 -0
  25. data/scss/library/_all-buttons.scss +21 -0
  26. data/scss/library/_all-text-inputs.scss +21 -0
  27. data/{core → scss}/library/_antialias.scss +5 -1
  28. data/scss/library/_aspect-ratio.scss +27 -0
  29. data/scss/library/_background-dots.scss +104 -0
  30. data/scss/library/_background-image.scss +89 -0
  31. data/scss/library/_background-stripes.scss +88 -0
  32. data/scss/library/_before.scss +28 -0
  33. data/scss/library/_border-box.scss +30 -0
  34. data/scss/library/_border-radius.scss +164 -0
  35. data/scss/library/_brand-logo.scss +33 -0
  36. data/scss/library/_breakpoint.scss +96 -0
  37. data/scss/library/_breakpointer.scss +40 -0
  38. data/scss/library/_center.scss +19 -0
  39. data/scss/library/_circle.scss +15 -0
  40. data/{core → scss}/library/_clearfix.scss +1 -1
  41. data/scss/library/_columnizer.scss +125 -0
  42. data/scss/library/_container-query.scss +119 -0
  43. data/scss/library/_container.scss +72 -0
  44. data/scss/library/_counter.scss +59 -0
  45. data/scss/library/_ellipsis.scss +87 -0
  46. data/scss/library/_escape-to-parent.scss +12 -0
  47. data/scss/library/_except.scss +71 -0
  48. data/scss/library/_focus-ring.scss +63 -0
  49. data/scss/library/_font-face.scss +240 -0
  50. data/scss/library/_gradient.scss +31 -0
  51. data/scss/library/_hide.scss +25 -0
  52. data/scss/library/_index.scss +57 -0
  53. data/scss/library/_line-clamp.scss +38 -0
  54. data/scss/library/_loadify.scss +62 -0
  55. data/scss/library/_motion-safe.scss +28 -0
  56. data/scss/library/_only.scss +73 -0
  57. data/scss/library/_placeholder-shown.scss +7 -0
  58. data/scss/library/_placeholder.scss +19 -0
  59. data/scss/library/_position.scss +72 -0
  60. data/scss/library/_remove.scss +40 -0
  61. data/scss/library/_reset-css.scss +57 -0
  62. data/scss/library/_reset-figure.scss +10 -0
  63. data/scss/library/_resizable.scss +34 -0
  64. data/scss/library/_responsive-image.scss +6 -0
  65. data/scss/library/_scissors.scss +34 -0
  66. data/scss/library/_screen-agent.scss +34 -0
  67. data/scss/library/_sizer.scss +15 -0
  68. data/scss/library/_smartphone.scss +29 -0
  69. data/scss/library/_sprite.scss +100 -0
  70. data/scss/library/_stretched-link.scss +21 -0
  71. data/scss/library/_tablet.scss +29 -0
  72. data/scss/library/_text-gradient.scss +48 -0
  73. data/scss/library/_text-image.scss +15 -0
  74. data/scss/library/_text-selection.scss +22 -0
  75. data/scss/library/_text-shadow.scss +145 -0
  76. data/scss/library/_text-stroke.scss +43 -0
  77. data/scss/library/_tokens.scss +111 -0
  78. data/scss/library/_triangle.scss +115 -0
  79. data/scss/lists/_index.scss +8 -0
  80. data/scss/lists/_list-of-anchor-pseudo-classes.scss +9 -0
  81. data/scss/lists/_list-of-buttons.scss +8 -0
  82. data/scss/lists/_list-of-counter-styles.scss +59 -0
  83. data/scss/lists/_list-of-directions.scss +12 -0
  84. data/scss/lists/_list-of-length-units.scss +23 -0
  85. data/scss/lists/_list-of-text-inputs.scss +20 -0
  86. data/scss/maps/_index.scss +8 -0
  87. data/scss/maps/_map-for-breakpoints.scss +9 -0
  88. data/scss/maps/_map-for-directions.scss +12 -0
  89. data/scss/maps/_map-for-font-formats.scss +9 -0
  90. data/scss/maps/_map-for-positions.scss +13 -0
  91. data/scss/maps/_map-for-smartphones.scss +72 -0
  92. data/scss/maps/_map-for-tablets.scss +32 -0
  93. data/scss/utilities/_clear-unit.scss +11 -0
  94. data/scss/utilities/_clear-whitespace.scss +15 -0
  95. data/scss/utilities/_convert-to-em.scss +16 -0
  96. data/scss/utilities/_convert-to-number.scss +45 -0
  97. data/scss/utilities/_fill-nulls.scss +18 -0
  98. data/scss/utilities/_fluid.scss +76 -0
  99. data/scss/utilities/_font-sizer.scss +19 -0
  100. data/scss/utilities/_font-source.scss +23 -0
  101. data/scss/utilities/_gradient-value.scss +24 -0
  102. data/scss/utilities/_index.scss +26 -0
  103. data/scss/utilities/_is-color.scss +16 -0
  104. data/scss/utilities/_is-gutter.scss +24 -0
  105. data/scss/utilities/_is-number.scss +11 -0
  106. data/scss/utilities/_is-time.scss +14 -0
  107. data/scss/utilities/_map-deep-get.scss +10 -0
  108. data/scss/utilities/_pixelify.scss +20 -0
  109. data/scss/utilities/_pseudo-selector.scss +12 -0
  110. data/scss/utilities/_remify.scss +16 -0
  111. data/scss/utilities/_shade.scss +10 -0
  112. data/scss/utilities/_shorthand-property.scss +17 -0
  113. data/scss/utilities/_tint.scss +10 -0
  114. data/scss/utilities/_validate-breakpoint.scss +41 -0
  115. data/scss/utilities/_validate-length.scss +37 -0
  116. data/scss/utilities/_validate-ratio.scss +77 -0
  117. data/scss/utilities/_validate-scissors.scss +34 -0
  118. metadata +131 -46
  119. data/core/_gerillass.scss +0 -4
  120. data/core/library/_before.scss +0 -18
  121. data/core/library/_border-box.scss +0 -26
@@ -0,0 +1,43 @@
1
+ @charset "UTF-8";
2
+
3
+ @use "sass:meta";
4
+ @use "../internal/color-problem" as *;
5
+ @use "../internal/length-problem" as *;
6
+
7
+ // Each colour is a declaration of its own, where Chrome 152 kept a CSS-wide
8
+ // keyword and dropped a word that is not a colour, a quoted colour, a length and
9
+ // two colours side by side; see scss/internal/_color-problem.scss. null leaves
10
+ // that declaration out, as it always has.
11
+ @mixin text-stroke(
12
+ $fallback-color: black,
13
+ $color: transparent,
14
+ $stroke-color: black,
15
+ $stroke-width: 1px
16
+ ) {
17
+ $colors: (
18
+ "$fallback-color": $fallback-color,
19
+ "$color": $color,
20
+ "$stroke-color": $stroke-color,
21
+ );
22
+ @each $name, $value in $colors {
23
+ @if $value != null {
24
+ $problem: colorProblem($value, $css-wide: true);
25
+ @if $problem {
26
+ @error "`#{meta.inspect($value)}` is not a valid #{$name} for `text-stroke`: #{$problem}. A browser drops the declaration. Pass a colour such as `black`, `currentColor`, or a function such as `var(--stroke)`.";
27
+ }
28
+ }
29
+ }
30
+ // -webkit-text-stroke-width kept a length, 0, thin, medium or thick and a
31
+ // CSS-wide keyword in Chrome 152, and dropped a percentage and a negative
32
+ // width.
33
+ @if $stroke-width != null {
34
+ $problem: lengthProblem($stroke-width, $percent: false, $negative: false, $keywords: "thin" "medium" "thick", $css-wide: true);
35
+ @if $problem {
36
+ @error "`#{meta.inspect($stroke-width)}` is not a valid $stroke-width for `text-stroke`: #{$problem}. A browser drops the declaration.";
37
+ }
38
+ }
39
+ color: $fallback-color;
40
+ -webkit-text-fill-color: $color;
41
+ -webkit-text-stroke-color: $stroke-color;
42
+ -webkit-text-stroke-width: $stroke-width;
43
+ }
@@ -0,0 +1,111 @@
1
+ @charset "UTF-8";
2
+
3
+ @use "sass:list";
4
+ @use "sass:meta";
5
+ @use "sass:string";
6
+
7
+ // Characters a custom property name cannot hold. Measured in Chrome 152: a
8
+ // declaration named `--space-0.5`, `--w-1/2`, `--a b` or `--#fff` was dropped,
9
+ // and `--font:body` became a property called `--font`. Letters, digits,
10
+ // hyphens, underscores and non-ASCII letters all survived.
11
+ $-forbidden: " " "." "," "/" "#" ":" ";" "(" ")" "[" "]" "{" "}" "!" "@" "$" "%" "^" "&" "*" "+" "=" "<" ">" "?" "\\" "|" "~" "`" "'" "\"";
12
+
13
+ @function -forbidden-in($text) {
14
+ @each $character in $-forbidden {
15
+ @if string.index($text, $character) {
16
+ @return $character;
17
+ }
18
+ }
19
+ @return null;
20
+ }
21
+
22
+ // Writes a value the way Sass writes it in an ordinary declaration. A custom
23
+ // property value is interpolated, and neither obvious spelling matches that:
24
+ // plain interpolation drops the quotes of a string, and meta.inspect keeps them
25
+ // but prints numbers at full precision, so oklch(0.637 0.237 25.331) came out
26
+ // with a hue of 25.331000000000017deg and math.div(1, 3) as 0.3333333333333333.
27
+ // So only strings go through meta.inspect, and a list is walked into.
28
+ @function -serialize($value) {
29
+ @if meta.type-of($value) == "string" {
30
+ @return meta.inspect($value);
31
+ }
32
+ @if meta.type-of($value) == "list" or meta.type-of($value) == "arglist" {
33
+ $joiner: " ";
34
+ @if list.separator($value) == "comma" {
35
+ $joiner: ", ";
36
+ } @else if list.separator($value) == "slash" {
37
+ $joiner: " / ";
38
+ }
39
+ $out: "";
40
+ @each $item in $value {
41
+ @if $out != "" {
42
+ $out: $out + $joiner;
43
+ }
44
+ $out: $out + -serialize($item);
45
+ }
46
+ @if list.is-bracketed($value) {
47
+ $out: "[" + $out + "]";
48
+ }
49
+ @return $out;
50
+ }
51
+ @return "#{$value}";
52
+ }
53
+
54
+ // Writes a Sass map out as custom properties, which two agent trials wrote by
55
+ // hand for a light and a dark palette. Three things it does that interpolating
56
+ // the map in a loop does not:
57
+ //
58
+ // A null is left out. `--focus: null` is a value, not an absence: measured in
59
+ // Chrome 152, `color: var(--focus, red)` did not fall back to red.
60
+ //
61
+ // A quoted string keeps its quotes, through -serialize above. With plain
62
+ // interpolation `"→"` became `→`, and `content: var(--arrow)` then computed to
63
+ // none.
64
+ //
65
+ // A nested map is refused rather than flattened, so a later version can decide
66
+ // how to flatten it without changing what a call already produces.
67
+ @mixin tokens($map, $prefix: null) {
68
+ @if not & {
69
+ @error "`tokens` writes custom properties into the rule it is called in, so call it inside a selector, such as `:root { @include tokens((bg: #fff), color); }`.";
70
+ }
71
+ @if meta.type-of($map) != "map" {
72
+ @error "`#{meta.inspect($map)}` is not a valid $map for `tokens`. Pass a map of names to values, such as `(bg: #fff, text: #111)`.";
73
+ }
74
+ // Checked by its characters, not its type, like the names below: Sass reads
75
+ // an unquoted `blue` or `red` as a colour, and `tokens($blue, blue)` has to
76
+ // work. A colour written `#00f` or `rgb()` is still caught by `#` and `(`.
77
+ @if $prefix != null {
78
+ @if not list.index("string" "color" "number", meta.type-of($prefix)) or string.length("#{$prefix}") == 0 {
79
+ @error "`#{meta.inspect($prefix)}` is not a valid $prefix for `tokens`. Pass a name, such as `color`, or leave it out.";
80
+ }
81
+ $character: -forbidden-in("#{$prefix}");
82
+ @if $character {
83
+ @error "`#{$prefix}` is not a valid $prefix for `tokens`: a custom property name cannot contain `#{$character}`. Use letters, digits, hyphens and underscores.";
84
+ }
85
+ }
86
+
87
+ @each $name, $value in $map {
88
+ $text: "#{$name}";
89
+ @if string.length($text) == 0 {
90
+ @error "`#{meta.inspect($name)}` is not a valid token name for `tokens`. Pass a name such as `bg` or `500`.";
91
+ }
92
+ $character: -forbidden-in($text);
93
+ @if $character {
94
+ @error "`#{$text}` is not a valid token name for `tokens`: a custom property name cannot contain `#{$character}`. Use letters, digits, hyphens and underscores, such as `space-0_5`.";
95
+ }
96
+ @if meta.type-of($value) == "map" {
97
+ @error "`#{$text}` holds a map, which `tokens` does not flatten. Pass each group on its own, such as `@include tokens($blue, blue)` for `$blue: (500: #3b82f6)`.";
98
+ }
99
+ @if meta.type-of($value) == "list" and list.length($value) == 0 {
100
+ @error "`#{$text}` has an empty value in `tokens`. Pass a value, or null to leave the property out.";
101
+ }
102
+
103
+ @if $value != null {
104
+ $property: --#{$text};
105
+ @if $prefix {
106
+ $property: --#{$prefix}-#{$text};
107
+ }
108
+ #{$property}: #{-serialize($value)};
109
+ }
110
+ }
111
+ }
@@ -0,0 +1,115 @@
1
+ @charset "UTF-8";
2
+
3
+ @use "sass:list";
4
+ @use "sass:meta";
5
+ @use "../lists/list-of-directions" as *;
6
+ @use "../internal/is-size" as *;
7
+ @use "../internal/color-problem" as *;
8
+ @use "../internal/length-problem" as *;
9
+
10
+ // The logical directions point along the writing direction rather than a fixed
11
+ // side: inline-end is right in a left-to-right page and left in a right-to-left
12
+ // one. They are kept in a list of their own on purpose. $list-of-directions is
13
+ // shared with border-radius, whose corner branches have no final @else, so a
14
+ // keyword added there without a branch would be accepted and emit nothing.
15
+ $-logical-directions: ("inline-start", "inline-end", "block-start", "block-end");
16
+
17
+ @mixin triangle($direction: "bottom", $color: black, $size: 10px 8px) {
18
+ @if list.index($list-of-directions, $direction) or list.index($-logical-directions, $direction) {
19
+ // Halving a size in calc() rather than math.div() keeps var() and clamp()
20
+ // working instead of emitting `var(--w)/2`, which is not valid CSS.
21
+ @each $item in $size {
22
+ @if not isSize($item) {
23
+ @error "`#{meta.inspect($size)}` is not a valid $size for `triangle`. Pass one or two lengths, or var(), env() or a calculation in place of either.";
24
+ }
25
+ // The sizes land in border-width, which in Chrome 152 dropped a
26
+ // percentage, a negative width and a unit that is not a length. isSize
27
+ // above takes any number, since it only guards calc().
28
+ $problem: lengthProblem($item, $percent: false, $negative: false);
29
+ @if $problem {
30
+ @error "`#{meta.inspect($size)}` is not a valid $size for `triangle`: #{$problem}. A browser drops the border widths, so no triangle is drawn.";
31
+ }
32
+ }
33
+ // The colour is checked by colorProblem in scss/internal/, each item of a
34
+ // list on its own, as isColor used to accept a list. CSS-wide keywords stay
35
+ // refused: the mixin writes the colour into a border-color shorthand beside
36
+ // `transparent`, and a CSS-wide keyword is only valid as the whole value, so
37
+ // `transparent transparent inherit` was rejected in Chrome 152. The check
38
+ // used to name four functions; system colours such as Canvas and
39
+ // contrast-color(), which a border keeps, were refused until it was shared.
40
+ $color-problem: null;
41
+ @each $item in $color {
42
+ @if not $color-problem {
43
+ $color-problem: colorProblem($item);
44
+ }
45
+ }
46
+ @if $color-problem {
47
+ @error "`#{meta.inspect($color)}` is not a valid $color for `triangle`. Pass a colour, `currentColor`, or a CSS function such as `var(--accent)`, `color-mix(...)` or `light-dark(...)`.";
48
+ } @else {
49
+ content: "";
50
+ height: 0;
51
+ width: 0;
52
+ display: inline-block;
53
+ border-style: solid;
54
+ @if $direction == "top"{
55
+ border-color: transparent transparent $color;
56
+ border-width: 0 calc(list.nth($size, 1) / 2) if(list.length($size) == 2, list.nth($size, 2), list.nth($size, 1));
57
+ } @else if $direction == "top-right" {
58
+ border-color: transparent $color transparent transparent;
59
+ border-width: 0 list.nth($size, 1) list.nth($size, 1) 0;
60
+ } @else if $direction == "right" {
61
+ border-color: transparent transparent transparent $color;
62
+ border-width: calc(if(list.length($size) == 2, list.nth($size, 2), list.nth($size, 1)) / 2) 0 calc(if(list.length($size) == 2, list.nth($size, 2), list.nth($size, 1)) / 2) list.nth($size, 1);
63
+ } @else if $direction == "bottom-right" {
64
+ border-color: transparent transparent $color;
65
+ border-width: 0 0 list.nth($size, 1) list.nth($size, 1);
66
+ } @else if $direction == "bottom" {
67
+ border-color: $color transparent transparent;
68
+ border-width: if(list.length($size) == 2, list.nth($size, 2), list.nth($size, 1)) calc(list.nth($size, 1) / 2) 0;
69
+ } @else if $direction == "bottom-left" {
70
+ border-color: transparent transparent transparent $color;
71
+ border-width: list.nth($size, 1) 0 0 list.nth($size, 1);
72
+ } @else if $direction == "left" {
73
+ border-color: transparent $color transparent transparent;
74
+ border-width: calc(if(list.length($size) == 2, list.nth($size, 2), list.nth($size, 1)) / 2) list.nth($size, 1) calc(if(list.length($size) == 2, list.nth($size, 2), list.nth($size, 1)) / 2) 0;
75
+ } @else if $direction == "top-left" {
76
+ border-color: $color transparent transparent;
77
+ border-width: list.nth($size, 1) list.nth($size, 1) 0 0;
78
+ } @else {
79
+ // The same shapes as right, left, bottom and top, drawn with logical
80
+ // borders so the browser picks the side. The first size is the length
81
+ // the triangle points along, the second the width across it.
82
+ $along: list.nth($size, 1);
83
+ $across: $along;
84
+ @if list.length($size) == 2 {
85
+ $across: list.nth($size, 2);
86
+ }
87
+ border-color: transparent;
88
+ @if $direction == "inline-end" {
89
+ border-inline-start-color: $color;
90
+ border-block-width: calc($across / 2);
91
+ border-inline-start-width: $along;
92
+ border-inline-end-width: 0;
93
+ } @else if $direction == "inline-start" {
94
+ border-inline-end-color: $color;
95
+ border-block-width: calc($across / 2);
96
+ border-inline-start-width: 0;
97
+ border-inline-end-width: $along;
98
+ } @else if $direction == "block-end" {
99
+ border-block-start-color: $color;
100
+ border-inline-width: calc($along / 2);
101
+ border-block-start-width: $across;
102
+ border-block-end-width: 0;
103
+ } @else {
104
+ border-block-end-color: $color;
105
+ border-inline-width: calc($along / 2);
106
+ border-block-start-width: 0;
107
+ border-block-end-width: $across;
108
+ }
109
+ }
110
+ @content;
111
+ }
112
+ } @else {
113
+ @error "The argument for direction must be one of the followings: #{list.join($list-of-directions, $-logical-directions)}";
114
+ }
115
+ }
@@ -0,0 +1,8 @@
1
+ @charset "UTF-8";
2
+
3
+ @forward "list-of-anchor-pseudo-classes";
4
+ @forward "list-of-buttons";
5
+ @forward "list-of-counter-styles";
6
+ @forward "list-of-directions";
7
+ @forward "list-of-length-units";
8
+ @forward "list-of-text-inputs";
@@ -0,0 +1,9 @@
1
+ @charset "UTF-8";
2
+
3
+ $list-of-anchor-pseudo-classes: (
4
+ "link",
5
+ "visited",
6
+ "hover",
7
+ "active",
8
+ "focus"
9
+ ) !default;
@@ -0,0 +1,8 @@
1
+ @charset "UTF-8";
2
+
3
+ $list-of-buttons: (
4
+ "button",
5
+ "[type='button']",
6
+ "[type='reset']",
7
+ "[type='submit']"
8
+ ) !default;
@@ -0,0 +1,59 @@
1
+ @charset "UTF-8";
2
+
3
+ $list-of-counter-styles: (
4
+ "arabic-indic",
5
+ "armenian",
6
+ "bengali",
7
+ "cambodian",
8
+ "circle",
9
+ "cjk-decimal",
10
+ "cjk-earthly-branch",
11
+ "cjk-heavenly-stem",
12
+ "decimal",
13
+ "decimal-leading-zero",
14
+ "devanagari",
15
+ "disc",
16
+ "disclosure-closed",
17
+ "disclosure-open",
18
+ "ethiopic-numeric",
19
+ "georgian",
20
+ "gujarati",
21
+ "gurmukhi",
22
+ "hebrew",
23
+ "hiragana",
24
+ "hiragana-iroha",
25
+ "japanese-formal",
26
+ "japanese-informal",
27
+ "kannada",
28
+ "katakana",
29
+ "katakana-iroha",
30
+ "khmer",
31
+ "korean-hangul-formal",
32
+ "korean-hanja-formal",
33
+ "korean-hanja-informal",
34
+ "lao",
35
+ "lower-alpha",
36
+ "lower-alpha",
37
+ "lower-armenian",
38
+ "lower-greek",
39
+ "lower-latin",
40
+ "lower-roman",
41
+ "malayalam",
42
+ "mongolian",
43
+ "myanmar",
44
+ "oriya",
45
+ "persian",
46
+ "simp-chinese-formal",
47
+ "simp-chinese-informal",
48
+ "square",
49
+ "tamil",
50
+ "telugu",
51
+ "thai",
52
+ "tibetan",
53
+ "trad-chinese-formal",
54
+ "trad-chinese-informal",
55
+ "upper-alpha",
56
+ "upper-armenian",
57
+ "upper-latin",
58
+ "upper-roman"
59
+ ) !default;
@@ -0,0 +1,12 @@
1
+ @charset "UTF-8";
2
+
3
+ $list-of-directions: (
4
+ "top",
5
+ "top-right",
6
+ "right",
7
+ "bottom-right",
8
+ "bottom",
9
+ "bottom-left",
10
+ "left",
11
+ "top-left"
12
+ ) !default;
@@ -0,0 +1,23 @@
1
+ @charset "UTF-8";
2
+
3
+ $list-of-absolute-length-units: (
4
+ "cm",
5
+ "mm",
6
+ "Q",
7
+ "in",
8
+ "pc",
9
+ "pt",
10
+ "px"
11
+ ) !default;
12
+
13
+ $list-of-relative-length-units: (
14
+ "em",
15
+ "ex",
16
+ "ch",
17
+ "rem",
18
+ "lh",
19
+ "vw",
20
+ "vh",
21
+ "vmin",
22
+ "vmax"
23
+ ) !default;
@@ -0,0 +1,20 @@
1
+ @charset "UTF-8";
2
+
3
+ $list-of-text-inputs: (
4
+ "[type='color']",
5
+ "[type='date']",
6
+ "[type='datetime']",
7
+ "[type='datetime-local']",
8
+ "[type='email']",
9
+ "[type='month']",
10
+ "[type='number']",
11
+ "[type='password']",
12
+ "[type='search']",
13
+ "[type='tel']",
14
+ "[type='text']",
15
+ "[type='time']",
16
+ "[type='url']",
17
+ "[type='week']",
18
+ "input:not([type])",
19
+ "textarea"
20
+ ) !default;
@@ -0,0 +1,8 @@
1
+ @charset "UTF-8";
2
+
3
+ @forward "map-for-breakpoints";
4
+ @forward "map-for-directions";
5
+ @forward "map-for-font-formats";
6
+ @forward "map-for-positions";
7
+ @forward "map-for-smartphones";
8
+ @forward "map-for-tablets";
@@ -0,0 +1,9 @@
1
+ @charset "UTF-8";
2
+
3
+ $map-for-breakpoints: (
4
+ "xsmall": 0,
5
+ "small": 576px,
6
+ "medium": 768px,
7
+ "large": 992px,
8
+ "xlarge": 1200px,
9
+ ) !default;
@@ -0,0 +1,12 @@
1
+ @charset "UTF-8";
2
+
3
+ $map-for-directions: (
4
+ "top": to top,
5
+ "top-right": to top right,
6
+ "right": to right,
7
+ "bottom-right": to bottom right,
8
+ "bottom": to bottom,
9
+ "bottom-left": to bottom left,
10
+ "left": to left,
11
+ "top-left": to top left,
12
+ ) !default;
@@ -0,0 +1,9 @@
1
+ @charset "UTF-8";
2
+
3
+ $map-for-font-formats: (
4
+ "eot": format("embedded-opentype"),
5
+ "woff2": format("woff2"),
6
+ "woff": format("woff"),
7
+ "ttf": format("truetype"),
8
+ "svg": format("svg"),
9
+ ) !default;
@@ -0,0 +1,13 @@
1
+ @charset "UTF-8";
2
+
3
+ $map-for-positions: (
4
+ "top": at top,
5
+ "top-right": at top right,
6
+ "right": at right,
7
+ "bottom-right": at bottom right,
8
+ "bottom": at bottom,
9
+ "bottom-left": at bottom left,
10
+ "left": at left,
11
+ "top-left": at top left,
12
+ "center": at center,
13
+ ) !default;
@@ -0,0 +1,72 @@
1
+ @charset "UTF-8";
2
+
3
+ $map-for-smartphones: (
4
+ "iPhone4": (
5
+ width: 320px,
6
+ height: 480px,
7
+ ),
8
+ "iPhone-SE": (
9
+ width: 320px,
10
+ height: 568px,
11
+ ),
12
+ "iPhone5-SE": (
13
+ width: 320px,
14
+ height: 568px,
15
+ ),
16
+ "iPhone6": (
17
+ width: 375px,
18
+ height: 667px,
19
+ ),
20
+ "iPhone6-Plus": (
21
+ width: 414px,
22
+ height: 736px,
23
+ ),
24
+ "iPhone7": (
25
+ width: 375px,
26
+ height: 667px,
27
+ ),
28
+ "iPhone7-Plus": (
29
+ width: 414px,
30
+ height: 736px,
31
+ ),
32
+ "iPhone8": (
33
+ width: 375px,
34
+ height: 667px,
35
+ ),
36
+ "iPhone8-Plus": (
37
+ width: 414px,
38
+ height: 736px,
39
+ ),
40
+ "iPhone11": (
41
+ width: 414px,
42
+ height: 896px,
43
+ ),
44
+ "iPhone11-Pro": (
45
+ width: 375px,
46
+ height: 812px,
47
+ ),
48
+ "iPhone11-Pro-Max": (
49
+ width: 414px,
50
+ height: 896px,
51
+ ),
52
+ "iPhoneX": (
53
+ width: 375px,
54
+ height: 812px,
55
+ ),
56
+ "Galaxy-S7": (
57
+ width: 360px,
58
+ height: 640px,
59
+ ),
60
+ "Galaxy-S8": (
61
+ width: 360px,
62
+ height: 740px,
63
+ ),
64
+ "Galaxy-S8-Plus": (
65
+ width: 360px,
66
+ height: 740px,
67
+ ),
68
+ "Galaxy-S10": (
69
+ width: 360px,
70
+ height: 760px,
71
+ ),
72
+ ) !default;
@@ -0,0 +1,32 @@
1
+ @charset "UTF-8";
2
+
3
+ $map-for-tablets: (
4
+ "iPadMini": (
5
+ width: 768px,
6
+ height: 1024px,
7
+ ),
8
+ "iPad": (
9
+ width: 810px,
10
+ height: 1080px,
11
+ ),
12
+ "iPadAir": (
13
+ width: 834px,
14
+ height: 1112px,
15
+ ),
16
+ "iPadPro": (
17
+ width: 1024px,
18
+ height: 1366px,
19
+ ),
20
+ "Nexus7": (
21
+ width: 600px,
22
+ height: 960px,
23
+ ),
24
+ "Nexus9": (
25
+ width: 768px,
26
+ height: 1024px,
27
+ ),
28
+ "Nexus10": (
29
+ width: 800px,
30
+ height: 1280px,
31
+ ),
32
+ ) !default;
@@ -0,0 +1,11 @@
1
+ @charset "UTF-8";
2
+
3
+ @use "sass:math";
4
+ @use "sass:meta";
5
+
6
+ @function clearUnit($value) {
7
+ @if meta.type-of($value) != "number" {
8
+ @error "`#{meta.inspect($value)}` is not a valid $value for `clearUnit`. Pass a number, such as `24px`.";
9
+ }
10
+ @return math.div($value, ($value * 0 + 1));
11
+ }
@@ -0,0 +1,15 @@
1
+ @charset "UTF-8";
2
+
3
+ @use "sass:meta";
4
+ @use "sass:string";
5
+
6
+ @function clearWhitespace($string) {
7
+ @if meta.type-of($string) != "string" {
8
+ @error "`#{$string}` is not a valid $string for `clearWhitespace`. Pass a string.";
9
+ }
10
+ @while (string.index($string, " ") != null) {
11
+ $index: string.index($string, " ");
12
+ $string: "#{string.slice($string, 0, $index - 1)}#{string.slice($string, $index + 1)}";
13
+ }
14
+ @return $string;
15
+ }
@@ -0,0 +1,16 @@
1
+ @charset "UTF-8";
2
+
3
+ @use "sass:string";
4
+ @use "sass:math";
5
+ @use "sass:meta";
6
+
7
+ @function convertToEm($value) {
8
+ // Only a pixel length converts cleanly. A unitless number or another unit
9
+ // compiled to `calc(1.5 / 1px)em`, and a word or var() to `var(--x)/16pxem`.
10
+ @if meta.type-of($value) != "number" or math.unit($value) != "px" {
11
+ @error "`#{meta.inspect($value)}` is not a valid $value for `convertToEm`. Pass a pixel length, such as `24px`.";
12
+ }
13
+ $base-value: 16px;
14
+ $rem-value: math.div($value, $base-value);
15
+ @return $rem-value + string.unquote("em");
16
+ }
@@ -0,0 +1,45 @@
1
+ @charset "UTF-8";
2
+
3
+ @use "sass:list";
4
+ @use "sass:meta";
5
+ @use "sass:string";
6
+
7
+ @function convertToNumber($value) {
8
+
9
+ @if meta.type-of($value) != "string" {
10
+ @error "`#{$value}` is not a valid $value for `convertToNumber`. Pass a string made only of digits, such as `\"42\"`.";
11
+ }
12
+
13
+ $string-numerals: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9";
14
+
15
+ // Every character has to be a digit before the parse runs. Otherwise an
16
+ // empty string or a sign failed with Sass's own "Undefined operation", and a
17
+ // letter or a space was folded into nonsense such as `40-1`. The empty case
18
+ // is checked first because `@for $i from 1 through 0` counts down, not zero
19
+ // times.
20
+ @if string.length($value) == 0 {
21
+ @error "`\"\"` is not a valid $value for `convertToNumber`. Pass a string made only of digits, such as `\"42\"`.";
22
+ }
23
+ @for $i from 1 through string.length($value) {
24
+ @if not list.index($string-numerals, string.slice($value, $i, $i)) {
25
+ @error "`#{meta.inspect($value)}` is not a valid $value for `convertToNumber`. Pass a string made only of digits, such as `\"42\"`.";
26
+ }
27
+ }
28
+
29
+ $calc: 0;
30
+
31
+ @for $i from 1 through string.length($value) {
32
+ //Takes every digits in the $value
33
+ $digit: string.slice($value, $i, $i);
34
+
35
+ //Finds the index position of $digit in the $value
36
+ $index-of-digit: list.index($string-numerals, $digit);
37
+
38
+ // That is because SASS strings are not "0" based but "1", the index position of every digits will be more by one. Here is the simple calculation to find the actual number.
39
+ $actual-digit: $index-of-digit - 1;
40
+
41
+ // Calculates the actual number.
42
+ $calc: $calc * 10 + $actual-digit;
43
+ }
44
+ @return $calc;
45
+ }