elixir-toolkit-theme 2.1.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/contributor-carousel-selection.html +2 -3
  3. data/_includes/contributor-minitiles-page.html +2 -3
  4. data/_includes/contributor-tiles-all.html +2 -3
  5. data/_includes/news.html +1 -1
  6. data/_includes/resource-table-all.html +1 -1
  7. data/_includes/section-navigation-tiles.html +20 -2
  8. data/_includes/toc.html +1 -1
  9. data/_layouts/default.html +2 -2
  10. data/_layouts/page.html +1 -1
  11. data/_sass/bootstrap/_accordion.scss +9 -0
  12. data/_sass/bootstrap/_alert.scss +8 -11
  13. data/_sass/bootstrap/_button-group.scss +2 -2
  14. data/_sass/bootstrap/_buttons.scss +3 -3
  15. data/_sass/bootstrap/_card.scss +5 -0
  16. data/_sass/bootstrap/_carousel.scss +20 -2
  17. data/_sass/bootstrap/_close.scss +32 -9
  18. data/_sass/bootstrap/_dropdown.scss +1 -0
  19. data/_sass/bootstrap/_functions.scss +1 -1
  20. data/_sass/bootstrap/_grid.scss +6 -0
  21. data/_sass/bootstrap/_helpers.scss +2 -0
  22. data/_sass/bootstrap/_list-group.scss +12 -7
  23. data/_sass/bootstrap/_maps.scss +120 -0
  24. data/_sass/bootstrap/_mixins.scss +1 -2
  25. data/_sass/bootstrap/_nav.scss +42 -17
  26. data/_sass/bootstrap/_navbar.scss +15 -4
  27. data/_sass/bootstrap/_offcanvas.scss +4 -2
  28. data/_sass/bootstrap/_pagination.scss +1 -1
  29. data/_sass/bootstrap/_progress.scss +10 -1
  30. data/_sass/bootstrap/_reboot.scss +7 -7
  31. data/_sass/bootstrap/_root.scss +121 -10
  32. data/_sass/bootstrap/_tables.scss +18 -11
  33. data/_sass/bootstrap/_tooltip.scss +4 -5
  34. data/_sass/bootstrap/_utilities.scss +172 -13
  35. data/_sass/bootstrap/_variables-dark.scss +85 -0
  36. data/_sass/bootstrap/_variables.scss +268 -157
  37. data/_sass/bootstrap/bootstrap-grid.scss +1 -3
  38. data/_sass/bootstrap/bootstrap-reboot.scss +1 -0
  39. data/_sass/bootstrap/bootstrap-utilities.scss +1 -0
  40. data/_sass/bootstrap/bootstrap.scss +1 -0
  41. data/_sass/bootstrap/forms/_floating-labels.scss +23 -3
  42. data/_sass/bootstrap/forms/_form-check.scss +25 -12
  43. data/_sass/bootstrap/forms/_form-control.scss +24 -4
  44. data/_sass/bootstrap/forms/_form-range.scss +3 -3
  45. data/_sass/bootstrap/forms/_form-select.scss +12 -3
  46. data/_sass/bootstrap/forms/_input-group.scss +1 -1
  47. data/_sass/bootstrap/helpers/_color-bg.scss +1 -4
  48. data/_sass/bootstrap/helpers/_colored-links.scss +20 -2
  49. data/_sass/bootstrap/helpers/_focus-ring.scss +5 -0
  50. data/_sass/bootstrap/helpers/_icon-link.scss +25 -0
  51. data/_sass/bootstrap/helpers/_vr.scss +1 -1
  52. data/_sass/bootstrap/mixins/_alert.scss +4 -1
  53. data/_sass/bootstrap/mixins/_banner.scss +2 -4
  54. data/_sass/bootstrap/mixins/_caret.scss +30 -25
  55. data/_sass/bootstrap/mixins/_color-mode.scss +21 -0
  56. data/_sass/bootstrap/mixins/_forms.scss +8 -7
  57. data/_sass/bootstrap/mixins/_list-group.scss +2 -0
  58. data/_sass/bootstrap/mixins/_utilities.scss +1 -1
  59. data/_sass/bootstrap/mixins/_visually-hidden.scss +5 -1
  60. data/_sass/bootstrap/tests/jasmine.js +16 -0
  61. data/_sass/bootstrap/tests/mixins/_color-modes.test.scss +69 -0
  62. data/_sass/bootstrap/tests/mixins/_media-query-color-mode-full.test.scss +8 -0
  63. data/_sass/bootstrap/tests/mixins/_utilities.test.scss +393 -0
  64. data/_sass/bootstrap/tests/sass-true/register.js +14 -0
  65. data/_sass/bootstrap/tests/sass-true/runner.js +17 -0
  66. data/_sass/bootstrap/tests/utilities/_api.test.scss +75 -0
  67. data/_sass/bootstrap/vendor/_rfs.scss +23 -29
  68. data/assets/css/all.min.css +6 -3
  69. data/assets/css/dataTables.bootstrap5.min.css +2 -2
  70. data/assets/css/main.scss +30 -4
  71. data/assets/js/anchor.min.js +3 -3
  72. data/assets/js/bootstrap.bundle.min.js +3 -3
  73. data/assets/js/bootstrap.bundle.min.js.map +1 -1
  74. data/assets/js/dataTables.bootstrap5.min.js +4 -14
  75. data/assets/js/jquery.dataTables.min.js +4 -187
  76. data/assets/js/jquery.min.js +2 -2
  77. data/assets/js/jquery.min.map +1 -1
  78. data/assets/webfonts/fa-brands-400.ttf +0 -0
  79. data/assets/webfonts/fa-brands-400.woff2 +0 -0
  80. data/assets/webfonts/fa-regular-400.ttf +0 -0
  81. data/assets/webfonts/fa-regular-400.woff2 +0 -0
  82. data/assets/webfonts/fa-solid-900.ttf +0 -0
  83. data/assets/webfonts/fa-solid-900.woff2 +0 -0
  84. data/assets/webfonts/fa-v4compatibility.ttf +0 -0
  85. data/assets/webfonts/fa-v4compatibility.woff2 +0 -0
  86. metadata +13 -2
@@ -6,7 +6,6 @@
6
6
  // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
7
7
 
8
8
  @mixin visually-hidden() {
9
- position: absolute !important;
10
9
  width: 1px !important;
11
10
  height: 1px !important;
12
11
  padding: 0 !important;
@@ -15,6 +14,11 @@
15
14
  clip: rect(0, 0, 0, 0) !important;
16
15
  white-space: nowrap !important;
17
16
  border: 0 !important;
17
+
18
+ // Fix for positioned table caption that could become anonymous cells
19
+ &:not(caption) {
20
+ position: absolute !important;
21
+ }
18
22
  }
19
23
 
20
24
  // Use to only display content when it's focused, or one of its child elements is focused
@@ -0,0 +1,16 @@
1
+ /* eslint-disable camelcase */
2
+
3
+ 'use strict'
4
+
5
+ const path = require('node:path')
6
+
7
+ module.exports = {
8
+ spec_dir: 'scss',
9
+ // Make Jasmine look for `.test.scss` files
10
+ spec_files: ['**/*.{test,spec}.scss'],
11
+ // Compile them into JS scripts running `sass-true`
12
+ requires: [path.join(__dirname, 'sass-true/register')],
13
+ // Ensure we use `require` so that the require.extensions works
14
+ // as `import` completely bypasses it
15
+ jsLoader: 'require'
16
+ }
@@ -0,0 +1,69 @@
1
+ // stylelint-disable selector-attribute-quotes
2
+
3
+ @import "../../functions";
4
+ @import "../../variables";
5
+ @import "../../variables-dark";
6
+ @import "../../maps";
7
+ @import "../../mixins";
8
+
9
+ @include describe("global $color-mode-type: data") {
10
+ @include it("generates data attribute selectors for dark mode") {
11
+ @include assert() {
12
+ @include output() {
13
+ @include color-mode(dark) {
14
+ .element {
15
+ color: var(--bs-primary-text-emphasis);
16
+ background-color: var(--bs-primary-bg-subtle);
17
+ }
18
+ }
19
+ @include color-mode(dark, true) {
20
+ --custom-color: #{mix($indigo, $blue, 50%)};
21
+ }
22
+ }
23
+ @include expect() {
24
+ [data-bs-theme=dark] .element {
25
+ color: var(--bs-primary-text-emphasis);
26
+ background-color: var(--bs-primary-bg-subtle);
27
+ }
28
+ [data-bs-theme=dark] {
29
+ --custom-color: #3a3ff8;
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ @include describe("global $color-mode-type: media-query") {
37
+ @include it("generates media queries for dark mode") {
38
+ $color-mode-type: media-query !global;
39
+
40
+ @include assert() {
41
+ @include output() {
42
+ @include color-mode(dark) {
43
+ .element {
44
+ color: var(--bs-primary-text-emphasis);
45
+ background-color: var(--bs-primary-bg-subtle);
46
+ }
47
+ }
48
+ @include color-mode(dark, true) {
49
+ --custom-color: #{mix($indigo, $blue, 50%)};
50
+ }
51
+ }
52
+ @include expect() {
53
+ @media (prefers-color-scheme: dark) {
54
+ .element {
55
+ color: var(--bs-primary-text-emphasis);
56
+ background-color: var(--bs-primary-bg-subtle);
57
+ }
58
+ }
59
+ @media (prefers-color-scheme: dark) {
60
+ :root {
61
+ --custom-color: #3a3ff8;
62
+ }
63
+ }
64
+ }
65
+ }
66
+
67
+ $color-mode-type: data !global;
68
+ }
69
+ }
@@ -0,0 +1,8 @@
1
+ $color-mode-type: media-query;
2
+
3
+ @import "../../bootstrap";
4
+
5
+ @include describe("global $color-mode-type: media-query") {
6
+ @include it("compiles entirely Bootstrap CSS with media-query color mode") { // stylelint-disable-line block-no-empty
7
+ }
8
+ }
@@ -0,0 +1,393 @@
1
+ $prefix: bs-;
2
+ $enable-important-utilities: false;
3
+
4
+ // Important: Do not import rfs to check that the mixin just calls the appropriate functions from it
5
+ @import "../../mixins/utilities";
6
+
7
+ @mixin test-generate-utility($params...) {
8
+ @include assert() {
9
+ @include output() {
10
+ @include generate-utility($params...);
11
+ }
12
+
13
+ @include expect() {
14
+ @content;
15
+ }
16
+ }
17
+ }
18
+
19
+ @include describe(generate-utility) {
20
+ @include it("generates a utility class for each value") {
21
+ @include test-generate-utility(
22
+ (
23
+ property: "padding",
24
+ values: (small: .5rem, large: 2rem)
25
+ )
26
+ ) {
27
+ .padding-small {
28
+ padding: .5rem;
29
+ }
30
+
31
+ .padding-large {
32
+ padding: 2rem;
33
+ }
34
+ }
35
+ }
36
+
37
+ @include describe("global $enable-important-utilities: true") {
38
+ @include it("sets !important") {
39
+ $enable-important-utilities: true !global;
40
+
41
+ @include test-generate-utility(
42
+ (
43
+ property: "padding",
44
+ values: (small: .5rem, large: 2rem)
45
+ )
46
+ ) {
47
+ .padding-small {
48
+ padding: .5rem !important;
49
+ }
50
+
51
+ .padding-large {
52
+ padding: 2rem !important;
53
+ }
54
+ }
55
+
56
+ $enable-important-utilities: false !global;
57
+ }
58
+ }
59
+
60
+ @include describe("$utility") {
61
+ @include describe("values") {
62
+ @include it("supports null keys") {
63
+ @include test-generate-utility(
64
+ (
65
+ property: "padding",
66
+ values: (null: 1rem, small: .5rem, large: 2rem)
67
+ ),
68
+ ) {
69
+ .padding {
70
+ padding: 1rem;
71
+ }
72
+
73
+ .padding-small {
74
+ padding: .5rem;
75
+ }
76
+
77
+ .padding-large {
78
+ padding: 2rem;
79
+ }
80
+ }
81
+ }
82
+
83
+ @include it("ignores null values") {
84
+ @include test-generate-utility(
85
+ (
86
+ property: "padding",
87
+ values: (small: null, large: 2rem)
88
+ )
89
+ ) {
90
+ .padding-large {
91
+ padding: 2rem;
92
+ }
93
+ }
94
+ }
95
+
96
+ @include it("supports lists") {
97
+ @include test-generate-utility(
98
+ (
99
+ property: "padding",
100
+ values: 1rem 2rem
101
+ )
102
+ ) {
103
+ .padding-1rem {
104
+ padding: 1rem;
105
+ }
106
+
107
+ .padding-2rem {
108
+ padding: 2rem;
109
+ }
110
+ }
111
+ }
112
+
113
+ @include it("supports single values") {
114
+ @include test-generate-utility(
115
+ (
116
+ property: padding,
117
+ values: 1rem
118
+ )
119
+ ) {
120
+ .padding-1rem {
121
+ padding: 1rem;
122
+ }
123
+ }
124
+ }
125
+ }
126
+
127
+ @include describe("class & property") {
128
+ @include it("adds each property to the declaration") {
129
+ @include test-generate-utility(
130
+ (
131
+ class: padding-x,
132
+ property: padding-inline-start padding-inline-end,
133
+ values: 1rem
134
+ )
135
+ ) {
136
+ .padding-x-1rem {
137
+ padding-inline-start: 1rem;
138
+ padding-inline-end: 1rem;
139
+ }
140
+ }
141
+ }
142
+
143
+ @include it("uses the first property as class name") {
144
+ @include test-generate-utility(
145
+ (
146
+ property: padding-inline-start padding-inline-end,
147
+ values: 1rem
148
+ )
149
+ ) {
150
+ .padding-inline-start-1rem {
151
+ padding-inline-start: 1rem;
152
+ padding-inline-end: 1rem;
153
+ }
154
+ }
155
+ }
156
+
157
+ @include it("supports a null class to create classes straight from the values") {
158
+ @include test-generate-utility(
159
+ (
160
+ property: visibility,
161
+ class: null,
162
+ values: (
163
+ visible: visible,
164
+ invisible: hidden,
165
+ )
166
+ )
167
+ ) {
168
+ .visible {
169
+ visibility: visible;
170
+ }
171
+
172
+ .invisible {
173
+ visibility: hidden;
174
+ }
175
+ }
176
+ }
177
+ }
178
+
179
+ @include describe("state") {
180
+ @include it("Generates selectors for each states") {
181
+ @include test-generate-utility(
182
+ (
183
+ property: padding,
184
+ values: 1rem,
185
+ state: hover focus,
186
+ )
187
+ ) {
188
+ .padding-1rem {
189
+ padding: 1rem;
190
+ }
191
+
192
+ .padding-1rem-hover:hover {
193
+ padding: 1rem;
194
+ }
195
+
196
+ .padding-1rem-focus:focus {
197
+ padding: 1rem;
198
+ }
199
+ }
200
+ }
201
+ }
202
+
203
+ @include describe("css-var"){
204
+ @include it("sets a CSS variable instead of the property") {
205
+ @include test-generate-utility(
206
+ (
207
+ property: padding,
208
+ css-variable-name: padding,
209
+ css-var: true,
210
+ values: 1rem 2rem
211
+ )
212
+ ) {
213
+ .padding-1rem {
214
+ --bs-padding: 1rem;
215
+ }
216
+
217
+ .padding-2rem {
218
+ --bs-padding: 2rem;
219
+ }
220
+ }
221
+ }
222
+
223
+ @include it("defaults to class") {
224
+ @include test-generate-utility(
225
+ (
226
+ property: padding,
227
+ class: padding,
228
+ css-var: true,
229
+ values: 1rem 2rem
230
+ )
231
+ ) {
232
+ .padding-1rem {
233
+ --bs-padding: 1rem;
234
+ }
235
+
236
+ .padding-2rem {
237
+ --bs-padding: 2rem;
238
+ }
239
+ }
240
+ }
241
+ }
242
+
243
+ @include describe("local-vars") {
244
+ @include it("generates the listed variables") {
245
+ @include test-generate-utility(
246
+ (
247
+ property: color,
248
+ class: desaturated-color,
249
+ local-vars: (
250
+ color-opacity: 1,
251
+ color-saturation: .25
252
+ ),
253
+ values: (
254
+ blue: hsla(192deg, var(--bs-color-saturation), 0, var(--bs-color-opacity))
255
+ )
256
+ )
257
+ ) {
258
+ .desaturated-color-blue {
259
+ --bs-color-opacity: 1;
260
+ // Sass compilation will put a leading zero so we want to keep that one
261
+ // stylelint-disable-next-line stylistic/number-leading-zero
262
+ --bs-color-saturation: 0.25;
263
+ color: hsla(192deg, var(--bs-color-saturation), 0, var(--bs-color-opacity));
264
+ }
265
+ }
266
+ }
267
+ }
268
+
269
+ @include describe("css-var & state") {
270
+ @include it("Generates a rule with for each state with a CSS variable") {
271
+ @include test-generate-utility(
272
+ (
273
+ property: padding,
274
+ css-var: true,
275
+ css-variable-name: padding,
276
+ values: 1rem,
277
+ state: hover focus,
278
+ )
279
+ ) {
280
+ .padding-1rem {
281
+ --bs-padding: 1rem;
282
+ }
283
+
284
+ .padding-1rem-hover:hover {
285
+ --bs-padding: 1rem;
286
+ }
287
+
288
+ .padding-1rem-focus:focus {
289
+ --bs-padding: 1rem;
290
+ }
291
+ }
292
+ }
293
+ }
294
+
295
+ @include describe("rtl") {
296
+ @include it("sets up RTLCSS for removal when false") {
297
+ @include test-generate-utility(
298
+ (
299
+ property: padding,
300
+ values: 1rem,
301
+ rtl: false
302
+ )
303
+ ) {
304
+ /* rtl:begin:remove */
305
+
306
+ .padding-1rem {
307
+ padding: 1rem;
308
+ }
309
+
310
+ /* rtl:end:remove */
311
+
312
+ }
313
+ }
314
+ }
315
+
316
+ @include describe("rfs") {
317
+ @include it("sets the fluid value when not inside media query") {
318
+ @include test-generate-utility(
319
+ (
320
+ property: padding,
321
+ values: 1rem,
322
+ rfs: true
323
+ )
324
+ ) {
325
+ .padding-1rem {
326
+ padding: rfs-fluid-value(1rem);
327
+ }
328
+ }
329
+ }
330
+
331
+ @include it("sets the value when inside the media query") {
332
+ @include test-generate-utility(
333
+ (
334
+ property: padding,
335
+ values: 1rem,
336
+ rfs: true
337
+ ),
338
+ $is-rfs-media-query: true
339
+ ) {
340
+ .padding-1rem {
341
+ padding: rfs-value(1rem);
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+
348
+ @include describe("$infix") {
349
+ @include it("inserts the given infix") {
350
+ @include test-generate-utility(
351
+ (
352
+ property: "padding",
353
+ values: (null: 1rem, small: .5rem, large: 2rem)
354
+ ),
355
+ $infix: -sm
356
+ ) {
357
+ .padding-sm {
358
+ padding: 1rem;
359
+ }
360
+
361
+ .padding-sm-small {
362
+ padding: .5rem;
363
+ }
364
+
365
+ .padding-sm-large {
366
+ padding: 2rem;
367
+ }
368
+ }
369
+ }
370
+
371
+ @include it("strips leading - if class is null") {
372
+ @include test-generate-utility(
373
+ (
374
+ property: visibility,
375
+ class: null,
376
+ values: (
377
+ visible: visible,
378
+ invisible: hidden,
379
+ )
380
+ ),
381
+ -sm
382
+ ) {
383
+ .sm-visible {
384
+ visibility: visible;
385
+ }
386
+
387
+ .sm-invisible {
388
+ visibility: hidden;
389
+ }
390
+ }
391
+ }
392
+ }
393
+ }
@@ -0,0 +1,14 @@
1
+ 'use strict'
2
+
3
+ const path = require('node:path')
4
+
5
+ const runnerPath = path.join(__dirname, 'runner').replace(/\\/g, '/')
6
+
7
+ require.extensions['.scss'] = (module, filename) => {
8
+ const normalizedFilename = filename.replace(/\\/g, '/')
9
+
10
+ return module._compile(`
11
+ const runner = require('${runnerPath}')
12
+ runner('${normalizedFilename}', { describe, it })
13
+ `, filename)
14
+ }
@@ -0,0 +1,17 @@
1
+ 'use strict'
2
+
3
+ const fs = require('node:fs')
4
+ const path = require('node:path')
5
+ const { runSass } = require('sass-true')
6
+
7
+ module.exports = (filename, { describe, it }) => {
8
+ const data = fs.readFileSync(filename, 'utf8')
9
+ const TRUE_SETUP = '$true-terminal-output: false; @import "true";'
10
+ const sassString = TRUE_SETUP + data
11
+
12
+ runSass(
13
+ { describe, it, sourceType: 'string' },
14
+ sassString,
15
+ { loadPaths: [path.dirname(filename)] }
16
+ )
17
+ }
@@ -0,0 +1,75 @@
1
+ @import "../../functions";
2
+ @import "../../variables";
3
+ @import "../../variables-dark";
4
+ @import "../../maps";
5
+ @import "../../mixins";
6
+
7
+ $utilities: ();
8
+
9
+ @include describe("utilities/api") {
10
+ @include it("generates utilities for each breakpoints") {
11
+ $utilities: (
12
+ margin: (
13
+ property: margin,
14
+ values: auto
15
+ ),
16
+ padding: (
17
+ property: padding,
18
+ responsive: true,
19
+ values: 1rem
20
+ ),
21
+ font-size: (
22
+ property: font-size,
23
+ values: (large: 1.25rem),
24
+ print: true
25
+ )
26
+ ) !global;
27
+
28
+ $grid-breakpoints: (
29
+ xs: 0,
30
+ sm: 333px,
31
+ md: 666px
32
+ ) !global;
33
+
34
+ @include assert() {
35
+ @include output() {
36
+ @import "../../utilities/api";
37
+ }
38
+
39
+ @include expect() {
40
+ // margin is not set to responsive
41
+ .margin-auto {
42
+ margin: auto !important;
43
+ }
44
+
45
+ // padding is, though
46
+ .padding-1rem {
47
+ padding: 1rem !important;
48
+ }
49
+
50
+ .font-size-large {
51
+ font-size: 1.25rem !important;
52
+ }
53
+
54
+ @media (min-width: 333px) {
55
+ .padding-sm-1rem {
56
+ padding: 1rem !important;
57
+ }
58
+ }
59
+
60
+ @media (min-width: 666px) {
61
+ .padding-md-1rem {
62
+ padding: 1rem !important;
63
+ }
64
+ }
65
+
66
+ @media print {
67
+ .font-size-print-large {
68
+ font-size: 1.25rem !important;
69
+ }
70
+ }
71
+ }
72
+
73
+ }
74
+ }
75
+ }