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
@@ -0,0 +1,115 @@
1
+ @import 'variables';
2
+
3
+ article:has(h1), article.promo {
4
+ --step--2: clamp(.606rem, .464rem + .606vw, .908rem);
5
+ --step--1: clamp(.778rem, .596rem + .778vw, 1.167rem);
6
+ --step-0: clamp(1rem, .766rem + 1vw, 1.5rem);
7
+ --step-1: clamp(1.285rem, .984rem + 1.285vw, 1.928rem);
8
+ --step-2: clamp(1.651rem, 1.264rem + 1.651vw, 2.477rem);
9
+ --step-3: clamp(2.122rem, 1.625rem + 2.122vw, 3.183rem);
10
+ --step-4: clamp(2.727rem, 2.088rem + 2.727vw, 4.09rem);
11
+ --step-5: clamp(3.504rem, 2.682rem + 3.504vw, 5.255rem);
12
+ --step-6: clamp(4.502rem, 3.447rem + 4.502vw, 6.753rem);
13
+
14
+ --article-step--2: var(--step--2);
15
+ --article-step--1: var(--step--1);
16
+ --article-step-0: var(--step-0);
17
+ --article-step-1: var(--step-1);
18
+ --article-step-2: var(--step-2);
19
+ --article-step-3: var(--step-3);
20
+ --article-step-4: var(--step-4);
21
+ --article-step-5: var(--step-5);
22
+ --article-step-6: var(--step-6);
23
+
24
+ h1,h2,h3,h4,h5,h6 {
25
+ font-weight: normal;
26
+ line-height: 1.3333;
27
+ margin: 0 0 0.3333em;
28
+ }
29
+ h1 {
30
+ font-size: var(--step-5);
31
+ text-align: left;
32
+
33
+ small {
34
+ display: inline-block;
35
+ font-size: var(--step-3);
36
+ }
37
+ }
38
+
39
+ h2 {
40
+ font-size: var(--step-3);
41
+ small {
42
+ display: inline-block;
43
+ font-size: var(--step-2);
44
+ }
45
+ }
46
+
47
+ h3 {
48
+ font-size: var(--step-2);
49
+ small {
50
+ display: inline-block;
51
+ font-size: var(--step-1);
52
+ }
53
+ }
54
+
55
+ h4 {
56
+ font-size: var(--step-1);
57
+ font-style: normal;
58
+ }
59
+
60
+ h5 {
61
+ font-size: var(--step-0);
62
+ }
63
+
64
+ h6 {
65
+ font-size: var(--step-0);
66
+ font-style: oblique;
67
+ }
68
+
69
+ p {
70
+ font-weight: 200;
71
+ letter-spacing: 0.02em;
72
+ line-height: 1.666;
73
+ margin-bottom: 1.666rem;
74
+ }
75
+
76
+ *:not(h1, h2, h3, h4) {
77
+ font-size: var(--step-0);
78
+ font-weight: 300;
79
+ }
80
+
81
+ figcaption {
82
+ font-size: var(--step--1);
83
+ }
84
+
85
+ strong, b {
86
+ font-weight: 500;
87
+ }
88
+
89
+ code {
90
+ font-size: var(--step--1);
91
+ }
92
+
93
+ aside {
94
+ --step--1: var(--article-step--2);
95
+ --step-0: var(--article-step--1);
96
+ --step-1: var(--article-step-0);
97
+ --step-2: var(--article-step-1);
98
+ --step-3: var(--article-step-2);
99
+ --step-4: var(--article-step-3);
100
+ --step-5: var(--article-step-4);
101
+ --step-6: var(--article-step-5);
102
+
103
+ padding: 0;
104
+ opacity: 0.6666;
105
+ line-height: calc(1.666 * var(--article-step-0));
106
+
107
+ ul {
108
+ margin-top: 0
109
+ }
110
+ p, li {
111
+ font-weight: 200;
112
+ letter-spacing: 0.02em;
113
+ line-height: calc(1.666 * var(--article-step-0)); }
114
+ }
115
+ }
@@ -1,57 +1,86 @@
1
- @import 'variables';
1
+ @import "variables";
2
2
 
3
- .button, button, input[type="button"], input[type="submit"] {
3
+ .button,
4
+ button,
5
+ input[type="button"],
6
+ input[type="submit"] {
4
7
  border: 0;
5
8
  background: $selectableColor;
6
- color: $white;
9
+ color: $selectableColorContrast;
7
10
  text-decoration: none;
8
11
  line-height: 2.5;
9
12
  padding: 0 0.5em;
10
13
  display: inline-block;
11
- transition: background 0.2s;
12
- font-size: 1rem;
14
+ font-size: 1em;
13
15
  margin: 0;
14
16
  font-family: $fontFamily;
15
- &:hover, &:focus {
16
- color: $white;
17
+
18
+ &:hover,
19
+ &:focus {
20
+ color: $selectableColorContrast;
17
21
  background: $selectableColorHover;
18
- };
22
+ transform: $elementScaleUp;
23
+ }
19
24
  &.primary {
25
+ color: $primaryColorContrast;
20
26
  background: $primaryColor;
21
- &:hover, &:focus {
22
- color: $white;
27
+
28
+ &:hover,
29
+ &:focus {
30
+ color: $primaryColorContrast;
23
31
  background: $primaryHoverColor;
24
- };
32
+ }
25
33
  }
34
+
26
35
  &.secondary {
27
- background: $lightGrey;
28
- color: $offBlack;
29
- &:hover, &:focus {
30
- color: $offBlack;
31
- background: $grey;
32
- };
36
+ background: $secondaryColor;
37
+ color: $secondaryColorContrast;
38
+
39
+ &:hover,
40
+ &:focus {
41
+ color: $secondaryColorContrast;
42
+ background: $secondaryHoverColor;
43
+ }
33
44
  }
34
- &.warn {
35
- background: $red;
36
- color: $white;
37
- &:hover, &:focus {
38
- color: $white;
39
- background: darken($red, 10);
40
- };
45
+
46
+ &.warn,
47
+ &.alert {
48
+ background: $alertColor;
49
+ color: $alertColorContrast;
50
+ // to support .button.alert we need to override .alert styling
51
+ padding: 0 0.5em;
52
+ margin: 0;
53
+
54
+ &:hover,
55
+ &:focus {
56
+ color: $alertColorContrast;
57
+ background: darken($alertColor, 10);
58
+ }
41
59
  }
60
+
42
61
  &.small {
43
62
  font-size: 0.825rem;
63
+ line-height: 1;
64
+ padding: 0.3em;
65
+ }
66
+ }
67
+
68
+ small {
69
+ &.button,
70
+ button,
71
+ input[type="button"],
72
+ input[type="submit"] {
73
+ line-height: 1;
74
+ padding: 0.3em;
44
75
  }
45
76
  }
46
77
 
47
- //input[type=submit] {
48
- // background: $;
49
- // color: #fff;
50
- // border: 0 none;
51
- // font-size: 1em;
52
- // padding: 0.5em;
53
- // font-family: $fontFamily;
54
- // &:hover {
55
- // background: $selectableColorHover;
56
- // };
57
- //}
78
+ aside {
79
+ .button,
80
+ button,
81
+ input[type="button"],
82
+ input[type="submit"] {
83
+ width: 100%;
84
+ margin-bottom: 0.5em;
85
+ }
86
+ }
@@ -4,12 +4,11 @@ ul.cards, ol.cards {
4
4
  list-style: none;
5
5
  margin: 0;
6
6
  padding: 0;
7
-
8
7
  }
9
8
 
10
9
 
11
10
  .card {
12
- border: $lighterGrey 1px solid;
11
+ border: $borderColor 1px solid;
13
12
  display: flex;
14
13
  flex-direction: column;
15
14
  align-content: baseline;
@@ -20,8 +19,8 @@ ul.cards, ol.cards {
20
19
  .text {
21
20
  display: flex;
22
21
  flex-direction: column;
23
- max-width: 60ch;
24
- order: 1;
22
+ max-width: 60ch;
23
+ order: 1;
25
24
  }
26
25
 
27
26
  .img {
@@ -44,19 +43,16 @@ ul.cards, ol.cards {
44
43
  + .card {
45
44
  margin-top: 1.5rem;
46
45
  }
47
-
48
46
  }
49
47
 
50
48
 
51
49
  @supports (display: grid) {
52
- ul.cards {
50
+ ol.cards, ul.cards {
53
51
  display: grid;
54
52
  grid-template-columns: repeat(auto-fill, minmax(13em, 1fr));
55
53
  grid-gap: 1.5rem;
56
54
  }
57
55
 
58
-
59
-
60
56
  .card + .card {
61
57
  margin-top: 0;
62
58
  }
@@ -1,3 +1,4 @@
1
+ /* Devise specific */
1
2
  .actions {
2
3
  margin: 1em 0;
3
4
  }
@@ -1,46 +1,114 @@
1
- @import 'variables';
1
+ @import "variables";
2
2
 
3
- input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], textarea, select {
3
+ input[type="text"],
4
+ input[type="email"],
5
+ input[type="password"],
6
+ input[type="search"],
7
+ input[type="date"],
8
+ input[type="number"],
9
+ textarea,
10
+ select {
4
11
  font-size: 1em;
5
12
  width: 100%;
6
13
  font-family: $fontFamily;
7
14
  padding: 0 0.5em;
8
15
  line-height: 2;
9
- margin-bottom: 0.5em;
16
+ border: 1px solid $inputBorderColor;
17
+ line-height: inherit;
18
+ margin-top: -2px;
19
+
20
+ &[disabled] {
21
+ color: $textColor;
22
+ background: $disabledColor;
23
+ border-color: $disabledColor;
24
+ }
25
+
26
+ &:last-child {
27
+ margin-bottom: 0;
28
+ }
29
+ }
30
+
31
+ input + label,
32
+ input + input {
33
+ margin-top: 0.5em;
34
+ }
35
+
36
+ label {
37
+ display: block;
38
+ }
39
+
40
+ label + label {
41
+ margin-top: 1em;
10
42
  }
11
- input[type=file] {
43
+
44
+ input[type="file"] {
12
45
  width: 100%;
13
46
  }
14
47
 
48
+ input[type="radio"],
49
+ input[type="checkbox"] {
50
+ height: 1.25em;
51
+ width: 1.75em;
52
+ display: inline-block;
53
+ }
54
+
55
+ input[type="radio"] + label[for],
56
+ input[type="checkbox"] + label[for] {
57
+ display: inline-block;
58
+ }
59
+
60
+ label + p {
61
+ margin-top: $margin;
62
+ }
63
+
64
+ input[aria-invalid],
65
+ select[aria-invalid],
66
+ textarea[aria-invalid] {
67
+ border: $red solid 3px;
68
+ }
69
+
15
70
  select {
16
71
  padding: 0.2em 0.5em;
17
72
  }
18
73
 
74
+ form label input {
75
+ margin-bottom: 0;
76
+ }
19
77
 
20
78
  form .field > label:first-child {
21
79
  width: 100%;
22
80
  display: inline-block;
23
81
  }
24
82
 
83
+ form > *:first-child {
84
+ margin-top: 0;
85
+ }
86
+
25
87
  textarea {
26
88
  line-height: $lineHeight;
27
89
  min-height: 6em;
90
+
91
+ &.large {
92
+ min-height: 22em;
93
+ }
28
94
  }
29
95
 
30
96
  fieldset {
31
97
  margin-bottom: 1em;
32
98
  margin-top: 1em;
33
- border: 1px solid $lightGrey;
99
+ border: 1px solid $borderColor;
34
100
  border-radius: $borderRadius;
35
- // background: $lighterGrey;
101
+ padding: $padding;
36
102
  }
37
103
 
38
104
  .button_to {
39
105
  display: inline-block;
40
106
  }
107
+
41
108
  .form-actions {
42
109
  margin-top: 1em;
43
110
  }
111
+
44
112
  .form__fields--compact {
45
113
  display: flex;
46
114
  flex-direction: row;
@@ -50,18 +118,13 @@ fieldset {
50
118
 
51
119
  .form__fields--compact > * {
52
120
  flex-grow: 5;
53
- flex-spacing: 1em;
54
121
  }
55
122
 
56
123
  .field--small {
57
124
  flex-grow: 1;
58
125
  }
59
126
 
60
- .small.button {
61
- line-height: 1;
62
- padding: 0.3em ;
63
- }
64
- .warn.button input[type=checkbox] {
127
+ .warn.button input[type="checkbox"] {
65
128
  display: none;
66
129
  }
67
130
 
@@ -70,8 +133,23 @@ fieldset.destroyed {
70
133
  }
71
134
 
72
135
  form .hint {
136
+ margin-top: -0.3em;
137
+ display: block;
138
+ font-size: var(--step-0);
139
+ }
140
+
141
+ form span.error,
142
+ form div.error {
73
143
  font-size: 0.875em;
74
- color: $grey;
75
- margin-top: -0.5em;
144
+ color: $red;
145
+ // margin-top: -0.3em;
76
146
  display: block;
77
- }
147
+ margin-bottom: 1em;
148
+ }
149
+
150
+ @media (prefers-color-scheme: dark) {
151
+ form span.error,
152
+ form div.error {
153
+ color: $lighterRed;
154
+ }
155
+ }
@@ -0,0 +1,78 @@
1
+ @import "variables";
2
+
3
+ $grid-template-columns: repeat(10, 1fr);
4
+
5
+ @media (min-width: 40em) {
6
+ .grid {
7
+ header {
8
+ display: grid;
9
+ grid-template-columns: $grid-template-columns;
10
+ grid-template-rows: auto;
11
+ grid-template-areas: "spacer spacer title title title title title title title title";
12
+
13
+ h1 {
14
+ grid-area: title;
15
+ }
16
+ }
17
+
18
+ > div,
19
+ > section {
20
+ display: grid;
21
+ grid-template-columns: $grid-template-columns;
22
+ grid-template-areas: "subtitle subtitle main main main main main main aside aside";
23
+
24
+ .subtitle,
25
+ h2 {
26
+ grid-area: subtitle;
27
+ }
28
+
29
+ > div:not(.grid--full-width),
30
+ > section:not(.grid--full-width) {
31
+ grid-area: main;
32
+ }
33
+
34
+ aside {
35
+ grid-area: aside;
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ // make sure that two grids are separated
42
+ .grid + .grid {
43
+ margin-top: 1em;
44
+ }
45
+
46
+ .grid--full-width {
47
+ grid-area: none;
48
+ grid-column-start: subtitle-start;
49
+ grid-column-end: aside-end;
50
+ grid-row-start: unset;
51
+ grid-row-end: unset;
52
+
53
+ &.callout,
54
+ &.alert,
55
+ &.notice,
56
+ &.expand {
57
+ // padding: 0;
58
+ margin: 0;
59
+ max-width: unset;
60
+ width: calc(100% + (3 * var(--root-step-0)) - 1px);
61
+ margin-left: calc(-1.5 * var(--root-step-0));
62
+ padding: calc(1.5 * var(--root-step-0));
63
+ margin-top: 1em;
64
+ margin-bottom: 1em;
65
+ box-shadow: $boxShadow;
66
+ }
67
+ }
68
+
69
+ @media (prefers-color-scheme: dark) {
70
+ .grid--full-width {
71
+ &.callout,
72
+ &.alert,
73
+ &.notice,
74
+ &.expand {
75
+ box-shadow: $nightBoxShadow;
76
+ }
77
+ }
78
+ }