murb_design_system 0.1.0 → 0.2.0

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -0
  3. data/CHANGELOG.md +23 -1
  4. data/Gemfile +1 -0
  5. data/Gemfile.lock +61 -20
  6. data/README.md +16 -6
  7. data/_navigation.html.erb +15 -0
  8. data/basis.html.erb +340 -0
  9. data/bin/build +41 -0
  10. data/bin/watch +25 -0
  11. data/blocks.html.erb +161 -0
  12. data/dist/.gitkeep +0 -0
  13. data/dist/GLOBE---1850-2024-MO.png +0 -0
  14. data/doc/calculations.ods +0 -0
  15. data/html2canvas.min.js +20 -0
  16. data/index.html.erb +127 -0
  17. data/layout.html.erb +84 -0
  18. data/lib/murb_design_system/version.rb +1 -1
  19. data/navigation.html.erb +80 -0
  20. data/print.html.erb +76 -0
  21. data/promo.html.erb +247 -0
  22. data/vendor/assets/stylesheets/article.scss +115 -0
  23. data/vendor/assets/stylesheets/buttons.scss +64 -35
  24. data/vendor/assets/stylesheets/cards.scss +4 -8
  25. data/vendor/assets/stylesheets/devise.scss +1 -0
  26. data/vendor/assets/stylesheets/forms.scss +93 -15
  27. data/vendor/assets/stylesheets/grid.scss +78 -0
  28. data/vendor/assets/stylesheets/html.scss +325 -13
  29. data/vendor/assets/stylesheets/invoice.scss +10 -2
  30. data/vendor/assets/stylesheets/list-variants.scss +83 -0
  31. data/vendor/assets/stylesheets/meta.scss +30 -0
  32. data/vendor/assets/stylesheets/microformats.scss +39 -0
  33. data/vendor/assets/stylesheets/navigation.scss +75 -7
  34. data/vendor/assets/stylesheets/notice.scss +63 -5
  35. data/vendor/assets/stylesheets/print.scss +53 -5
  36. data/vendor/assets/stylesheets/tables.scss +39 -1
  37. data/vendor/assets/stylesheets/utils.scss +54 -5
  38. data/vendor/assets/stylesheets/variables.scss +55 -13
  39. data/vendor/assets/stylesheets/works.scss +3 -3
  40. metadata +52 -8
  41. data/vendor/assets/stylesheets/customers.scss +0 -3
@@ -1,4 +1,26 @@
1
- @import 'variables';
1
+ @import "variables";
2
+
3
+ :root {
4
+ --step--2: clamp(0.778rem, 0.596rem + 0.415vw, 0.875rem);
5
+ --step--1: clamp(0.882rem, 0.675rem + 0.47vw, 0.992rem);
6
+ --step-0: clamp(1rem, 0.766rem + 0.533vw, 1.125rem);
7
+ --step-1: clamp(1.134rem, 0.868rem + 0.605vw, 1.275rem);
8
+ --step-2: clamp(1.285rem, 0.984rem + 0.685vw, 1.446rem);
9
+ --step-3: clamp(1.457rem, 1.115rem + 0.777vw, 1.639rem);
10
+ --step-4: clamp(1.651rem, 1.264rem + 0.881vw, 1.858rem);
11
+ --step-5: clamp(1.872rem, 1.433rem + 0.998vw, 2.106rem);
12
+ --step-6: clamp(2.122rem, 1.625rem + 1.132vw, 2.387rem);
13
+
14
+ --root-step--2: var(--step--2);
15
+ --root-step--1: var(--step--1);
16
+ --root-step-0: var(--step-0);
17
+ --root-step-1: var(--step-1);
18
+ --root-step-2: var(--step-2);
19
+ --root-step-3: var(--step-3);
20
+ --root-step-4: var(--step-4);
21
+ --root-step-5: var(--step-5);
22
+ --root-step-6: var(--step-6);
23
+ }
2
24
 
3
25
  * {
4
26
  box-sizing: border-box;
@@ -6,16 +28,61 @@
6
28
 
7
29
  html {
8
30
  font-family: $fontFamily;
9
- font-size: 18px;
31
+ font-size: 16px;
10
32
  line-height: $lineHeight;
11
- color: $offBlack;
33
+ color: $textColor;
34
+ background: $backgroundColor;
35
+ accent-color: $primaryColor;
36
+ caret-color: $primaryColor;
37
+ }
38
+
39
+ @media (prefers-color-scheme: dark) {
40
+ html {
41
+ color: $nightTextColor;
42
+ background: $nightBackgroundColor;
43
+ }
44
+ }
45
+
46
+ ::selection {
47
+ background: $primaryColor;
48
+ color: #fff;
12
49
  }
13
50
 
14
- h1, h2 {
15
- // font-weight: 500;
51
+ *:focus {
52
+ outline: 2px solid $primaryColor;
16
53
  }
17
54
 
55
+ body {
56
+ font-size: var(--step-0);
57
+ }
58
+
59
+ h1 {
60
+ font-size: var(--step-5);
61
+ }
18
62
 
63
+ h2 {
64
+ font-size: var(--step-4);
65
+ }
66
+
67
+ h3 {
68
+ font-size: var(--step-3);
69
+ }
70
+
71
+ h4 {
72
+ font-size: var(--step-2);
73
+ }
74
+
75
+ h5 {
76
+ font-size: var(--step-1);
77
+ }
78
+
79
+ h6 {
80
+ font-size: inherit;
81
+ }
82
+
83
+ p {
84
+ font-size: inherit;
85
+ }
19
86
 
20
87
  hr {
21
88
  border: 0 none;
@@ -25,38 +92,203 @@ hr {
25
92
  margin: 0.5em 0;
26
93
  }
27
94
 
95
+ blockquote {
96
+ color: $textColor;
97
+ font-size: var(--step-1);
98
+ padding: $margin / 2 $margin;
99
+ background: $backgroundColor;
100
+ border-radius: $borderRadius;
101
+ }
102
+ blockquote blockquote {
103
+ color: $textColor;
104
+ font-size: var(--step-0);
105
+ background: $mainBackgroundColor;
106
+ }
107
+
108
+ @media (prefers-color-scheme: dark) {
109
+ blockquote {
110
+ color: $nightTextColor;
111
+ background: $nightBackgroundColor;
112
+ }
113
+ blockquote blockquote {
114
+ color: $nightTextColor;
115
+ background: $nightMainBackgroundColor;
116
+ }
117
+ }
118
+
119
+ section section,
120
+ section:not(section),
121
+ article {
122
+ break-inside: avoid;
123
+ }
124
+
125
+ blockquote::before {
126
+ content: open-quote;
127
+ position: absolute;
128
+ margin-left: calc(-1 * var(--step-2));
129
+ margin-top: calc(-1 * var(--step-2));
130
+ font-size: var(--step-4);
131
+ display: block;
132
+ }
133
+
134
+ blockquote::after {
135
+ content: close-quote;
136
+ visibility: hidden;
137
+ position: absolute;
138
+ }
139
+
140
+ figure:has(> blockquote) {
141
+ overflow: auto;
142
+
143
+ figcaption {
144
+ margin-top: 0;
145
+ float: right;
146
+ &::before {
147
+ content: "— ";
148
+ }
149
+ font-size: var(--step-0);
150
+ }
151
+ }
28
152
 
29
153
  a {
30
154
  color: $selectableColor;
155
+
31
156
  &:hover {
32
157
  color: $selectableColorHover;
33
158
  }
34
159
  }
35
160
 
36
- body {
37
- background: #eee;
161
+ @media (prefers-color-scheme: dark) {
162
+ a {
163
+ color: $nightSelectableColor;
164
+
165
+ &:hover {
166
+ color: $nightSelectableColorHover;
167
+ }
168
+ }
169
+ }
170
+
171
+ h1,
172
+ h2,
173
+ h3,
174
+ h4,
175
+ h5,
176
+ h6 {
177
+ & > a {
178
+ color: inherit;
179
+ }
38
180
  }
39
181
 
40
182
  header {
41
183
  position: relative;
42
184
  }
185
+
186
+ header *:first-child {
187
+ margin-top: 0;
188
+ }
189
+
43
190
  main {
44
- margin: 1em auto;
191
+ color: $textColor;
192
+ margin: $margin auto;
45
193
  background: #fefefe;
46
194
  max-width: $mainWidth;
47
- padding: 1em;
48
- border-radius: 1em;
195
+ padding: $padding;
196
+ border-radius: $borderRadius;
49
197
  box-sizing: content-box;
198
+ position: relative;
199
+ }
200
+
201
+ @media (prefers-color-scheme: dark) {
202
+ main {
203
+ background: $nightMainBackgroundColor;
204
+ color: $nightTextColor;
205
+ }
206
+ }
207
+
208
+ body > footer {
209
+ margin: $margin auto;
210
+ max-width: $mainWidth;
211
+ padding: $padding;
212
+ border-radius: $borderRadius;
213
+ box-sizing: content-box;
214
+ position: relative;
50
215
  }
51
216
 
52
- main > h1:first-child, main > h2:first-child, main > nav + h1, main > nav + h2 {
217
+ main footer {
218
+ border-top: 1px solid $borderColor;
219
+ clear: both;
220
+ display: block;
221
+ margin: $margin 0 0;
222
+ padding: $padding 0 0;
223
+ }
224
+
225
+ main:not(.expand):has(> article:first-child h1),
226
+ main:not(.expand):has(article.promo) {
227
+ max-width: $mainWidth / 2;
228
+ }
229
+
230
+ .u-columns main:has(> article:first-child h1) {
231
+ max-width: inherit;
232
+ }
233
+
234
+ h1 sub {
235
+ font-weight: normal;
236
+ }
237
+
238
+ aside {
239
+ padding: 1em;
240
+ }
241
+
242
+ main > h1:first-child,
243
+ main > h2:first-child,
244
+ main > h3:first-child,
245
+ main > nav + h1,
246
+ main > nav + h2,
247
+ main > nav + h3,
248
+ aside > h1:first-child,
249
+ aside > h2:first-child,
250
+ aside > h3:first-child,
251
+ aside > nav + h1,
252
+ aside > nav + h2,
253
+ aside > nav + h3 {
53
254
  margin-top: 0;
54
255
  }
55
256
 
257
+ main > aside,
258
+ main > section > aside {
259
+ color: $textColor;
260
+ background: $backgroundColor;
261
+ border-radius: $borderRadius;
262
+ -webkit-print-color-adjust: exact !important;
263
+ print-color-adjust: exact !important;
264
+
265
+ *:last-child {
266
+ margin-bottom: 0;
267
+ }
268
+ margin-top: $margin / 2;
269
+ margin-bottom: $margin;
270
+ }
271
+
272
+ @media (prefers-color-scheme: dark) {
273
+ main > aside,
274
+ main > section > aside {
275
+ background: $nightBackgroundColor;
276
+ color: $nightTextColor;
277
+ }
278
+ }
279
+
280
+ section:has(section) {
281
+ border-top: $borderColor 1px solid;
282
+ margin: $margin 0;
283
+ }
284
+
56
285
  table {
57
286
  width: 100%;
58
287
  margin-bottom: 1em;
59
- th { text-align: left;}
288
+
289
+ th {
290
+ text-align: left;
291
+ }
60
292
  }
61
293
 
62
294
  img {
@@ -65,8 +297,57 @@ img {
65
297
  max-height: 20cm;
66
298
  }
67
299
 
300
+ figure {
301
+ margin: $margin 0;
302
+ img {
303
+ display: block;
304
+ }
305
+
306
+ &.standout {
307
+ border: calc(#{$padding} / 4) $white solid;
308
+ box-shadow: $boxShadow;
309
+ width: calc(100% + (#{$padding} / 2));
310
+ margin-left: calc(-#{$padding} / 4);
311
+ }
312
+ }
313
+
314
+ @media (prefers-color-scheme: dark) {
315
+ figure {
316
+ &.standout {
317
+ box-shadow: $nightBoxShadow;
318
+ }
319
+ }
320
+ }
321
+
322
+ caption,
323
+ figcaption {
324
+ display: block;
325
+ text-align: center;
326
+ color: $darkGrey;
327
+ }
328
+
329
+ @media (prefers-color-scheme: dark) {
330
+ caption,
331
+ figcaption {
332
+ color: $grey;
333
+ }
334
+ }
335
+
336
+ p {
337
+ margin-top: 0;
338
+ }
339
+
340
+ p:last-child {
341
+ margin-bottom: 0;
342
+ }
343
+
344
+ p + p {
345
+ margin-top: 1em;
346
+ }
347
+
68
348
  address {
69
349
  font-style: normal;
350
+
70
351
  p {
71
352
  margin: 0;
72
353
  }
@@ -74,4 +355,35 @@ address {
74
355
 
75
356
  dl dt {
76
357
  font-weight: bold;
77
- }
358
+ }
359
+
360
+ code {
361
+ background: $darkGrey;
362
+ color: $offWhite;
363
+ border-radius: $borderRadius/4;
364
+ padding: 0 $padding/4;
365
+ }
366
+
367
+ pre {
368
+ overflow: scroll;
369
+ }
370
+
371
+ pre > code {
372
+ display: block;
373
+ border-radius: $borderRadius;
374
+ padding: $padding;
375
+ overflow: scroll;
376
+ }
377
+
378
+ // assuming video for now
379
+ iframe {
380
+ width: 100%;
381
+ aspect-ratio: 16 / 9;
382
+ height: auto;
383
+ }
384
+
385
+ * {
386
+ transition-timing-function: ease-in-out;
387
+ transition-duration: 0.15s;
388
+ transition-property: margin, color, transform, box-shadow;
389
+ }
@@ -1,8 +1,16 @@
1
+ @import "variables";
2
+
1
3
  .preview .invoice {
2
- box-shadow: 0 0 1em rgba(0,0,0,0.1);
4
+ box-shadow: $boxShadow;
3
5
  padding: 1.5em;
4
6
  }
5
7
 
8
+ @media (prefers-color-scheme: dark) {
9
+ .preview .invoice {
10
+ box-shadow: $nightBoxShadow;
11
+ }
12
+ }
13
+
6
14
  .invoice {
7
15
  max-width: 21cm;
8
- }
16
+ }
@@ -0,0 +1,83 @@
1
+ @import "variables";
2
+
3
+ dl {
4
+ &.no-inset {
5
+ dd {
6
+ margin-left: 0;
7
+ }
8
+
9
+ dd + dt {
10
+ margin-top: 0.5em;
11
+ }
12
+ }
13
+
14
+ &.inline {
15
+ dd {
16
+ display: inline;
17
+ margin-left: 0;
18
+ }
19
+
20
+ dt {
21
+ display: inline;
22
+ }
23
+
24
+ dd + dt::before {
25
+ content: " ";
26
+ display: block;
27
+ margin-top: 0.5em;
28
+ }
29
+ }
30
+ }
31
+
32
+ ul.labels {
33
+ display: block;
34
+ margin: $margin 0;
35
+ padding: 0;
36
+ }
37
+
38
+ ul.labels li,
39
+ .label {
40
+ list-style: none;
41
+ display: inline-block;
42
+ background: $lightGrey;
43
+ color: $offBlack;
44
+ border-radius: $borderRadius / 2;
45
+ padding: 0 $margin / 2;
46
+
47
+ -webkit-print-color-adjust: exact !important;
48
+ print-color-adjust: exact !important;
49
+
50
+ &.primary {
51
+ color: $offBlack;
52
+ background: $primaryColor;
53
+ }
54
+ }
55
+
56
+ ul.labels li {
57
+ margin: 0;
58
+ }
59
+
60
+ ul.labels li:has(> a),
61
+ .label:has(> a) {
62
+ padding: 0;
63
+
64
+ &:hover,
65
+ &:focus {
66
+ color: $offBlack;
67
+ background: $grey;
68
+ }
69
+
70
+ a {
71
+ padding: 0 $margin / 2;
72
+ color: darkGreen;
73
+ display: inline-block;
74
+ }
75
+ }
76
+
77
+ ul.labels li + li {
78
+ margin-left: $margin / 2;
79
+ }
80
+
81
+ .label {
82
+ margin: 0 $margin / 8;
83
+ }
@@ -0,0 +1,30 @@
1
+ @import "variables";
2
+
3
+ .meta,
4
+ form .hint,
5
+ form span.error,
6
+ form div.error {
7
+ --step--1: var(--root-step--2);
8
+ --step-0: var(--root-step--1);
9
+ --step-1: var(--root-step-0);
10
+ --step-2: var(--root-step-1);
11
+ --step-3: var(--root-step-2);
12
+ --step-4: var(--root-step-3);
13
+ --step-5: var(--root-step-4);
14
+ --step-6: var(--root-step-5);
15
+
16
+ padding: 0;
17
+ }
18
+
19
+ .meta,
20
+ form .hint {
21
+ opacity: $metaOpacity;
22
+ }
23
+
24
+ h1,
25
+ h2,
26
+ h3 {
27
+ &:has(+ .meta) {
28
+ margin-bottom: 0;
29
+ }
30
+ }
@@ -0,0 +1,39 @@
1
+ .h-event {
2
+
3
+
4
+ }
5
+
6
+ .h-event {
7
+ h2,
8
+ h3,
9
+ h4,
10
+ h5 {
11
+ margin: 0
12
+ }
13
+
14
+ display: grid;
15
+ grid-template-columns: repeat(5, 1fr);
16
+ grid-template-areas:
17
+ "title title title org date"
18
+ "description description description description description";
19
+
20
+ .dt-range {
21
+ text-align: right;
22
+ }
23
+ }
24
+
25
+ h3 {
26
+ grid-area: title;
27
+ }
28
+
29
+ .dt-start+.dt-end::before {
30
+ content: " - "
31
+ }
32
+
33
+ .p-summary {
34
+ grid-area: description
35
+ }
36
+
37
+ p:last-child {
38
+ margin-bottom: 0
39
+ }
@@ -1,14 +1,49 @@
1
- @import 'variables';
1
+ @import "variables";
2
2
 
3
3
  nav {
4
- width: $mainWidth;
4
+ box-sizing: content-box;
5
5
  margin: auto;
6
+ padding: 0.5em 1em;
6
7
  display: flex;
7
8
  align-items: center;
8
9
  justify-content: space-between;
9
- max-width: 100%;
10
+ max-width: $mainWidth;
11
+ position: relative;
12
+
13
+ &.sticky {
14
+ top: 0;
15
+ z-index: 1000;
16
+ color: $textColor;
17
+ background: rgba($backgroundColor, 0.85);
18
+ -webkit-backdrop-filter: blur(2px);
19
+ backdrop-filter: blur(2px);
20
+ position: sticky;
21
+ }
22
+ }
23
+
24
+ main > nav {
25
+ border-radius: $borderRadius/2;
26
+ color: $textColor;
27
+ background: $backgroundColor;
28
+ margin: 1em 0;
29
+ }
30
+
31
+ @media (prefers-color-scheme: dark) {
32
+ nav {
33
+ &.sticky {
34
+ color: $nightTextColor;
35
+ background: rgba($nightBackgroundColor, 0.85);
36
+ }
37
+ }
38
+
39
+ main > nav {
40
+ background: $nightBackgroundColor;
41
+ color: $nightTextColor;
42
+ }
10
43
  }
11
- nav > ul, nav > ul ul {
44
+
45
+ nav > ul,
46
+ nav > ul ul {
12
47
  list-style: none;
13
48
  margin: 0;
14
49
  padding: 0;
@@ -17,23 +52,56 @@ nav > ul, nav > ul ul {
17
52
  display: inline-block;
18
53
  }
19
54
 
55
+ a {
56
+ display: inline-block;
57
+ }
58
+
20
59
  li + li {
21
60
  margin-left: 1em;
22
61
  }
62
+
63
+ li:has(.button.secondary) + li:has(.button.secondary) {
64
+ margin-left: 0.25em;
65
+ }
23
66
  }
24
67
 
25
- nav[role="actions"] {
68
+ nav.actions,
69
+ nav[role="actions"], // note, provided as fallback: this is not valid aria
70
+ nav[role="user-actions"] {
26
71
  display: block;
27
72
  float: right;
28
73
  width: fit-content;
74
+ margin: 0;
75
+
29
76
  ul {
30
77
  display: block;
31
78
  float: right;
32
79
  }
33
80
  }
34
81
 
82
+ nav a {
83
+ &:hover,
84
+ &:focus {
85
+ transform: $elementScaleUp;
86
+ }
87
+ }
88
+
35
89
  nav a.active {
36
- color: #000;
90
+ color: $textColor;
37
91
  font-weight: bold;
38
92
  text-decoration: none;
39
- }
93
+ }
94
+
95
+ @media (prefers-color-scheme: dark) {
96
+ nav a.active {
97
+ color: $nightTextColor;
98
+ }
99
+ }
100
+
101
+ [id]::before {
102
+ content: "";
103
+ display: block;
104
+ height: 2em;
105
+ margin-top: -2em;
106
+ visibility: hidden;
107
+ }