@red-hat-developer-hub/backstage-plugin-theme 0.4.7 → 0.4.9

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 (53) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/components/ThemeProvider.esm.js +25 -0
  3. package/dist/components/ThemeProvider.esm.js.map +1 -0
  4. package/dist/fonts.esm.js +92 -0
  5. package/dist/fonts.esm.js.map +1 -0
  6. package/dist/rhdh.esm.js +3 -3
  7. package/dist/rhdh.esm.js.map +1 -1
  8. package/dist/themes.esm.js +2 -15
  9. package/dist/themes.esm.js.map +1 -1
  10. package/dist/typography.esm.js +10 -40
  11. package/dist/typography.esm.js.map +1 -1
  12. package/dist/utils/createComponents.esm.js +23 -0
  13. package/dist/utils/createComponents.esm.js.map +1 -1
  14. package/package.json +6 -14
  15. package/dist/plugins/theme/fonts/font.css.esm.js +0 -7
  16. package/dist/plugins/theme/fonts/font.css.esm.js.map +0 -1
  17. package/fonts/OPEN-FONT-LICENSE +0 -94
  18. package/fonts/README.md +0 -9
  19. package/fonts/RedHatDisplay/RedHatDisplay-Black.woff2 +0 -0
  20. package/fonts/RedHatDisplay/RedHatDisplay-BlackItalic.woff2 +0 -0
  21. package/fonts/RedHatDisplay/RedHatDisplay-Bold.woff2 +0 -0
  22. package/fonts/RedHatDisplay/RedHatDisplay-BoldItalic.woff2 +0 -0
  23. package/fonts/RedHatDisplay/RedHatDisplay-Italic.woff2 +0 -0
  24. package/fonts/RedHatDisplay/RedHatDisplay-Light.woff2 +0 -0
  25. package/fonts/RedHatDisplay/RedHatDisplay-LightItalic.woff2 +0 -0
  26. package/fonts/RedHatDisplay/RedHatDisplay-Medium.woff2 +0 -0
  27. package/fonts/RedHatDisplay/RedHatDisplay-MediumItalic.woff2 +0 -0
  28. package/fonts/RedHatDisplay/RedHatDisplay-Regular.woff2 +0 -0
  29. package/fonts/RedHatMono/RedHatMono-Bold.woff2 +0 -0
  30. package/fonts/RedHatMono/RedHatMono-BoldItalic.woff2 +0 -0
  31. package/fonts/RedHatMono/RedHatMono-Italic.woff2 +0 -0
  32. package/fonts/RedHatMono/RedHatMono-Light.woff2 +0 -0
  33. package/fonts/RedHatMono/RedHatMono-LightItalic.woff2 +0 -0
  34. package/fonts/RedHatMono/RedHatMono-Medium.woff2 +0 -0
  35. package/fonts/RedHatMono/RedHatMono-MediumItalic.woff2 +0 -0
  36. package/fonts/RedHatMono/RedHatMono-Regular.woff2 +0 -0
  37. package/fonts/RedHatText/RedHatText-Bold.woff2 +0 -0
  38. package/fonts/RedHatText/RedHatText-BoldItalic.woff2 +0 -0
  39. package/fonts/RedHatText/RedHatText-Italic.woff2 +0 -0
  40. package/fonts/RedHatText/RedHatText-Light.woff2 +0 -0
  41. package/fonts/RedHatText/RedHatText-LightItalic.woff2 +0 -0
  42. package/fonts/RedHatText/RedHatText-Medium.woff2 +0 -0
  43. package/fonts/RedHatText/RedHatText-MediumItalic.woff2 +0 -0
  44. package/fonts/RedHatText/RedHatText-Regular.woff2 +0 -0
  45. package/fonts/font.css +0 -54
  46. package/fonts/font.min.css +0 -43
  47. package/fonts/index.html +0 -374
  48. /package/{fonts → dist/assets/fonts}/RedHatDisplay/RedHatDisplayVF-Italic.woff2 +0 -0
  49. /package/{fonts → dist/assets/fonts}/RedHatDisplay/RedHatDisplayVF.woff2 +0 -0
  50. /package/{fonts → dist/assets/fonts}/RedHatMono/RedHatMonoVF-Italic.woff2 +0 -0
  51. /package/{fonts → dist/assets/fonts}/RedHatMono/RedHatMonoVF.woff2 +0 -0
  52. /package/{fonts → dist/assets/fonts}/RedHatText/RedHatTextVF-Italic.woff2 +0 -0
  53. /package/{fonts → dist/assets/fonts}/RedHatText/RedHatTextVF.woff2 +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"font.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,94 +0,0 @@
1
- Copyright 2021 Red Hat, Inc.,
2
- with Reserved Font Name Red Hat.
3
-
4
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
- This license is copied below, and is also available with a FAQ at:
6
- http://scripts.sil.org/OFL
7
-
8
-
9
- -----------------------------------------------------------
10
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11
- -----------------------------------------------------------
12
-
13
- PREAMBLE
14
- The goals of the Open Font License (OFL) are to stimulate worldwide
15
- development of collaborative font projects, to support the font creation
16
- efforts of academic and linguistic communities, and to provide a free and
17
- open framework in which fonts may be shared and improved in partnership
18
- with others.
19
-
20
- The OFL allows the licensed fonts to be used, studied, modified and
21
- redistributed freely as long as they are not sold by themselves. The
22
- fonts, including any derivative works, can be bundled, embedded,
23
- redistributed and/or sold with any software provided that any reserved
24
- names are not used by derivative works. The fonts and derivatives,
25
- however, cannot be released under any other type of license. The
26
- requirement for fonts to remain under this license does not apply
27
- to any document created using the fonts or their derivatives.
28
-
29
- DEFINITIONS
30
- "Font Software" refers to the set of files released by the Copyright
31
- Holder(s) under this license and clearly marked as such. This may
32
- include source files, build scripts and documentation.
33
-
34
- "Reserved Font Name" refers to any names specified as such after the
35
- copyright statement(s).
36
-
37
- "Original Version" refers to the collection of Font Software components as
38
- distributed by the Copyright Holder(s).
39
-
40
- "Modified Version" refers to any derivative made by adding to, deleting,
41
- or substituting -- in part or in whole -- any of the components of the
42
- Original Version, by changing formats or by porting the Font Software to a
43
- new environment.
44
-
45
- "Author" refers to any designer, engineer, programmer, technical
46
- writer or other person who contributed to the Font Software.
47
-
48
- PERMISSION & CONDITIONS
49
- Permission is hereby granted, free of charge, to any person obtaining
50
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
- redistribute, and sell modified and unmodified copies of the Font
52
- Software, subject to the following conditions:
53
-
54
- 1) Neither the Font Software nor any of its individual components,
55
- in Original or Modified Versions, may be sold by itself.
56
-
57
- 2) Original or Modified Versions of the Font Software may be bundled,
58
- redistributed and/or sold with any software, provided that each copy
59
- contains the above copyright notice and this license. These can be
60
- included either as stand-alone text files, human-readable headers or
61
- in the appropriate machine-readable metadata fields within text or
62
- binary files as long as those fields can be easily viewed by the user.
63
-
64
- 3) No Modified Version of the Font Software may use the Reserved Font
65
- Name(s) unless explicit written permission is granted by the corresponding
66
- Copyright Holder. This restriction only applies to the primary font name as
67
- presented to the users.
68
-
69
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
- Software shall not be used to promote, endorse or advertise any
71
- Modified Version, except to acknowledge the contribution(s) of the
72
- Copyright Holder(s) and the Author(s) or with their explicit written
73
- permission.
74
-
75
- 5) The Font Software, modified or unmodified, in part or in whole,
76
- must be distributed entirely under this license, and must not be
77
- distributed under any other license. The requirement for fonts to
78
- remain under this license does not apply to any document created
79
- using the Font Software.
80
-
81
- TERMINATION
82
- This license becomes null and void if any of the above conditions are
83
- not met.
84
-
85
- DISCLAIMER
86
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
- OTHER DEALINGS IN THE FONT SOFTWARE.
package/fonts/README.md DELETED
@@ -1,9 +0,0 @@
1
- # Red Hat font family
2
-
3
- See also:
4
-
5
- 1. https://www.patternfly.org/design-foundations/typography
6
- 2. https://www.redhat.com/en/about/brand/standards/typography
7
- 3. https://ux.redhat.com/foundations/typography/
8
- 4. https://github.com/RedHatOfficial/RedHatFont
9
- 5. https://github.com/RedHatOfficial/RedHatFont/tree/master/webfonts
package/fonts/font.css DELETED
@@ -1,54 +0,0 @@
1
- @font-face {
2
- font-family: 'RedHatDisplay';
3
- src: url('./RedHatDisplay/RedHatDisplayVF.woff2') format('woff2-variations');
4
- font-weight: 300 900;
5
- font-style: normal;
6
- font-display: fallback;
7
- }
8
-
9
- @font-face {
10
- font-family: 'RedHatDisplay';
11
- src: url('./RedHatDisplay/RedHatDisplayVF-Italic.woff2')
12
- format('woff2-variations');
13
- font-weight: 300 900;
14
- font-style: italic;
15
- font-display: fallback;
16
- }
17
-
18
- @font-face {
19
- font-family: 'RedHatText';
20
- src: url('./RedHatText/RedHatTextVF.woff2') format('woff2-variations');
21
- font-weight: 300 700;
22
- font-style: normal;
23
- font-display: fallback;
24
- }
25
-
26
- @font-face {
27
- font-family: 'RedHatText';
28
- src: url('./RedHatText/RedHatTextVF-Italic.woff2') format('woff2-variations');
29
- font-weight: 300 700;
30
- font-style: italic;
31
- font-display: fallback;
32
- }
33
-
34
- @font-face {
35
- font-family: 'RedHatMono';
36
- src: url('./RedHatMono/RedHatMonoVF.woff2') format('woff2-variations');
37
- font-weight: 300 700;
38
- font-style: normal;
39
- font-display: fallback;
40
- }
41
-
42
- @font-face {
43
- font-family: 'RedHatMono';
44
- src: url('./RedHatMono/RedHatMonoVF-Italic.woff2') format('woff2-variations');
45
- font-weight: 300 700;
46
- font-style: italic;
47
- font-display: fallback;
48
- }
49
-
50
- pre,
51
- code {
52
- font-family: 'RedHatMono', 'Liberation Mono', consolas, 'SFMono-Regular',
53
- menlo, monaco, 'Courier New', monospace;
54
- }
@@ -1,43 +0,0 @@
1
- @font-face {
2
- font-family: 'RedHatDisplay';
3
- src: url(./RedHatDisplay/RedHatDisplayVF.woff2) format('woff2-variations');
4
- font-weight: 300 900;
5
- font-style: normal;
6
- font-display: fallback;
7
- }
8
- @font-face {
9
- font-family: 'RedHatDisplay';
10
- src: url(./RedHatDisplay/RedHatDisplayVF-Italic.woff2)
11
- format('woff2-variations');
12
- font-weight: 300 900;
13
- font-style: italic;
14
- font-display: fallback;
15
- }
16
- @font-face {
17
- font-family: 'RedHatText';
18
- src: url(./RedHatText/RedHatTextVF.woff2) format('woff2-variations');
19
- font-weight: 300 700;
20
- font-style: normal;
21
- font-display: fallback;
22
- }
23
- @font-face {
24
- font-family: 'RedHatText';
25
- src: url(./RedHatText/RedHatTextVF-Italic.woff2) format('woff2-variations');
26
- font-weight: 300 700;
27
- font-style: italic;
28
- font-display: fallback;
29
- }
30
- @font-face {
31
- font-family: 'RedHatMono';
32
- src: url(./RedHatMono/RedHatMonoVF.woff2) format('woff2-variations');
33
- font-weight: 300 700;
34
- font-style: normal;
35
- font-display: fallback;
36
- }
37
- @font-face {
38
- font-family: 'RedHatMono';
39
- src: url(./RedHatMono/RedHatMonoVF-Italic.woff2) format('woff2-variations');
40
- font-weight: 300 700;
41
- font-style: italic;
42
- font-display: fallback;
43
- }
package/fonts/index.html DELETED
@@ -1,374 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <meta http-equiv="X-UA-Compatible" content="ie=edge" />
7
- <title>Red Hat Font Family</title>
8
- <link rel="stylesheet" href="./font.css" />
9
- <style>
10
- :root {
11
- --font-weight: 500;
12
- }
13
-
14
- *,
15
- *:before,
16
- *:after {
17
- box-sizing: border-box;
18
- }
19
-
20
- html {
21
- font-size: 100%;
22
- }
23
-
24
- body {
25
- line-height: 1.1;
26
- text-rendering: optimizeLegibility;
27
- margin: 0;
28
- padding: 0;
29
- }
30
-
31
- header {
32
- --font-weight: 700;
33
- font-size: clamp(1.2rem, 2.5vw, 4rem);
34
- background-color: #151515;
35
- height: 80vh;
36
- color: #fff;
37
- padding: 30px;
38
- display: grid;
39
- align-items: center;
40
- grid-template-rows: auto 100px;
41
- }
42
-
43
- header .vf-header {
44
- place-self: center;
45
- padding-top: 80px;
46
- }
47
-
48
- header .controls {
49
- place-self: end;
50
- }
51
-
52
- header input[type='range']::-moz-range-track {
53
- background-color: white;
54
- }
55
-
56
- main {
57
- font-size: clamp(1.2rem, 2.5vw, 2.2rem);
58
- margin-bottom: 50px;
59
- }
60
-
61
- .RedHatDisplay {
62
- font-family: 'RedHatDisplay';
63
- }
64
-
65
- .RedHatText {
66
- font-family: 'RedHatText';
67
- }
68
-
69
- .RedHatMono {
70
- font-family: 'RedHatMono';
71
- }
72
-
73
- .w200 {
74
- font-weight: 200;
75
- }
76
-
77
- .w300 {
78
- font-weight: 300;
79
- }
80
-
81
- .w400 {
82
- font-weight: 400;
83
- }
84
-
85
- .w500 {
86
- font-weight: 500;
87
- }
88
-
89
- .w700 {
90
- font-weight: 700;
91
- }
92
-
93
- .w900 {
94
- font-weight: 900;
95
- }
96
-
97
- .section-title {
98
- margin-top: 50px;
99
- font-size: clamp(1.8rem, 4vw, 4rem);
100
- }
101
-
102
- .section-bg {
103
- padding: 0 30px 80px;
104
- }
105
-
106
- .section-bg:nth-child(even) {
107
- background-color: #f0f0f0;
108
- }
109
-
110
- section {
111
- position: relative;
112
- overflow: hidden;
113
- max-width: 800px;
114
- margin: 0 auto;
115
- }
116
-
117
- section h3 {
118
- border-top: 1px solid #d2d2d2;
119
- padding: 50px 0 0;
120
- margin: 50px 0 30px;
121
- }
122
-
123
- section p {
124
- margin: 0;
125
- }
126
-
127
- section p + p {
128
- margin-top: 20px;
129
- }
130
-
131
- .demo * {
132
- font-variation-settings: 'wght' var(--font-weight);
133
- }
134
-
135
- .controls {
136
- font-size: clamp(0.9rem, 1.5vw, 1.2rem);
137
- margin-top: 30px;
138
- padding: 15px;
139
- }
140
-
141
- input[type='range'] {
142
- background-color: transparent;
143
- }
144
-
145
- .controls--bg {
146
- background-color: #f0f0f0;
147
- }
148
-
149
- .section-bg:nth-child(even) .controls--bg {
150
- background-color: #fff;
151
- }
152
- </style>
153
- </head>
154
- <body>
155
- <header id="header">
156
- <div class="vf-header demo">
157
- <h1 class="RedHatDisplay">Red Hat Font Demo</h1>
158
- </div>
159
- <div class="controls range-slider">
160
- <label class="RedHatMono" for="vf-header">Adjust Weight: </label>
161
- <input
162
- type="range"
163
- id="vf-header"
164
- name="range-slider"
165
- value="700"
166
- class="controls--slider"
167
- min="300"
168
- max="900"
169
- />
170
- </div>
171
- </header>
172
-
173
- <main id="main">
174
- <div class="section-bg">
175
- <section>
176
- <h2 class="section-title RedHatDisplay w700">Red Hat Display</h2>
177
-
178
- <h3 class="RedHatDisplay w200">Red Hat Display Light</h3>
179
- <p class="RedHatDisplay w200">
180
- The quick brown fox jumps over the lazy dog.
181
- </p>
182
- <p class="RedHatDisplay w200">
183
- <em>The quick brown fox jumps over the lazy dog.</em>
184
- </p>
185
-
186
- <h3 class="RedHatDisplay w300">Red Hat Display Regular</h3>
187
- <p class="RedHatDisplay w300">
188
- The quick brown fox jumps over the lazy dog.
189
- </p>
190
- <p class="RedHatDisplay w300">
191
- <em>The quick brown fox jumps over the lazy dog.</em>
192
- </p>
193
-
194
- <h3 class="RedHatDisplay w400">Red Hat Display Medium</h3>
195
- <p class="RedHatDisplay w400">
196
- The quick brown fox jumps over the lazy dog.
197
- </p>
198
- <p class="RedHatDisplay w400">
199
- <em>The quick brown fox jumps over the lazy dog.</em>
200
- </p>
201
-
202
- <h3 class="RedHatDisplay w700">Red Hat Display Bold</h3>
203
- <p class="RedHatDisplay w700">
204
- The quick brown fox jumps over the lazy dog.
205
- </p>
206
- <p class="RedHatDisplay w700">
207
- <em>The quick brown fox jumps over the lazy dog.</em>
208
- </p>
209
-
210
- <h3 class="RedHatDisplay w900">Red Hat Display Black</h3>
211
- <p class="RedHatDisplay w900">
212
- The quick brown fox jumps over the lazy dog.
213
- </p>
214
- <p class="RedHatDisplay w900">
215
- <em>The quick brown fox jumps over the lazy dog.</em>
216
- </p>
217
-
218
- <div class="demo vf-rh-display RedHatDisplay">
219
- <h3>Red Hat Display Variable Font</h3>
220
- <p>The quick brown fox jumps over the lazy dog.</p>
221
- <p><em>The quick brown fox jumps over the lazy dog.</em></p>
222
- </div>
223
-
224
- <div class="controls controls--bg">
225
- <label class="RedHatMono" for="vf-rh-display"
226
- >Adjust Weight:
227
- </label>
228
- <input
229
- type="range"
230
- id="vf-rh-display"
231
- name="range-slider"
232
- value="500"
233
- class="controls--slider"
234
- min="300"
235
- max="900"
236
- />
237
- </div>
238
- </section>
239
- </div>
240
-
241
- <div class="section-bg">
242
- <section>
243
- <h2 class="section-title RedHatText w500">Red Hat Text</h2>
244
-
245
- <h3 class="RedHatText w300">Red Hat Text Light</h3>
246
- <p class="RedHatText w300">
247
- The quick brown fox jumps over the lazy dog.
248
- </p>
249
- <p class="RedHatText w300">
250
- <em>The quick brown fox jumps over the lazy dog.</em>
251
- </p>
252
-
253
- <h3 class="RedHatText w400">Red Hat Text Regular</h3>
254
- <p class="RedHatText w400">
255
- The quick brown fox jumps over the lazy dog.
256
- </p>
257
- <p class="RedHatText w400">
258
- <em>The quick brown fox jumps over the lazy dog.</em>
259
- </p>
260
-
261
- <h3 class="RedHatText w500">Red Hat Text Medium</h3>
262
- <p class="RedHatText w500">
263
- The quick brown fox jumps over the lazy dog.
264
- </p>
265
- <p class="RedHatText w500">
266
- <em>The quick brown fox jumps over the lazy dog.</em>
267
- </p>
268
-
269
- <h3 class="RedHatText w700">Red Hat Text Bold</h3>
270
- <p class="RedHatText w700">
271
- The quick brown fox jumps over the lazy dog.
272
- </p>
273
- <p class="RedHatText w700">
274
- <em>The quick brown fox jumps over the lazy dog.</em>
275
- </p>
276
-
277
- <div class="demo vf-rh-text RedHatText">
278
- <h3>Red Hat Text Variable Font</h3>
279
- <p>The quick brown fox jumps over the lazy dog.</p>
280
- <p><em>The quick brown fox jumps over the lazy dog.</em></p>
281
- </div>
282
-
283
- <div class="controls controls--bg">
284
- <label class="RedHatMono" for="vf-rh-text">Adjust Weight: </label>
285
- <input
286
- type="range"
287
- id="vf-rh-text"
288
- name="range-slider"
289
- value="500"
290
- class="controls--slider"
291
- min="300"
292
- max="700"
293
- />
294
- </div>
295
- </section>
296
- </div>
297
-
298
- <div class="section-bg">
299
- <section>
300
- <h2 class="section-title RedHatMono w500">Red Hat Mono</h2>
301
-
302
- <h3 class="RedHatMono w300">Red Hat Mono Light</h3>
303
- <p class="RedHatMono w300">
304
- The quick brown fox jumps over the lazy dog.
305
- </p>
306
- <p class="RedHatMono w300">
307
- <em>The quick brown fox jumps over the lazy dog.</em>
308
- </p>
309
-
310
- <h3 class="RedHatMono w400">Red Hat Mono Regular</h3>
311
- <p class="RedHatMono w400">
312
- The quick brown fox jumps over the lazy dog.
313
- </p>
314
- <p class="RedHatMono w400">
315
- <em>The quick brown fox jumps over the lazy dog.</em>
316
- </p>
317
-
318
- <h3 class="RedHatMono w500">Red Hat Mono Medium</h3>
319
- <p class="RedHatMono w500">
320
- The quick brown fox jumps over the lazy dog.
321
- </p>
322
- <p class="RedHatMono w500">
323
- <em>The quick brown fox jumps over the lazy dog.</em>
324
- </p>
325
-
326
- <h3 class="RedHatMono w700">Red Hat Mono Bold</h3>
327
- <p class="RedHatMono w700">
328
- The quick brown fox jumps over the lazy dog.
329
- </p>
330
- <p class="RedHatMono w700">
331
- <em>The quick brown fox jumps over the lazy dog.</em>
332
- </p>
333
-
334
- <div class="demo vf-rh-mono RedHatMono">
335
- <h3>Red Hat Mono Variable Font</h3>
336
- <p>The quick brown fox jumps over the lazy dog.</p>
337
- <p><em>The quick brown fox jumps over the lazy dog.</em></p>
338
- </div>
339
-
340
- <div class="controls controls--bg">
341
- <label class="RedHatMono" for="vf-rh-mono">Adjust Weight: </label>
342
- <input
343
- type="range"
344
- id="vf-rh-mono"
345
- name="range-slider"
346
- value="500"
347
- class="controls--slider"
348
- min="300"
349
- max="700"
350
- />
351
- </div>
352
- </section>
353
- </div>
354
- </main>
355
-
356
- <script>
357
- // Find all range inputs and wire them up so they automatically change
358
- // the font weight.
359
- const inputs = document.querySelectorAll('input[type="range"]');
360
-
361
- // listen for changes
362
- inputs.forEach(input => input.addEventListener('change', handleUpdate));
363
- inputs.forEach(input =>
364
- input.addEventListener('mousemove', handleUpdate),
365
- );
366
-
367
- function handleUpdate(e) {
368
- document
369
- .querySelector(`.${this.id}`)
370
- .style.setProperty('--font-weight', this.value);
371
- }
372
- </script>
373
- </body>
374
- </html>