mere-blog-theme 0.5 → 1.0.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 (189) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -24
  3. data/_includes/author-media.html +23 -20
  4. data/_includes/google-analytics.html +6 -3
  5. data/_includes/head.html +21 -11
  6. data/_includes/hero.html +12 -7
  7. data/_includes/navbar.html +19 -19
  8. data/_includes/pagination.html +41 -21
  9. data/_includes/post-item.html +18 -15
  10. data/_includes/social-buttons.html +25 -26
  11. data/_layouts/author.html +50 -38
  12. data/_layouts/default.html +21 -19
  13. data/_layouts/homepage.html +9 -12
  14. data/_layouts/post.html +29 -28
  15. data/_sass/_intro.scss +6 -4
  16. data/_sass/_layout.scss +29 -18
  17. data/_sass/_main.scss +17 -18
  18. data/_sass/syntax.scss +14 -6
  19. data/assets/css/app.scss +1 -1
  20. data/assets/js/app.js +9 -11
  21. data/node_modules/.package-lock.json +4 -4
  22. data/node_modules/bulma/LICENSE +1 -1
  23. data/node_modules/bulma/README.md +67 -55
  24. data/node_modules/bulma/bulma.scss +4 -0
  25. data/node_modules/bulma/css/bulma.css +18412 -8566
  26. data/node_modules/bulma/css/bulma.css.map +1 -1
  27. data/node_modules/bulma/css/bulma.min.css +3 -1
  28. data/node_modules/bulma/css/versions/bulma-no-dark-mode.css +19648 -0
  29. data/node_modules/bulma/css/versions/bulma-no-dark-mode.css.map +1 -0
  30. data/node_modules/bulma/css/versions/bulma-no-dark-mode.min.css +3 -0
  31. data/node_modules/bulma/css/versions/bulma-no-helpers-prefixed.css +11136 -0
  32. data/node_modules/bulma/css/versions/bulma-no-helpers-prefixed.css.map +1 -0
  33. data/node_modules/bulma/css/versions/bulma-no-helpers-prefixed.min.css +3 -0
  34. data/node_modules/bulma/css/versions/bulma-no-helpers.css +11136 -0
  35. data/node_modules/bulma/css/versions/bulma-no-helpers.css.map +1 -0
  36. data/node_modules/bulma/css/versions/bulma-no-helpers.min.css +3 -0
  37. data/node_modules/bulma/css/versions/bulma-prefixed.min.css +21551 -0
  38. data/node_modules/bulma/css/versions/bulma-prefixed.min.css.map +1 -0
  39. data/node_modules/bulma/css/versions/bulma-prefixed.min.min.css +3 -0
  40. data/node_modules/bulma/package.json +25 -19
  41. data/node_modules/bulma/sass/_index.scss +10 -0
  42. data/node_modules/bulma/sass/base/_index.scss +6 -0
  43. data/node_modules/bulma/sass/base/animations.scss +15 -0
  44. data/node_modules/bulma/sass/base/generic.scss +239 -0
  45. data/node_modules/bulma/sass/base/minireset.scss +92 -0
  46. data/node_modules/bulma/sass/base/skeleton.scss +114 -0
  47. data/node_modules/bulma/sass/components/_index.scss +13 -0
  48. data/node_modules/bulma/sass/components/breadcrumb.scss +139 -0
  49. data/node_modules/bulma/sass/components/card.scss +162 -0
  50. data/node_modules/bulma/sass/components/dropdown.scss +188 -0
  51. data/node_modules/bulma/sass/components/menu.scss +165 -0
  52. data/node_modules/bulma/sass/components/message.scss +183 -0
  53. data/node_modules/bulma/sass/components/modal.scss +164 -0
  54. data/node_modules/bulma/sass/components/navbar.scss +799 -0
  55. data/node_modules/bulma/sass/components/pagination.scss +379 -0
  56. data/node_modules/bulma/sass/components/panel.scss +218 -0
  57. data/node_modules/bulma/sass/components/tabs.scss +273 -0
  58. data/node_modules/bulma/sass/elements/_index.scss +16 -0
  59. data/node_modules/bulma/sass/elements/block.scss +6 -0
  60. data/node_modules/bulma/sass/elements/box.scss +59 -0
  61. data/node_modules/bulma/sass/elements/button.scss +647 -0
  62. data/node_modules/bulma/sass/elements/content.scss +289 -0
  63. data/node_modules/bulma/sass/elements/delete.scss +6 -0
  64. data/node_modules/bulma/sass/elements/icon.scss +67 -0
  65. data/node_modules/bulma/sass/elements/image.scss +62 -0
  66. data/node_modules/bulma/sass/elements/loader.scss +15 -0
  67. data/node_modules/bulma/sass/elements/notification.scss +105 -0
  68. data/node_modules/bulma/sass/elements/progress.scss +115 -0
  69. data/node_modules/bulma/sass/elements/table.scss +261 -0
  70. data/node_modules/bulma/sass/elements/tag.scss +219 -0
  71. data/node_modules/bulma/sass/elements/title.scss +128 -0
  72. data/node_modules/bulma/sass/form/_index.scss +9 -0
  73. data/node_modules/bulma/sass/form/checkbox-radio.scss +36 -0
  74. data/node_modules/bulma/sass/form/file.scss +330 -0
  75. data/node_modules/bulma/sass/form/input-textarea.scss +113 -0
  76. data/node_modules/bulma/sass/form/select.scss +144 -0
  77. data/node_modules/bulma/sass/form/shared.scss +176 -0
  78. data/node_modules/bulma/sass/form/tools.scss +352 -0
  79. data/node_modules/bulma/sass/grid/_index.scss +5 -0
  80. data/node_modules/bulma/sass/grid/columns.scss +961 -0
  81. data/node_modules/bulma/sass/grid/grid.scss +209 -0
  82. data/node_modules/bulma/sass/helpers/_index.scss +15 -0
  83. data/node_modules/bulma/sass/helpers/aspect-ratio.scss +10 -0
  84. data/node_modules/bulma/sass/helpers/border.scss +15 -0
  85. data/node_modules/bulma/sass/helpers/color.scss +344 -0
  86. data/node_modules/bulma/sass/helpers/flexbox.scss +62 -0
  87. data/node_modules/bulma/sass/helpers/float.scss +28 -0
  88. data/node_modules/bulma/sass/helpers/gap.scss +24 -0
  89. data/node_modules/bulma/sass/helpers/other.scss +19 -0
  90. data/node_modules/bulma/sass/helpers/overflow.scss +21 -0
  91. data/node_modules/bulma/sass/helpers/position.scss +19 -0
  92. data/node_modules/bulma/sass/helpers/spacing.scss +64 -0
  93. data/node_modules/bulma/sass/helpers/typography.scss +168 -0
  94. data/node_modules/bulma/sass/helpers/visibility.scss +221 -0
  95. data/node_modules/bulma/sass/layout/_index.scss +9 -0
  96. data/node_modules/bulma/sass/layout/container.scss +59 -0
  97. data/node_modules/bulma/sass/layout/footer.scss +23 -0
  98. data/node_modules/bulma/sass/layout/hero.scss +270 -0
  99. data/node_modules/bulma/sass/layout/level.scss +107 -0
  100. data/node_modules/bulma/sass/layout/media.scss +106 -0
  101. data/node_modules/bulma/sass/layout/section.scss +38 -0
  102. data/node_modules/bulma/sass/themes/_index.scss +35 -0
  103. data/node_modules/bulma/sass/themes/dark.scss +56 -0
  104. data/node_modules/bulma/sass/themes/light.scss +146 -0
  105. data/node_modules/bulma/sass/themes/setup.scss +174 -0
  106. data/node_modules/bulma/sass/utilities/_index.scss +7 -0
  107. data/node_modules/bulma/sass/utilities/controls.scss +85 -0
  108. data/node_modules/bulma/sass/utilities/css-variables.scss +426 -0
  109. data/node_modules/bulma/sass/utilities/derived-variables.scss +112 -0
  110. data/node_modules/bulma/sass/utilities/extends.scss +34 -0
  111. data/node_modules/bulma/sass/utilities/functions.scss +258 -0
  112. data/node_modules/bulma/sass/utilities/initial-variables.scss +155 -0
  113. data/node_modules/bulma/sass/utilities/mixins.scss +460 -0
  114. data/node_modules/bulma/versions/bulma-no-dark-mode.scss +20 -0
  115. data/node_modules/bulma/versions/bulma-no-helpers-prefixed.scss +13 -0
  116. data/node_modules/bulma/versions/bulma-no-helpers.scss +11 -0
  117. data/node_modules/bulma/versions/bulma-prefixed.scss +6 -0
  118. data/package-lock.json +5 -12
  119. data/package.json +1 -1
  120. metadata +107 -80
  121. data/node_modules/bulma/CHANGELOG.md +0 -1539
  122. data/node_modules/bulma/bulma.sass +0 -10
  123. data/node_modules/bulma/css/bulma-rtl.css +0 -11705
  124. data/node_modules/bulma/css/bulma-rtl.css.map +0 -1
  125. data/node_modules/bulma/css/bulma-rtl.min.css +0 -1
  126. data/node_modules/bulma/sass/base/_all.sass +0 -6
  127. data/node_modules/bulma/sass/base/animations.sass +0 -5
  128. data/node_modules/bulma/sass/base/generic.sass +0 -145
  129. data/node_modules/bulma/sass/base/helpers.sass +0 -1
  130. data/node_modules/bulma/sass/base/minireset.sass +0 -79
  131. data/node_modules/bulma/sass/components/_all.sass +0 -15
  132. data/node_modules/bulma/sass/components/breadcrumb.sass +0 -77
  133. data/node_modules/bulma/sass/components/card.sass +0 -102
  134. data/node_modules/bulma/sass/components/dropdown.sass +0 -83
  135. data/node_modules/bulma/sass/components/level.sass +0 -79
  136. data/node_modules/bulma/sass/components/media.sass +0 -59
  137. data/node_modules/bulma/sass/components/menu.sass +0 -59
  138. data/node_modules/bulma/sass/components/message.sass +0 -101
  139. data/node_modules/bulma/sass/components/modal.sass +0 -117
  140. data/node_modules/bulma/sass/components/navbar.sass +0 -445
  141. data/node_modules/bulma/sass/components/pagination.sass +0 -158
  142. data/node_modules/bulma/sass/components/panel.sass +0 -121
  143. data/node_modules/bulma/sass/components/tabs.sass +0 -176
  144. data/node_modules/bulma/sass/elements/_all.sass +0 -16
  145. data/node_modules/bulma/sass/elements/box.sass +0 -26
  146. data/node_modules/bulma/sass/elements/button.sass +0 -345
  147. data/node_modules/bulma/sass/elements/container.sass +0 -29
  148. data/node_modules/bulma/sass/elements/content.sass +0 -157
  149. data/node_modules/bulma/sass/elements/form.sass +0 -1
  150. data/node_modules/bulma/sass/elements/icon.sass +0 -40
  151. data/node_modules/bulma/sass/elements/image.sass +0 -73
  152. data/node_modules/bulma/sass/elements/notification.sass +0 -52
  153. data/node_modules/bulma/sass/elements/other.sass +0 -41
  154. data/node_modules/bulma/sass/elements/progress.sass +0 -73
  155. data/node_modules/bulma/sass/elements/table.sass +0 -133
  156. data/node_modules/bulma/sass/elements/tag.sass +0 -140
  157. data/node_modules/bulma/sass/elements/title.sass +0 -72
  158. data/node_modules/bulma/sass/form/_all.sass +0 -9
  159. data/node_modules/bulma/sass/form/checkbox-radio.sass +0 -22
  160. data/node_modules/bulma/sass/form/file.sass +0 -182
  161. data/node_modules/bulma/sass/form/input-textarea.sass +0 -66
  162. data/node_modules/bulma/sass/form/select.sass +0 -87
  163. data/node_modules/bulma/sass/form/shared.sass +0 -60
  164. data/node_modules/bulma/sass/form/tools.sass +0 -215
  165. data/node_modules/bulma/sass/grid/_all.sass +0 -5
  166. data/node_modules/bulma/sass/grid/columns.sass +0 -513
  167. data/node_modules/bulma/sass/grid/tiles.sass +0 -36
  168. data/node_modules/bulma/sass/helpers/_all.sass +0 -12
  169. data/node_modules/bulma/sass/helpers/color.sass +0 -39
  170. data/node_modules/bulma/sass/helpers/flexbox.sass +0 -35
  171. data/node_modules/bulma/sass/helpers/float.sass +0 -10
  172. data/node_modules/bulma/sass/helpers/other.sass +0 -14
  173. data/node_modules/bulma/sass/helpers/overflow.sass +0 -2
  174. data/node_modules/bulma/sass/helpers/position.sass +0 -7
  175. data/node_modules/bulma/sass/helpers/spacing.sass +0 -31
  176. data/node_modules/bulma/sass/helpers/typography.sass +0 -100
  177. data/node_modules/bulma/sass/helpers/visibility.sass +0 -122
  178. data/node_modules/bulma/sass/layout/_all.sass +0 -6
  179. data/node_modules/bulma/sass/layout/footer.sass +0 -11
  180. data/node_modules/bulma/sass/layout/hero.sass +0 -149
  181. data/node_modules/bulma/sass/layout/section.sass +0 -15
  182. data/node_modules/bulma/sass/utilities/_all.sass +0 -9
  183. data/node_modules/bulma/sass/utilities/animations.sass +0 -1
  184. data/node_modules/bulma/sass/utilities/controls.sass +0 -49
  185. data/node_modules/bulma/sass/utilities/derived-variables.sass +0 -110
  186. data/node_modules/bulma/sass/utilities/extends.sass +0 -22
  187. data/node_modules/bulma/sass/utilities/functions.sass +0 -115
  188. data/node_modules/bulma/sass/utilities/initial-variables.sass +0 -78
  189. data/node_modules/bulma/sass/utilities/mixins.sass +0 -268
@@ -0,0 +1,426 @@
1
+ @use "sass:color";
2
+ @use "sass:list";
3
+ @use "sass:map";
4
+ @use "sass:math";
5
+
6
+ @use "initial-variables" as iv;
7
+ @use "functions" as fn;
8
+
9
+ @function buildVarName($name, $prefix: "", $suffix: "") {
10
+ @return "--#{iv.$cssvars-prefix}#{$prefix}#{$name}#{$suffix}";
11
+ }
12
+
13
+ @function buildHslaString($name, $l, $a: 1) {
14
+ $lightness: getVar($name, "", "-l");
15
+ @if ($l) {
16
+ $lightness: $l;
17
+ }
18
+ @return "hsla(#{getVar($name, '', '-h')}, #{getVar($name, '', '-s')}, #{$lightness}, #{$a})";
19
+ }
20
+
21
+ @function getVar($name, $prefix: "", $suffix: "") {
22
+ $varName: buildVarName($name, $prefix, $suffix);
23
+ @return var(#{$varName});
24
+ }
25
+
26
+ @function getVarWithBackup($name, $backup, $prefix: "", $suffix: "") {
27
+ $varName: buildVarName($name, $prefix, $suffix);
28
+ $backupName: buildVarName($backup, $prefix, $suffix);
29
+ @return var(#{$varName}, var(#{$backupName}));
30
+ }
31
+
32
+ @function getRgbaVar($name, $alpha, $prefix: "", $suffix: "") {
33
+ $varName: buildVarName($name, $prefix, $suffix);
34
+ @return unquote("rgba(var(#{$varName}), #{$alpha})");
35
+ }
36
+
37
+ @mixin register-var($name, $value, $prefix: "", $suffix: "") {
38
+ $varName: buildVarName($name, $prefix, $suffix);
39
+ #{$varName}: #{$value};
40
+ }
41
+
42
+ @mixin register-vars($vars, $prefix: "", $suffix: "") {
43
+ @each $name, $value in $vars {
44
+ @include register-var($name, $value, $prefix, $suffix);
45
+ }
46
+ }
47
+
48
+ @mixin register-rgb($name, $value) {
49
+ @include register-var(
50
+ $name,
51
+ (red($value), green($value), blue($value)),
52
+ "",
53
+ "-rgb"
54
+ );
55
+ }
56
+
57
+ @mixin register-hsl($name, $value) {
58
+ @include register-var($name, round(hue($value)), "", "-h");
59
+ @include register-var($name, round(saturation($value)), "", "-s");
60
+ @include register-var($name, round(lightness($value)), "", "-l");
61
+ }
62
+
63
+ @mixin generate-on-scheme-colors($name, $base, $scheme-main) {
64
+ // Accessibility Contrast System
65
+ $scheme-main-brightness: fn.bulmaColorBrightness($scheme-main);
66
+ $on-scheme-color: $base;
67
+ $fg-lum: fn.bulmaColorLuminance($on-scheme-color);
68
+ $bg-lum: fn.bulmaColorLuminance($scheme-main);
69
+ $ratio: 0;
70
+ $found-decent-color: false;
71
+
72
+ @if ($fg-lum > $bg-lum) {
73
+ @for $i from 0 through 20 {
74
+ $ratio: math.div(($fg-lum + 0.05), ($bg-lum + 0.05));
75
+
76
+ @if $ratio > 5 {
77
+ $found-decent-color: true;
78
+ } @else {
79
+ $on-scheme-color: lighten($on-scheme-color, 5%);
80
+ $fg-lum: fn.bulmaColorLuminance($on-scheme-color);
81
+ }
82
+ }
83
+ } @else {
84
+ @for $i from 0 through 20 {
85
+ $ratio: math.div(($bg-lum + 0.05), ($fg-lum + 0.05));
86
+
87
+ @if $ratio > 5 {
88
+ $found-decent-color: true;
89
+ } @else {
90
+ $on-scheme-color: darken($on-scheme-color, 5%);
91
+ $fg-lum: fn.bulmaColorLuminance($on-scheme-color);
92
+ }
93
+ }
94
+ }
95
+
96
+ $on-scheme-lightness: lightness($on-scheme-color);
97
+ @include register-var($name, $on-scheme-lightness, "", "-on-scheme-l");
98
+ $on-scheme-l: getVar($name, "", "-on-scheme-l");
99
+ @include register-var(
100
+ "#{$name}-on-scheme",
101
+ buildHslaString($name, $on-scheme-l)
102
+ );
103
+ }
104
+
105
+ @mixin v1-generate-on-scheme-colors($name, $base, $scheme-main) {
106
+ // Accessibility Contrast System
107
+ $scheme-main-brightness: fn.bulmaColorBrightness($scheme-main);
108
+ $on-scheme-color: $base;
109
+
110
+ @if ($scheme-main-brightness == "bright") {
111
+ @while (fn.bulmaEnoughContrast($on-scheme-color, #fff) == false) {
112
+ // We're on a light background, so we'll darken the test color step by step.
113
+ $on-scheme-color: darken($on-scheme-color, 5%);
114
+ }
115
+ } @else {
116
+ @while (fn.bulmaEnoughContrast($on-scheme-color, #000) == false) {
117
+ // We're on a dark background, so we'll lighten the test color step by step.
118
+ $on-scheme-color: lighten($on-scheme-color, 5%);
119
+ }
120
+ }
121
+
122
+ $on-scheme-lightness: lightness($on-scheme-color);
123
+ @include register-var($name, $on-scheme-lightness, "", "-on-scheme-l");
124
+ }
125
+
126
+ @mixin register-base-color($name, $base) {
127
+ $hsla: buildHslaString($name, getVar($name, "", "-l"));
128
+ @include register-var($name, $hsla);
129
+ @include register-var($name, $hsla, "", "-base"); // Just for reference
130
+ @include register-rgb($name, $base);
131
+ @include register-hsl($name, $base);
132
+ }
133
+
134
+ @mixin generate-basic-palette($name, $base, $invert: null) {
135
+ @include register-base-color($name, $base);
136
+
137
+ @if $invert {
138
+ @include register-var($name, lightness($invert), "", "-invert-l");
139
+ @include register-var("#{$name}-invert", $invert);
140
+ }
141
+ }
142
+
143
+ @mixin generate-color-palette(
144
+ $name,
145
+ $base,
146
+ $scheme-main-l: 100%,
147
+ $invert: null,
148
+ $light: null,
149
+ $dark: null
150
+ ) {
151
+ $h: round(hue($base)); // Hue
152
+ $s: round(saturation($base)); // Saturation
153
+ $l: round(lightness($base)); // Lightness
154
+ $base-lum: fn.bulmaColorLuminance($base);
155
+ $l-base: round($l % 10); // Get lightness second digit: 53% -> 3%
156
+ $l-0: 0%; // 5% or less
157
+ $l-5: 5%; // More than 5%
158
+ $a: 1; // Alpha
159
+ $base-digits: "00";
160
+
161
+ // Calculate digits like "40" for the scheme-main
162
+ $scheme-l-0: 0%;
163
+ $scheme-l-base: round($scheme-main-l % 10);
164
+ $closest-5: math.round(math.div($scheme-main-l, 5)) * 5;
165
+ $pct-to-int: math.div($closest-5, 100%) * 100;
166
+ $scheme-main-digits: #{$pct-to-int};
167
+
168
+ // === STEP 1 ===
169
+ // Register the base colors
170
+ @include register-base-color($name, $base);
171
+
172
+ // === STEP 2 ===
173
+ // Generating 20 shades of the color
174
+
175
+ // 00: 0%, 1%, 2%
176
+ // 05: 3%, 4%, 5%, 6%, 7%
177
+ // 10: 8%, 9%
178
+
179
+ @if ($l-base < 3%) {
180
+ $l-0: $l-base;
181
+ $l-5: $l-base + 5%;
182
+ } @else if ($l-base < 8%) {
183
+ // $l-0: math.max($l-base - 5%, 0%);
184
+ $l-0: $l-base - 5%;
185
+ $l-5: $l-base;
186
+ } @else {
187
+ // $l-0: math.max($l-base - 10%, 0%);
188
+ $l-0: $l-base - 10%;
189
+ $l-5: $l-base - 5%;
190
+ }
191
+
192
+ $shades: ();
193
+
194
+ @for $i from 0 through 9 {
195
+ // if $l-base = 3%, then we get 3%, 13%, 23%, 33% etc.
196
+ $color-l-0: math.max($l-0 + $i * 10, 0%);
197
+
198
+ // if $l-base = 3%, then we get 8%, 18%, 28%, 38% etc.
199
+ $color-l-5: $l-5 + $i * 10;
200
+
201
+ $shades: map.set($shades, "#{$i}0", $color-l-0);
202
+ $shades: map.set($shades, "#{$i}5", $color-l-5);
203
+
204
+ @include register-var($name, $color-l-0, "", "-#{$i}0-l");
205
+ @include register-var($name, $color-l-5, "", "-#{$i}5-l");
206
+
207
+ @if $color-l-0 == $l {
208
+ $base-digits: "#{$i}0";
209
+ } @else if $color-l-5 == $l {
210
+ $base-digits: "#{$i}5";
211
+ }
212
+ }
213
+
214
+ $l-100: math.min($l-0 + 100%, 100%);
215
+ $shades: map.set($shades, "100", $l-100);
216
+ @include register-var($name, $l-100, "", "-100-l");
217
+
218
+ // === STEP 3 ===
219
+ // Find accessible color combinations
220
+
221
+ $combos: ();
222
+
223
+ @each $digits-bg, $bg-l in $shades {
224
+ $background: hsl($h, $s, $bg-l);
225
+ $bg-lum: fn.bulmaColorLuminance($background);
226
+ $bg-is-light: $bg-lum > 0.55;
227
+ $candidates: ();
228
+ $found: false;
229
+
230
+ // If the background color is the base color
231
+ @if $bg-l == $l {
232
+ $base-digits: $digits-bg;
233
+
234
+ // Even if the base color as a background
235
+ // doesn't have an appropriate foreground,
236
+ // we still add to the list of "valid" contrast combos for now.
237
+ @if $bg-is-light {
238
+ $combos: map.set($combos, $base-digits, "10");
239
+ } @else {
240
+ $combos: map.set($combos, $base-digits, "100");
241
+ }
242
+ }
243
+
244
+ // We capture all contrast ratios for any given background
245
+ // using all foreground options
246
+ $current-best-digits: "00";
247
+ $current-best-ratio: 0;
248
+
249
+ @each $digits-fg, $fg-l in $shades {
250
+ $foreground: hsl($h, $s, $fg-l);
251
+ $ratio: 0;
252
+ $is-light-fg: false;
253
+
254
+ // Source: https://www.w3.org/TR/WCAG20-TECHS/G17.html
255
+ $fg-lum: fn.bulmaColorLuminance($foreground);
256
+
257
+ @if (lightness($foreground) > lightness($background)) {
258
+ $is-light-fg: true;
259
+ $ratio: math.div(($fg-lum + 0.05), ($bg-lum + 0.05));
260
+ } @else {
261
+ $ratio: math.div(($bg-lum + 0.05), ($fg-lum + 0.05));
262
+ }
263
+
264
+ @if $ratio > 7 {
265
+ $candidates: list.append(
266
+ $candidates,
267
+ fn.bulmaStringToNumber($digits-fg)
268
+ );
269
+
270
+ @if ($is-light-fg) {
271
+ @if (not $found) {
272
+ // Store the background/foreground combination
273
+ $combos: map.set($combos, $digits-bg, $digits-fg);
274
+ $current-best-digits: $digits-fg;
275
+ $current-best-ratio: $ratio;
276
+ $found: true;
277
+ }
278
+ } @else {
279
+ $combos: map.set($combos, $digits-bg, $digits-fg);
280
+ $current-best-digits: $digits-fg;
281
+ $current-best-ratio: $ratio;
282
+ }
283
+ }
284
+ }
285
+
286
+ // We haven't found a decent ratio
287
+ @each $digits-fg, $fg-l in $shades {
288
+ @if (map.has-key($combos, $digits-bg) == false) {
289
+ @if ($bg-is-light) {
290
+ // Light background so we set a dark foreground
291
+ $combos: map.set($combos, $digits-bg, "00");
292
+ } @else {
293
+ // Dark background so we set a light foreground
294
+ $combos: map.set($combos, $digits-bg, "100");
295
+ }
296
+ }
297
+ }
298
+ }
299
+
300
+ // The output needs to be:
301
+ // --bulma-primary-invert-l: var(--bulma-primary-100-l);
302
+
303
+ @each $bg, $fg in $combos {
304
+ // Just using this loop to register all 20 digits
305
+ $bg-l: getVar($name, "", "-#{$bg}-l");
306
+ @include register-var("#{$name}-#{$bg}", buildHslaString($name, $bg-l));
307
+
308
+ // Register the lightness
309
+ @include register-var(
310
+ $name,
311
+ getVar($name, "", "-#{$fg}-l"),
312
+ "",
313
+ "-#{$bg}-invert-l"
314
+ );
315
+
316
+ // Resiter the color using that lightness
317
+ $bg-invert-l: getVar($name, "", "-#{$bg}-invert-l");
318
+ @include register-var(
319
+ "#{$name}-#{$bg}-invert",
320
+ buildHslaString($name, $bg-invert-l)
321
+ );
322
+ }
323
+
324
+ // If an invert color is provided by the user
325
+ @if $invert {
326
+ @include register-var($name, lightness($invert), "", "-invert-l");
327
+ @include register-var("#{$name}-invert", $invert);
328
+ } @else {
329
+ $base-invert-l-digits: map.get($combos, $base-digits);
330
+ @include register-var(
331
+ $name,
332
+ getVar($name, "", "-#{$base-invert-l-digits}-l"),
333
+ "",
334
+ "-invert-l"
335
+ );
336
+
337
+ $base-invert-l: getVar($name, "", "-invert-l");
338
+ @include register-var(
339
+ "#{$name}-invert",
340
+ buildHslaString($name, $base-invert-l)
341
+ );
342
+ }
343
+
344
+ // Good color on light background (90% lightness)
345
+ @if $light and $dark {
346
+ @include register-var($name, lightness($light), "", "-light-l");
347
+ @include register-var($name, lightness($light), "", "-dark-invert-l");
348
+ @include register-var("#{$name}-light", $light);
349
+ @include register-var("#{$name}-dark-invert", $light);
350
+
351
+ @include register-var($name, lightness($dark), "", "-dark-l");
352
+ @include register-var($name, lightness($dark), "", "-light-invert-l");
353
+ @include register-var("#{$name}-dark", $dark);
354
+ @include register-var("#{$name}-light-invert", $dark);
355
+ } @else {
356
+ @include register-var($name, getVar($name, "", "-90-l"), "", "-light-l");
357
+
358
+ $light-l: getVar($name, "", "-light-l");
359
+ @include register-var("#{$name}-light", buildHslaString($name, $light-l));
360
+
361
+ $light-invert-l-digits: map.get($combos, "90");
362
+ @include register-var(
363
+ $name,
364
+ getVar($name, "", "-#{$light-invert-l-digits}-l"),
365
+ "",
366
+ "-light-invert-l"
367
+ );
368
+
369
+ $light-invert-l: getVar($name, "", "-light-invert-l");
370
+ @include register-var(
371
+ "#{$name}-light-invert",
372
+ buildHslaString($name, $light-invert-l)
373
+ );
374
+
375
+ // Good color on dark background (10% lightness)
376
+ @include register-var($name, getVar($name, "", "-10-l"), "", "-dark-l");
377
+
378
+ $dark-l: getVar($name, "", "-dark-l");
379
+ @include register-var("#{$name}-dark", buildHslaString($name, $dark-l));
380
+
381
+ $dark-invert-l-digits: map.get($combos, "10");
382
+ @include register-var(
383
+ $name,
384
+ getVar($name, "", "-#{$dark-invert-l-digits}-l"),
385
+ "",
386
+ "-dark-invert-l"
387
+ );
388
+
389
+ $dark-invert-l: getVar($name, "", "-dark-invert-l");
390
+ @include register-var(
391
+ "#{$name}-dark-invert",
392
+ buildHslaString($name, $dark-invert-l)
393
+ );
394
+
395
+ // Soft and Bold colors
396
+ $soft-l: getVar("soft-l");
397
+ $soft-invert-l: getVar("soft-invert-l");
398
+ $bold-l: getVar("bold-l");
399
+ $bold-invert-l: getVar("bold-invert-l");
400
+ @include register-var("#{$name}-soft", buildHslaString($name, $soft-l));
401
+ @include register-var("#{$name}-bold", buildHslaString($name, $bold-l));
402
+ @include register-var(
403
+ "#{$name}-soft-invert",
404
+ buildHslaString($name, $soft-invert-l)
405
+ );
406
+ @include register-var(
407
+ "#{$name}-bold-invert",
408
+ buildHslaString($name, $bold-invert-l)
409
+ );
410
+ }
411
+ }
412
+
413
+ @mixin bulma-theme($name) {
414
+ [data-#{iv.$class-prefix}theme="#{$name}"],
415
+ .#{iv.$class-prefix}theme-#{$name} {
416
+ @content;
417
+ }
418
+ }
419
+
420
+ @mixin system-theme($name) {
421
+ @media (prefers-color-scheme: #{$name}) {
422
+ :root {
423
+ @content;
424
+ }
425
+ }
426
+ }
@@ -0,0 +1,112 @@
1
+ @use "initial-variables" as iv;
2
+ @use "functions" as fn;
3
+
4
+ // Scheme colors
5
+
6
+ $scheme-main: iv.$white !default;
7
+ $scheme-main-bis: iv.$white-bis !default;
8
+ $scheme-main-ter: iv.$white-ter !default;
9
+ $scheme-invert: iv.$black !default;
10
+ $scheme-invert-bis: iv.$black-bis !default;
11
+ $scheme-invert-ter: iv.$black-ter !default;
12
+
13
+ // Text colors
14
+
15
+ $text: iv.$grey-dark !default;
16
+ $text-invert: fn.bulmaFindColorInvert($text) !default;
17
+ $text-weak: iv.$grey !default;
18
+ $text-strong: iv.$grey-darker !default;
19
+
20
+ // Status colors
21
+
22
+ $primary: iv.$turquoise !default;
23
+ $info: iv.$cyan !default;
24
+ $success: iv.$green !default;
25
+ $warning: iv.$yellow !default;
26
+ $danger: iv.$red !default;
27
+ $light: iv.$white-ter !default;
28
+ $dark: iv.$grey-darker !default;
29
+
30
+ // Link colors
31
+
32
+ $link: iv.$blue !default;
33
+
34
+ // Decorative colors
35
+
36
+ $background: iv.$white-ter !default;
37
+ $border: iv.$grey-lighter !default;
38
+ $border-weak: iv.$grey-lightest !default;
39
+
40
+ // Code colors
41
+
42
+ $code: iv.$red !default;
43
+ $code-background: $background !default;
44
+
45
+ $pre: $text !default;
46
+ $pre-background: $background !default;
47
+
48
+ // Typography
49
+
50
+ $family-primary: iv.$family-sans-serif !default;
51
+ $family-secondary: iv.$family-sans-serif !default;
52
+ $family-code: iv.$family-monospace !default;
53
+
54
+ $size-small: iv.$size-7 !default;
55
+ $size-normal: iv.$size-6 !default;
56
+ $size-medium: iv.$size-5 !default;
57
+ $size-large: iv.$size-4 !default;
58
+
59
+ // Effects
60
+
61
+ $shadow-color: iv.$black !default;
62
+
63
+ // Lists and maps
64
+ $custom-colors: null !default;
65
+ $custom-shades: null !default;
66
+
67
+ $colors: fn.mergeColorMaps(
68
+ (
69
+ "white": (
70
+ iv.$white,
71
+ iv.$black,
72
+ ),
73
+ "black": (
74
+ iv.$black,
75
+ iv.$white,
76
+ ),
77
+ "light": (
78
+ $light,
79
+ $dark,
80
+ ),
81
+ "dark": (
82
+ $dark,
83
+ $light,
84
+ ),
85
+ "text": $text,
86
+ "primary": $primary,
87
+ "link": $link,
88
+ "info": $info,
89
+ "success": $success,
90
+ "warning": $warning,
91
+ "danger": $danger,
92
+ ),
93
+ $custom-colors
94
+ ) !default;
95
+
96
+ $shades: fn.mergeColorMaps(
97
+ (
98
+ "black-bis": iv.$black-bis,
99
+ "black-ter": iv.$black-ter,
100
+ "grey-darker": iv.$grey-darker,
101
+ "grey-dark": iv.$grey-dark,
102
+ "grey": iv.$grey,
103
+ "grey-light": iv.$grey-light,
104
+ "grey-lighter": iv.$grey-lighter,
105
+ "white-ter": iv.$white-ter,
106
+ "white-bis": iv.$white-bis,
107
+ ),
108
+ $custom-shades
109
+ ) !default;
110
+
111
+ $sizes: iv.$size-1 iv.$size-2 iv.$size-3 iv.$size-4 iv.$size-5 iv.$size-6
112
+ iv.$size-7 !default;
@@ -0,0 +1,34 @@
1
+ @use "controls";
2
+ @use "mixins";
3
+
4
+ %arrow {
5
+ @include mixins.arrow;
6
+ }
7
+
8
+ %block {
9
+ @include mixins.block;
10
+ }
11
+
12
+ %control {
13
+ @include controls.control;
14
+ }
15
+
16
+ %delete {
17
+ @include mixins.delete;
18
+ }
19
+
20
+ %loader {
21
+ @include mixins.loader;
22
+ }
23
+
24
+ %overlay {
25
+ @include mixins.overlay;
26
+ }
27
+
28
+ %reset {
29
+ @include mixins.reset;
30
+ }
31
+
32
+ %unselectable {
33
+ @include mixins.unselectable;
34
+ }