@helvetia-design/styles 0.0.0-stage → 0.0.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,377 @@
1
+ /* Document
2
+ * ========================================================================== */
3
+
4
+ /**
5
+ * Fix the numeric font variant inheritance in all browsers (opinionated).
6
+ * This makes number characters use a fixed-width font, which is typically desirable for
7
+ * displaying tabular data, such as in a calendar or a stock ticker.
8
+ */
9
+
10
+ * {
11
+ font-variant-numeric: tabular-nums;
12
+ }
13
+
14
+ /**
15
+ * 1. Add border box sizing in all browsers (opinionated).
16
+ * 2. Backgrounds do not repeat by default (opinionated).
17
+ * 3. Masks do not repeat by default (opinionated).
18
+ */
19
+
20
+ *,
21
+ ::before,
22
+ ::after {
23
+ box-sizing: border-box; /* 1 */
24
+ background-repeat: no-repeat; /* 2 */
25
+ mask-repeat: no-repeat; /* 3 */
26
+ }
27
+
28
+ /**
29
+ * 1. Add text decoration inheritance in all browsers (opinionated).
30
+ * 2. Add vertical alignment inheritance in all browsers (opinionated).
31
+ */
32
+
33
+ ::before,
34
+ ::after {
35
+ text-decoration: inherit; /* 1 */
36
+ vertical-align: inherit; /* 2 */
37
+ }
38
+
39
+ /**
40
+ * 1. Use the default cursor in all browsers (opinionated).
41
+ * 2. Change the line height in all browsers (opinionated).
42
+ * 3. Breaks words to prevent overflow in all browsers (opinionated).
43
+ * 4. Use a 4-space tab width in all browsers (opinionated).
44
+ * 5. Remove the grey highlight on links in iOS (opinionated).
45
+ * 6. Prevent adjustments of font size after orientation changes in iOS.
46
+ */
47
+
48
+ :where(:root) {
49
+ cursor: default; /* 1 */
50
+ line-height: 1.5; /* 2 */
51
+ overflow-wrap: break-word; /* 3 */
52
+ -moz-tab-size: 4; /* 4 */
53
+ tab-size: 4; /* 4 */
54
+ -webkit-tap-highlight-color: transparent; /* 5 */
55
+ -webkit-text-size-adjust: 100%; /* 6 */
56
+ text-size-adjust: 100%; /* 6 */
57
+ }
58
+
59
+ /* Sections
60
+ * ========================================================================== */
61
+
62
+ /**
63
+ * Remove the margin in all browsers (opinionated).
64
+ */
65
+
66
+ :where(body) {
67
+ margin: 0;
68
+ }
69
+
70
+ /**
71
+ * Correct the font size and margin on `h1` elements within `section` and
72
+ * `article` contexts in Chrome, Edge, Firefox, and Safari.
73
+ */
74
+
75
+ :where(h1),
76
+ :where(h2),
77
+ :where(h3),
78
+ :where(h4),
79
+ :where(h5) {
80
+ margin: 0;
81
+ }
82
+
83
+ /* Grouping content
84
+ * ========================================================================== */
85
+
86
+ /**
87
+ * Remove the margin on nested lists in Chrome, Edge, and Safari.
88
+ */
89
+
90
+ :where(dl, ol, ul) :where(dl, ol, ul) {
91
+ margin: 0;
92
+ }
93
+
94
+ /**
95
+ * Add the correct box sizing in Firefox.
96
+ */
97
+
98
+ :where(hr) {
99
+ height: 0;
100
+ }
101
+
102
+ /**
103
+ * Remove the list style on navigation lists in all browsers (opinionated).
104
+ */
105
+
106
+ :where(nav) :where(ol, ul) {
107
+ list-style-type: none;
108
+ padding: 0;
109
+ }
110
+
111
+ /**
112
+ * Prevent VoiceOver from ignoring list semantics in Safari (opinionated).
113
+ */
114
+
115
+ :where(nav li)::before {
116
+ content: '\200B';
117
+ float: left;
118
+ }
119
+
120
+ /**
121
+ * 1. Correct the inheritance and scaling of font size in all browsers.
122
+ * 2. Correct the odd `em` font sizing in all browsers.
123
+ * 3. Prevent overflow of the container in all browsers (opinionated).
124
+ */
125
+
126
+ :where(pre) {
127
+ font-family: monospace, monospace; /* 1 */
128
+ font-size: 1em; /* 2 */
129
+ overflow: auto; /* 3 */
130
+ margin: 0;
131
+ }
132
+
133
+ /* Text-level semantics
134
+ * ========================================================================== */
135
+
136
+ /**
137
+ * Add the correct text decoration in Safari.
138
+ */
139
+
140
+ :where(abbr[title]) {
141
+ text-decoration: underline;
142
+ text-decoration: underline dotted;
143
+ }
144
+
145
+ /**
146
+ * Add the correct font weight in Chrome, Edge, and Safari.
147
+ */
148
+
149
+ :where(b, strong) {
150
+ font-weight: bolder;
151
+ }
152
+
153
+ /**
154
+ * 1. Correct the inheritance and scaling of font size in all browsers.
155
+ * 2. Correct the odd `em` font sizing in all browsers.
156
+ */
157
+
158
+ :where(code, kbd, samp) {
159
+ font-family: monospace, monospace; /* 1 */
160
+ font-size: 1em; /* 2 */
161
+ }
162
+
163
+ /**
164
+ * Add the correct font size in all browsers.
165
+ */
166
+
167
+ :where(small) {
168
+ font-size: 80%;
169
+ }
170
+
171
+ /* Embedded content
172
+ * ========================================================================== */
173
+
174
+ /*
175
+ * Change the alignment on media elements in all browsers (opinionated).
176
+ */
177
+
178
+ :where(audio, canvas, iframe, img, svg, video) {
179
+ vertical-align: middle;
180
+ }
181
+
182
+ /**
183
+ * Remove the border on iframes in all browsers (opinionated).
184
+ */
185
+
186
+ :where(iframe) {
187
+ border-style: none;
188
+ }
189
+
190
+ /**
191
+ * Change the fill color to match the text color in all browsers (opinionated).
192
+ */
193
+
194
+ :where(svg:not([fill])) {
195
+ fill: currentColor;
196
+ }
197
+
198
+ /* Tabular data
199
+ * ========================================================================== */
200
+
201
+ /**
202
+ * 1. Collapse border spacing in all browsers (opinionated).
203
+ * 2. Correct table border color in Chrome, Edge, and Safari.
204
+ * 3. Remove text indentation from table contents in Chrome, Edge, and Safari.
205
+ */
206
+
207
+ :where(table) {
208
+ border-collapse: collapse; /* 1 */
209
+ border-color: currentColor; /* 2 */
210
+ text-indent: 0; /* 3 */
211
+ }
212
+
213
+ /* Forms
214
+ * ========================================================================== */
215
+
216
+ /**
217
+ * Remove the margin on controls in Safari.
218
+ */
219
+
220
+ :where(button, input, select) {
221
+ margin: 0;
222
+ }
223
+
224
+ /**
225
+ * Correct the inability to style buttons in iOS and Safari.
226
+ */
227
+
228
+ :where(button, [type='button' i], [type='reset' i], [type='submit' i]) {
229
+ -webkit-appearance: button;
230
+ }
231
+
232
+ /**
233
+ * Change the inconsistent appearance in all browsers (opinionated).
234
+ */
235
+
236
+ :where(fieldset) {
237
+ margin: 0;
238
+ padding: 0;
239
+ border: none;
240
+ }
241
+
242
+ :where(legend) {
243
+ padding: 0;
244
+ float: left;
245
+ width: 100%;
246
+ }
247
+
248
+ /**
249
+ * Add the correct vertical alignment in Chrome, Edge, and Firefox.
250
+ */
251
+
252
+ :where(progress) {
253
+ vertical-align: baseline;
254
+ }
255
+
256
+ /**
257
+ * 1. Remove the margin in Firefox and Safari.
258
+ * 3. Change the resize direction in all browsers (opinionated).
259
+ */
260
+
261
+ :where(textarea) {
262
+ margin: 0; /* 1 */
263
+ resize: vertical; /* 3 */
264
+ }
265
+
266
+ /**
267
+ * 1. Correct the odd appearance in Chrome, Edge, and Safari.
268
+ * 2. Correct the outline style in Safari.
269
+ */
270
+
271
+ :where([type='search' i]) {
272
+ -webkit-appearance: textfield; /* 1 */
273
+ outline-offset: -2px; /* 2 */
274
+ }
275
+
276
+ /**
277
+ * Correct the cursor style of increment and decrement buttons in Safari.
278
+ */
279
+
280
+ ::-webkit-inner-spin-button,
281
+ ::-webkit-outer-spin-button {
282
+ height: auto;
283
+ }
284
+
285
+ /**
286
+ * Correct the text style of placeholders in Chrome, Edge, and Safari.
287
+ */
288
+
289
+ ::-webkit-input-placeholder {
290
+ color: inherit;
291
+ }
292
+
293
+ /**
294
+ * Remove the inner padding in Chrome, Edge, and Safari on macOS.
295
+ */
296
+
297
+ ::-webkit-search-decoration {
298
+ -webkit-appearance: none;
299
+ }
300
+
301
+ /**
302
+ * 1. Correct the inability to style upload buttons in iOS and Safari.
303
+ * 2. Change font properties to `inherit` in Safari.
304
+ */
305
+
306
+ ::-webkit-file-upload-button {
307
+ -webkit-appearance: button; /* 1 */
308
+ font: inherit; /* 2 */
309
+ }
310
+
311
+ /* Interactive
312
+ * ========================================================================== */
313
+
314
+ /*
315
+ * Add the correct styles in Safari.
316
+ */
317
+
318
+ :where(dialog) {
319
+ background-color: white;
320
+ border: solid;
321
+ color: black;
322
+ height: -moz-fit-content;
323
+ height: fit-content;
324
+ left: 0;
325
+ margin: auto;
326
+ padding: 1em;
327
+ position: absolute;
328
+ right: 0;
329
+ width: -moz-fit-content;
330
+ width: fit-content;
331
+ }
332
+
333
+ :where(dialog:not([open])) {
334
+ display: none;
335
+ }
336
+
337
+ /*
338
+ * Add the correct display in Safari.
339
+ */
340
+
341
+ :where(details > summary:first-of-type) {
342
+ display: list-item;
343
+ }
344
+
345
+ /* Accessibility
346
+ * ========================================================================== */
347
+
348
+ /**
349
+ * Change the cursor on busy elements in all browsers (opinionated).
350
+ */
351
+
352
+ :where([aria-busy='true' i]) {
353
+ cursor: progress;
354
+ }
355
+
356
+ /*
357
+ * Change the cursor on disabled, not-editable, or otherwise
358
+ * inoperable elements in all browsers (opinionated).
359
+ */
360
+
361
+ :where([aria-disabled='true' i], [disabled]) {
362
+ cursor: not-allowed;
363
+ }
364
+
365
+ /*
366
+ * Change the display on visually hidden accessible elements
367
+ * in all browsers (opinionated).
368
+ */
369
+
370
+ :where([aria-hidden='false' i][hidden]) {
371
+ display: initial;
372
+ }
373
+
374
+ :where([aria-hidden='false' i][hidden]:not(:focus)) {
375
+ clip: rect(0, 0, 0, 0);
376
+ position: absolute;
377
+ }
@@ -0,0 +1,130 @@
1
+ @use './mixins/_all' as *;
2
+
3
+ html {
4
+ min-width: 300px;
5
+ overflow-x: hidden;
6
+ overflow-y: scroll;
7
+ }
8
+
9
+ // Shared with :host so these resolve when this stylesheet is adopted into a shadow root
10
+ html,
11
+ :host {
12
+ background-color: var(--ds-body-surface);
13
+ font-family: var(--ds-body-font-font-family);
14
+ font-size: var(--ds-body-font-font-size);
15
+ font-weight: var(--ds-body-font-font-weight);
16
+ line-height: var(--ds-body-font-line-height);
17
+
18
+ text-rendering: optimizeLegibility;
19
+ text-size-adjust: 100%;
20
+ -moz-osx-font-smoothing: grayscale;
21
+ -webkit-font-smoothing: antialiased;
22
+ -webkit-tap-highlight-color: transparent;
23
+ -webkit-overflow-scrolling: auto;
24
+ }
25
+
26
+ *:focus {
27
+ -webkit-tap-highlight-color: transparent;
28
+ outline: none;
29
+ -ms-touch-action: manipulation;
30
+ touch-action: manipulation;
31
+ }
32
+
33
+ article,
34
+ aside,
35
+ figure,
36
+ footer,
37
+ header,
38
+ hgroup,
39
+ section {
40
+ display: block;
41
+ }
42
+
43
+ body,
44
+ button,
45
+ input,
46
+ optgroup,
47
+ select,
48
+ textarea {
49
+ font-family: var(--ds-body-font-font-family);
50
+ font-size: var(--ds-body-font-font-size);
51
+ font-weight: var(--ds-body-font-font-weight);
52
+ line-height: var(--ds-body-font-line-height);
53
+ }
54
+
55
+ body {
56
+ color: var(--ds-body-color);
57
+ font-family: var(--ds-body-font-font-family);
58
+ font-size: var(--ds-body-font-font-size);
59
+ font-weight: var(--ds-body-font-font-weight);
60
+ line-height: var(--ds-body-font-line-height);
61
+ -webkit-overflow-scrolling: auto;
62
+ }
63
+
64
+ button {
65
+ color: inherit;
66
+ }
67
+
68
+ ::-moz-selection {
69
+ color: var(--ds-body-selection-color);
70
+ background: var(--ds-body-selection-surface);
71
+ }
72
+
73
+ ::selection {
74
+ color: var(--ds-body-selection-color);
75
+ background: var(--ds-body-selection-surface);
76
+ }
77
+
78
+ p:not(.ds-text, .ds-title, .ds-subtitle, .ds-heading) {
79
+ hyphens: auto;
80
+ margin: 0;
81
+ overflow-wrap: break-word;
82
+ -webkit-font-smoothing: antialiased;
83
+ -moz-osx-font-smoothing: grayscale;
84
+ strong {
85
+ color: currentColor;
86
+ }
87
+ }
88
+
89
+ small {
90
+ font-size: var(--ds-device-text-size-sm);
91
+ }
92
+
93
+ span {
94
+ font-style: inherit;
95
+ font-weight: inherit;
96
+ }
97
+
98
+ b,
99
+ strong {
100
+ color: inherit;
101
+ font-weight: var(--ds-alias-text-weight-bold);
102
+ }
103
+
104
+ img {
105
+ height: auto;
106
+ max-width: 100%;
107
+ }
108
+
109
+ input[type='checkbox'],
110
+ input[type='radio'] {
111
+ vertical-align: baseline;
112
+ }
113
+
114
+ // fieldset {
115
+ // border: none;
116
+ // }
117
+
118
+ .has-sticky-footer {
119
+ min-height: 100vh;
120
+ display: flex;
121
+ flex-direction: column;
122
+ main {
123
+ padding-bottom: 2.5rem;
124
+ }
125
+
126
+ ds-app-footer,
127
+ footer.footer {
128
+ margin-top: auto;
129
+ }
130
+ }
@@ -0,0 +1,2 @@
1
+ // Auto-generated — utilities are compiled by UnoCSS, not Sass.
2
+ // Use the CSS directly: @import '@helvetia-design/styles/css/utilities';
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "@helvetia-design/styles",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.3",
4
+ "description": "UnoCSS utility preset and pre-built CSS bundle for the Helvetia Design System.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/helvetia-design/system.git"
8
+ },
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "homepage": "https://baloise-design-system.vercel.app",
13
+ "security": "https://github.com/helvetia-design/system/security/advisories/new",
14
+ "license": "Apache-2.0",
15
+ "type": "module",
16
+ "exports": {
17
+ ".": {
18
+ "import": "./dist/preset/index.js",
19
+ "require": "./dist/preset/index.cjs"
20
+ },
21
+ "./css/design-system": "./dist/css/design-system.css",
22
+ "./css/design-system.min": "./dist/css/design-system.min.css",
23
+ "./css/design-system.local": "./dist/css/design-system.local.css",
24
+ "./css/design-system.local.min": "./dist/css/design-system.local.min.css",
25
+ "./css/utilities": "./dist/css/utilities.css",
26
+ "./css/utilities.min": "./dist/css/utilities.min.css",
27
+ "./scss/design-system": "./dist/scss/design-system.scss",
28
+ "./scss/mixins": "./dist/scss/mixins.scss",
29
+ "./scss/utilities": "./dist/scss/utilities.scss"
30
+ },
31
+ "files": [
32
+ "dist/",
33
+ "sbom.cdx.json"
34
+ ],
35
+ "dependencies": {
36
+ "@helvetia-design/assets": "0.0.3",
37
+ "@helvetia-design/tokens": "0.0.3"
38
+ },
39
+ "devDependencies": {
40
+ "@helvetia-design/tokens": "0.0.3",
41
+ "autoprefixer": "10.6.1",
42
+ "cssnano": "9.0.5",
43
+ "postcss": "8.5.28",
44
+ "sass": "1.105.1",
45
+ "tsx": "4.23.15",
46
+ "unocss": "66.10.5"
47
+ },
48
+ "scripts": {
49
+ "build": "node --import tsx/esm src/build.ts"
50
+ }
6
51
  }