gerillass 0.0.6 → 2.3.1

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 (120) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +13 -0
  3. data/README.md +328 -0
  4. data/SKILL.md +283 -0
  5. data/gerillass.json +2551 -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/_image-value.scss +68 -0
  15. data/scss/internal/_is-condition-value.scss +94 -0
  16. data/scss/internal/_is-css-function.scss +21 -0
  17. data/scss/internal/_is-size.scss +22 -0
  18. data/scss/internal/_keyword-value.scss +76 -0
  19. data/scss/internal/_length-problem.scss +127 -0
  20. data/scss/internal/_sibling-index.scss +51 -0
  21. data/scss/internal/_words.scss +35 -0
  22. data/scss/library/_adaptive.scss +31 -0
  23. data/scss/library/_after.scss +28 -0
  24. data/scss/library/_all-buttons.scss +21 -0
  25. data/scss/library/_all-text-inputs.scss +21 -0
  26. data/{core → scss}/library/_antialias.scss +5 -1
  27. data/scss/library/_aspect-ratio.scss +27 -0
  28. data/scss/library/_background-dots.scss +103 -0
  29. data/scss/library/_background-image.scss +113 -0
  30. data/scss/library/_background-stripes.scss +99 -0
  31. data/scss/library/_before.scss +28 -0
  32. data/scss/library/_border-box.scss +30 -0
  33. data/scss/library/_border-radius.scss +164 -0
  34. data/scss/library/_brand-logo.scss +33 -0
  35. data/scss/library/_breakpoint.scss +96 -0
  36. data/scss/library/_breakpointer.scss +40 -0
  37. data/scss/library/_center.scss +19 -0
  38. data/scss/library/_circle.scss +15 -0
  39. data/{core → scss}/library/_clearfix.scss +1 -1
  40. data/scss/library/_columnizer.scss +125 -0
  41. data/scss/library/_container-query.scss +119 -0
  42. data/scss/library/_container.scss +72 -0
  43. data/scss/library/_counter.scss +59 -0
  44. data/scss/library/_ellipsis.scss +87 -0
  45. data/scss/library/_escape-to-parent.scss +12 -0
  46. data/scss/library/_except.scss +71 -0
  47. data/scss/library/_focus-ring.scss +63 -0
  48. data/scss/library/_font-face.scss +240 -0
  49. data/scss/library/_hide.scss +25 -0
  50. data/scss/library/_index.scss +58 -0
  51. data/scss/library/_line-clamp.scss +38 -0
  52. data/scss/library/_linear-gradient.scss +33 -0
  53. data/scss/library/_loadify.scss +62 -0
  54. data/scss/library/_motion-safe.scss +28 -0
  55. data/scss/library/_only.scss +73 -0
  56. data/scss/library/_placeholder-shown.scss +7 -0
  57. data/scss/library/_placeholder.scss +19 -0
  58. data/scss/library/_position.scss +72 -0
  59. data/scss/library/_radial-gradient.scss +184 -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 +38 -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/_index.scss +25 -0
  102. data/scss/utilities/_is-color.scss +16 -0
  103. data/scss/utilities/_is-gutter.scss +24 -0
  104. data/scss/utilities/_is-number.scss +11 -0
  105. data/scss/utilities/_is-time.scss +14 -0
  106. data/scss/utilities/_map-deep-get.scss +10 -0
  107. data/scss/utilities/_pixelify.scss +20 -0
  108. data/scss/utilities/_pseudo-selector.scss +12 -0
  109. data/scss/utilities/_remify.scss +16 -0
  110. data/scss/utilities/_shade.scss +10 -0
  111. data/scss/utilities/_shorthand-property.scss +17 -0
  112. data/scss/utilities/_tint.scss +10 -0
  113. data/scss/utilities/_validate-breakpoint.scss +41 -0
  114. data/scss/utilities/_validate-length.scss +37 -0
  115. data/scss/utilities/_validate-ratio.scss +77 -0
  116. data/scss/utilities/_validate-scissors.scss +34 -0
  117. metadata +130 -46
  118. data/core/_gerillass.scss +0 -4
  119. data/core/library/_before.scss +0 -18
  120. data/core/library/_border-box.scss +0 -26
@@ -0,0 +1,22 @@
1
+ @charset "UTF-8";
2
+
3
+ @mixin text-selection($value: null) {
4
+ @if not & and $value == null {
5
+ ::selection {
6
+ @content;
7
+ }
8
+ } @else if & and $value == "only" {
9
+ &::selection {
10
+ @content;
11
+ }
12
+ } @else if & and $value == null {
13
+ &::selection,
14
+ *::selection {
15
+ @content;
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.";
21
+ }
22
+ }
@@ -0,0 +1,145 @@
1
+ @charset "UTF-8";
2
+
3
+ @use "sass:color";
4
+ @use "sass:list";
5
+ @use "sass:math";
6
+ @use "sass:meta";
7
+ @use "../utilities/clear-unit" as *;
8
+
9
+ @mixin text-shadow($params...) {
10
+ $value: ();
11
+
12
+ @for $i from 1 through list.length($params) {
13
+ // Takes each items come from $params.
14
+ $item: list.nth($params, $i);
15
+
16
+ // Each group must carry at least a direction, a colour and a size. Without
17
+ // this the list.nth() calls below fail with "Invalid index", which says nothing
18
+ // about what the mixin wanted.
19
+ @if list.length($item) < 3 {
20
+ @error "`#{$item}` is not a valid shadow for `text-shadow`. Each group needs a direction, a colour and a size, such as `bottom-right red 5px`. An optional blur and a fill flag may follow.";
21
+ }
22
+
23
+ // The first value comes from the $item is direction.
24
+ // This will be used in the @if, @else statements with $size to control the offset of the shadows.
25
+ $direction: list.nth($item, 1);
26
+
27
+ // Second value is the color.
28
+ $color: list.nth($item, 2);
29
+
30
+ // The third value is the actual offset value of the shadows.
31
+ $size: list.nth($item, 3);
32
+
33
+ // Takes the unit of the $size value to use it later to increment the amount of shadow based on the unit.
34
+ $sizeUnit: math.unit($size);
35
+
36
+ // The $blur argument is optional. It controls the size of the blur.
37
+ $blur: null;
38
+
39
+ // The $fill argument is optional. This makes shadow fill the gap between the actual text and shadow's end-point. The default value is set to false.
40
+ $fill: null;
41
+
42
+ // Assigns the optional sub-arguments to the actual argument.
43
+ @if list.length($item) == 4 and meta.type-of(list.nth($item, 4)) == number {
44
+ $blur: list.nth($item, list.length($item));
45
+ } @else if list.length($item) == 4 and meta.type-of(list.nth($item, 4)) == bool {
46
+ $fill: list.nth($item, list.length($item));
47
+ } @else if list.length($item) == 5 {
48
+ $blur: list.nth($item, 4);
49
+ $fill: list.nth($item, list.length($item));
50
+ }
51
+
52
+ // The code below changes the angle of $direction of the shadow based on the predefined values.
53
+ @if $direction == "top" {
54
+ @if $fill == true {
55
+ // The clearUnit(); function is used here due to it is not possible to count $size with a unit. First, it clears the unit from the $size argument and then adds it back again in the @for loop.
56
+ @for $i from 1 through clearUnit($size) {
57
+ $increase: $i * 1 + $sizeUnit;
58
+ $shadow: 0 -#{$increase} $blur $color;
59
+ $value: list.append($value, $shadow, comma);
60
+ }
61
+ } @else {
62
+ $shadow: 0 -#{$size} $blur $color;
63
+ $value: list.append($value, $shadow, comma);
64
+ }
65
+ } @else if $direction == "top-left" {
66
+ @if $fill == true {
67
+ @for $i from 1 through clearUnit($size) {
68
+ $increase: $i * 1 + $sizeUnit;
69
+ $shadow: -#{$increase} -#{$increase} $blur $color;
70
+ $value: list.append($value, $shadow, comma);
71
+ }
72
+ } @else {
73
+ $shadow: -#{$size} -#{$size} $blur $color;
74
+ $value: list.append($value, $shadow, comma);
75
+ }
76
+ } @else if $direction == "top-right" {
77
+ @if $fill == true {
78
+ @for $i from 1 through clearUnit($size) {
79
+ $increase: $i * 1 + $sizeUnit;
80
+ $shadow: #{$increase} -#{$increase} $blur $color;
81
+ $value: list.append($value, $shadow, comma);
82
+ }
83
+ } @else {
84
+ $shadow: #{$size} -#{$size} $blur $color;
85
+ $value: list.append($value, $shadow, comma);
86
+ }
87
+ } @else if $direction == "bottom" {
88
+ @if $fill == true {
89
+ @for $i from 1 through clearUnit($size) {
90
+ $increase: $i * 1 + $sizeUnit;
91
+ $shadow: 0 #{$increase} $blur $color;
92
+ $value: list.append($value, $shadow, comma);
93
+ }
94
+ } @else {
95
+ $shadow: 0 #{$size} $blur $color;
96
+ $value: list.append($value, $shadow, comma);
97
+ }
98
+ } @else if $direction == "bottom-left" {
99
+ @if $fill == true {
100
+ @for $i from 1 through clearUnit($size) {
101
+ $increase: $i * 1 + $sizeUnit;
102
+ $shadow: -#{$increase} #{$increase} $blur $color;
103
+ $value: list.append($value, $shadow, comma);
104
+ }
105
+ } @else {
106
+ $shadow: -#{$size} #{$size} $blur $color;
107
+ $value: list.append($value, $shadow, comma);
108
+ }
109
+ } @else if $direction == "bottom-right" {
110
+ @if $fill == true {
111
+ @for $i from 1 through clearUnit($size) {
112
+ $increase: $i * 1 + $sizeUnit;
113
+ $shadow: #{$increase} #{$increase} $blur $color;
114
+ $value: list.append($value, $shadow, comma);
115
+ }
116
+ } @else {
117
+ $shadow: #{$size} #{$size} $blur $color;
118
+ $value: list.append($value, $shadow, comma);
119
+ }
120
+ } @else if $direction == "left" {
121
+ @if $fill == true {
122
+ @for $i from 1 through clearUnit($size) {
123
+ $increase: $i * 1 + $sizeUnit;
124
+ $shadow: -#{$increase} 0 $blur $color;
125
+ $value: list.append($value, $shadow, comma);
126
+ }
127
+ } @else {
128
+ $shadow: -#{$size} 0 $blur $color;
129
+ $value: list.append($value, $shadow, comma);
130
+ }
131
+ } @else if $direction == "right" {
132
+ @if $fill == true {
133
+ @for $i from 1 through clearUnit($size) {
134
+ $increase: $i * 1 + $sizeUnit;
135
+ $shadow: #{$increase} 0 $blur $color;
136
+ $value: list.append($value, $shadow, comma);
137
+ }
138
+ } @else {
139
+ $shadow: #{$size} 0 $blur $color;
140
+ $value: list.append($value, $shadow, comma);
141
+ }
142
+ }
143
+ }
144
+ text-shadow: $value;
145
+ }
@@ -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;