@openkfw/design-tokens 0.5.2 → 0.5.3

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.
@@ -0,0 +1,8 @@
1
+ /* Custom Media Queries generated from KfW Design Tokens v0.5.1 */
2
+
3
+ /* See: https://www.w3.org/TR/mediaqueries-5/#at-ruledef-custom-media */
4
+
5
+ @custom-media --kfw-breakpoint-mobile (min-width: 600px);
6
+ @custom-media --kfw-breakpoint-tablet (min-width: 840px);
7
+ @custom-media --kfw-breakpoint-desktop (min-width: 960px);
8
+ @custom-media --kfw-breakpoint-desktop-large (min-width: 1280px);
@@ -0,0 +1,310 @@
1
+ /* stylelint-disable */
2
+
3
+ /**
4
+ * uaplus.css version 0.2.1
5
+ */
6
+
7
+ /**
8
+ * Different box model
9
+ *
10
+ * We use the traditional box model, where the padding and border
11
+ * of the element is drawn inside and not outside the specified
12
+ * width and height. That makes combining relative and absolute
13
+ * units in properties like <code>inline-size</code> and
14
+ * <code>block-size</code> easier.
15
+ *
16
+ * See https://en.wikipedia.org/wiki/CSS_box_model
17
+ */
18
+ *,
19
+ *::after,
20
+ *::before {
21
+ box-sizing: border-box;
22
+ }
23
+
24
+ /**
25
+ * Improve focus styles
26
+ *
27
+ * Add spacing between content and its focus outline.
28
+ */
29
+ :focus-visible {
30
+ outline-offset: 3px;
31
+ }
32
+
33
+ /**
34
+ * Disable text size adjustment
35
+ *
36
+ * To improve readability on non-mobile optimized websites, browsers
37
+ * like mobile Safari increase the default font size when you switch
38
+ * a website from portrait to landscape. We don't want that for our
39
+ * optimized sites.
40
+ *
41
+ * See https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/
42
+ */
43
+ :where(html) {
44
+ -webkit-text-size-adjust: none;
45
+ text-size-adjust: none;
46
+ }
47
+
48
+ /**
49
+ * Increase line height
50
+ *
51
+ * Long paragraphs are easier to read if the line height is higher.
52
+ */
53
+ :where(html) {
54
+ line-height: 1.5;
55
+ }
56
+
57
+ /**
58
+ * Add scrollbar gutter
59
+ *
60
+ * Prevent the page from “jumping” when switching from a long to a short page.
61
+ *
62
+ */
63
+ :where(html) {
64
+ scrollbar-gutter: stable;
65
+ }
66
+
67
+ /**
68
+ * Remove UA styles for h1s nested in sectioning content
69
+ *
70
+ * Nesting h1s in section, articles, etc., shouldn't influence the
71
+ * styling of the heading since nesting doesn't influence
72
+ * semantics either.
73
+ *
74
+ * See https://github.com/whatwg/html/issues/7867#issuecomment-2632395167
75
+ * See https://github.com/whatwg/html/pull/11102
76
+ * See https://html.spec.whatwg.org/#sections-and-headings
77
+ */
78
+ :where(h1) {
79
+ font-size: 2em;
80
+ margin-block: 0.67em;
81
+ }
82
+
83
+ /**
84
+ * Improve abbreviations with titles
85
+ *
86
+ * The abbr element with the title isn't helpful regarding
87
+ * accessibility because support is inconsistent, and it's only
88
+ * accessible to some users. Still, it's commonly used.
89
+ * This rule shows a dotted underline on abbreviations in all
90
+ * browsers (there's a bug in Safari) and changes the cursor.
91
+ *
92
+ * See https://adrianroselli.com/2024/01/using-abbr-element-with-title-attribute.html
93
+ */
94
+ :where(abbr[title]) {
95
+ cursor: help;
96
+ text-decoration-line: underline;
97
+ text-decoration-style: dotted;
98
+ }
99
+
100
+ /**
101
+ * Optimize mark element in Forced Colors Mode
102
+ *
103
+ * The colors of the mark element don't change in Forced Colors Mode,
104
+ * which can be problematic. Use system colors instead.
105
+ *
106
+ * See https://adrianroselli.com/2017/12/tweaking-text-level-styles.html#MarkWHCM
107
+ */
108
+ @media (forced-colors: active) {
109
+ mark {
110
+ color: HighlightText;
111
+ background-color: Highlight;
112
+ }
113
+ }
114
+
115
+ /**
116
+ * Announce del, ins, and s to screen readers
117
+ *
118
+ * With the exception of NVDA (2024.4.2), which announces "deletion",
119
+ * none of the common screen readers announces the <s> element.
120
+ * Voice Over on macOS and iOS and Narrator don't announce
121
+ * <ins> and <del>. Usually, screen readers not announcing text-level
122
+ * semantics is something we just accept, but devs using elements
123
+ * like <s> without knowing that they may not convey semantics is a
124
+ * common issue. We announce the start and end of stricken, inserted,
125
+ * and deleted content with pseudo-elements. For languages other
126
+ * than English, you should provide translations, e.g. :lang(de)
127
+ * :where(s::before) { content: "Durchgestrichener Text Beginn "; }
128
+ *
129
+ * See https://adrianroselli.com/2017/12/tweaking-text-level-styles.html
130
+ */
131
+ :where(del, ins, s)::before,
132
+ :where(del, ins, s)::after {
133
+ clip-path: inset(100%);
134
+ clip: rect(1px, 1px, 1px, 1px);
135
+ height: 1px;
136
+ width: 1px;
137
+ overflow: hidden;
138
+ position: absolute;
139
+ white-space: nowrap;
140
+ content: "test";
141
+ }
142
+
143
+ :where(s)::before {
144
+ content: "stricken text start ";
145
+ }
146
+
147
+ :where(s)::after {
148
+ content: " stricken text end";
149
+ }
150
+
151
+ :where(del)::before {
152
+ content: "deletion start ";
153
+ }
154
+
155
+ :where(del)::after {
156
+ content: " deletion end";
157
+ }
158
+
159
+ :where(ins)::before {
160
+ content: "insertion start ";
161
+ }
162
+
163
+ :where(ins)::after {
164
+ content: " insertion end";
165
+ }
166
+
167
+ /**
168
+ * Avoid overflow caused by embedded content
169
+ *
170
+ * Ensure that embedded content (audio, video, images, etc.)
171
+ * doesn't overflow its container.
172
+ */
173
+ :where(audio, iframe, img, svg, video) {
174
+ max-block-size: 100%;
175
+ max-inline-size: 100%;
176
+ }
177
+
178
+ /**
179
+ * Prevent fieldsets from causing overflow
180
+ *
181
+ * Reset the default `min-inline-size: min-content` to prevent
182
+ * children from stretching fieldsets
183
+ *
184
+ * See https://github.com/twbs/bootstrap/issues/12359
185
+ * and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
186
+ */
187
+ :where(fieldset) {
188
+ min-inline-size: 0;
189
+ }
190
+
191
+ /**
192
+ * Turn labels into block elements
193
+ *
194
+ * Labels for inputs, selects, and textarea should be block
195
+ * elements.
196
+ */
197
+ :where(label):has(+ :where(textarea, input, select)) {
198
+ display: block;
199
+ }
200
+
201
+ /**
202
+ * Increase the block-size of textareas
203
+ *
204
+ * The default height of textareas is small. We increase it a bit.
205
+ */
206
+ :where(textarea:not([rows])) {
207
+ min-block-size: 6em;
208
+ }
209
+
210
+ /**
211
+ * Inherit font styling in form elements
212
+ *
213
+ * buttons, inputs, selects, and textarea should have the same font
214
+ * family and size as the rest of the page.
215
+ */
216
+ :where(button, input, select, textarea) {
217
+ font-family: inherit;
218
+ font-size: inherit;
219
+ }
220
+
221
+ /**
222
+ * Normalize search input styles
223
+ *
224
+ * Remove the rounded corners of search inputs on macOS and IOS
225
+ * and normalize the background color
226
+ */
227
+ :where([type="search"]) {
228
+ -webkit-appearance: textfield;
229
+ }
230
+
231
+ /* iOS only */
232
+ @supports (-webkit-touch-callout: none) {
233
+ :where([type="search"]) {
234
+ border: 1px solid -apple-system-secondary-label;
235
+ background-color: canvas;
236
+ }
237
+ }
238
+
239
+ /**
240
+ * Maintain direction in some input types
241
+ *
242
+ * Some input types should remain left-aligned in right-to-left
243
+ * languages,but only if the value isn't empty because the
244
+ * placeholder should be right-aligned.
245
+ *
246
+ * See https://rtlstyling.com/posts/rtl-styling#form-inputs
247
+ */
248
+ :where([type="tel"], [type="url"], [type="email"], [type="number"]):not(:placeholder-shown) {
249
+ direction: ltr;
250
+ }
251
+
252
+ /**
253
+ * Improve table styling
254
+ *
255
+ * With the default styling, tables are hard to scan. These rules
256
+ * add padding and collapsed borders.
257
+ */
258
+ :where(table) {
259
+ border-collapse: collapse;
260
+ border: 1px solid;
261
+ }
262
+
263
+ :where(th, td) {
264
+ border: 1px solid;
265
+ padding: 0.25em 0.5em;
266
+ }
267
+
268
+ /**
269
+ * Fading dialogs
270
+ *
271
+ * Add fade in and fade out transitions for the dialog element
272
+ * and backdrops
273
+ */
274
+ :where(dialog)::backdrop {
275
+ background: oklch(0% 0 0 / 0.3);
276
+ }
277
+
278
+ :where(dialog),
279
+ :where(dialog)::backdrop {
280
+ opacity: 0;
281
+ transition:
282
+ opacity 300ms ease-out,
283
+ display 300ms allow-discrete,
284
+ overlay 300ms allow-discrete;
285
+ }
286
+
287
+ :where(dialog[open]),
288
+ :where(dialog[open])::backdrop {
289
+ opacity: 1;
290
+ }
291
+
292
+ @starting-style {
293
+ :where(dialog[open]),
294
+ :where(dialog[open])::backdrop {
295
+ opacity: 0;
296
+ }
297
+ }
298
+
299
+ /**
300
+ * Increase specificity of [hidden]
301
+ *
302
+ * Make it harder to accidentally unhide elements with the
303
+ * [hidden] attribute while still maintaining the until-found
304
+ * functionality.
305
+ */
306
+ [hidden]:not([hidden="until-found"]) {
307
+ display: none !important;
308
+ }
309
+
310
+ /* stylelint-enable */
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@openkfw/design-tokens",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "The source of truth for KfW-branded digital products.",
5
5
  "files": [
6
+ "README.md",
6
7
  "output",
7
8
  "tokens/tokens.json",
8
9
  "tokens/gen-tokens.dark.json5",
9
- "demo/src/styles/style.css",
10
- "demo/src/styles/vendor/**.css",
10
+ "demo/src/style.css",
11
+ "demo/src/vendor/**.css",
11
12
  "demo/dist/css/style.min.css"
12
13
  ],
13
14
  "scripts": {
@@ -38,13 +39,13 @@
38
39
  "node": ">= 22.0.0"
39
40
  },
40
41
  "devDependencies": {
41
- "@eslint/js": "^9.37.0",
42
+ "@eslint/js": "^9.38.0",
42
43
  "@tsconfig/node22": "^22.0.2",
43
44
  "@types/lodash": "^4.17.20",
44
- "@types/node": "^22",
45
+ "@types/node": "^22.18.10",
45
46
  "concurrently": "^9.2.1",
46
47
  "deep-get-set-ts": "^1.1.2",
47
- "eslint": "^9.37.0",
48
+ "eslint": "^9.38.0",
48
49
  "json5": "^2.2.3",
49
50
  "jsoneditor-cli": "^1.1.0",
50
51
  "lodash": "4.17.21",
@@ -52,7 +53,7 @@
52
53
  "style-dictionary": "^5.1.1",
53
54
  "tsx": "^4.20.6",
54
55
  "typescript": "^5.9.3",
55
- "typescript-eslint": "^8.46.0",
56
- "npm-check-updates": "^19.0.0"
56
+ "typescript-eslint": "^8.46.2",
57
+ "npm-check-updates": "^19.1.1"
57
58
  }
58
59
  }