mp-design-system 0.9.6 → 0.9.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/dist/build/scss/library.css +1 -1
  2. package/dist/build/scss/library.css.map +1 -1
  3. package/dist/build/scss/main.css +1 -1
  4. package/dist/build/scss/main.css.map +1 -1
  5. package/package.json +1 -1
  6. package/src/_includes/components/accordion/macro.njk +1 -1
  7. package/src/_includes/components/features-table/features-table.config.js +16 -0
  8. package/src/_includes/components/features-table/features-table.njk +360 -0
  9. package/src/_includes/components/features-table/features-table.scss +101 -0
  10. package/src/_includes/components/features-table/macro.njk +5 -0
  11. package/src/_includes/components/footer/footer.scss +2 -2
  12. package/src/_includes/components/header/header.scss +15 -1
  13. package/src/_includes/components/post-meta/post-meta.config.js +9 -0
  14. package/src/_includes/components/post-meta/post-meta.njk +8 -2
  15. package/src/_includes/components/table/table.scss +13 -0
  16. package/src/_includes/library-navigation/brand-nav.njk +2 -1
  17. package/src/_includes/navigation/corporate.njk +5 -2
  18. package/src/assets/scss/components/index.scss +1 -0
  19. package/src/assets/scss/components/lightbox.scss +1 -0
  20. package/src/assets/scss/library.scss +15 -2
  21. package/src/assets/scss/objects/grid.scss +46 -91
  22. package/src/assets/scss/objects/prose.scss +2 -1
  23. package/src/assets/scss/utilities/hr.scss +4 -0
  24. package/src/assets/scss/utilities/link.scss +13 -1
  25. package/src/assets/scss/utilities/space.scss +16 -0
  26. package/src/assets/scss/utilities/typography.scss +4 -0
  27. package/src/brand/colors.njk +15 -6
  28. package/src/brand/illustration.md +44 -0
  29. package/src/brand/images.md +1 -1
  30. package/src/components/grid/generic.njk +31 -0
  31. package/src/components/grid/index.njk +21 -2
  32. package/src/components/grid/layout.njk +5 -5
  33. package/src/prototype/sections.njk +290 -0
@@ -22,6 +22,23 @@ $grid-gutter-width: 36;
22
22
  @return (($count * $grid-column-width) + (($count - 1) * $grid-gutter-width)) * 1px;
23
23
  }
24
24
 
25
+ @mixin o-grid($columns) {
26
+ $width: math.div(100%, $columns);
27
+
28
+ & > * {
29
+ width: calc(($width - (($columns - 1) * #{space-unit()} / $columns)) - 0.1px);
30
+ width: calc(($width - (($columns - 1) * var(--gutter) / $columns)) - 0.1px);
31
+
32
+ & + * {
33
+ @include margin-left("gutter");
34
+ }
35
+
36
+ &:nth-child(#{$columns}n + 1) {
37
+ margin-left: 0;
38
+ }
39
+ }
40
+ }
41
+
25
42
  .o-grid {
26
43
  display: flex;
27
44
  flex-wrap: wrap;
@@ -51,131 +68,69 @@ $grid-gutter-width: 36;
51
68
 
52
69
  &--of-two {
53
70
  @media (min-width: 40em) {
54
- & > * {
55
- width: calc((50% - (1 * #{space-unit()} / 2)) - 0.1px);
56
- width: calc((50% - (1 * var(--gutter) / 2)) - 0.1px);
57
-
58
- & + * {
59
- @include margin-left("gutter");
60
- }
61
-
62
- &:nth-child(2n + 1) {
63
- margin-left: 0;
64
- }
65
- }
71
+ @include o-grid(2)
66
72
  }
67
73
  }
68
74
 
69
75
  &--of-two-late {
70
76
  @media (min-width: 55em) {
71
- & > * {
72
- width: calc((50% - (1 * #{space-unit()} / 2)) - 0.1px);
73
- width: calc((50% - (1 * var(--gutter) / 2)) - 0.1px);
74
-
75
- & + * {
76
- @include margin-left("gutter");
77
- }
77
+ @include o-grid(2)
78
+ }
79
+ }
78
80
 
79
- &:nth-child(2n + 1) {
80
- margin-left: 0;
81
- }
82
- }
81
+ &--of-two-early {
82
+ @media (min-width: 22.4em) {
83
+ @include o-grid(2)
83
84
  }
84
85
  }
85
86
 
86
87
  &--of-three {
87
88
  @media (min-width: 38em) and (max-width: 54.9375em) { // 608 - 1087
88
- & > * {
89
- width: calc((50% - (1 * #{space-unit()} / 2)) - 0.1px);
90
- width: calc((50% - (1 * var(--gutter) / 2)) - 0.1px);
91
-
92
- & + * {
93
- @include margin-left("gutter");
94
- }
95
-
96
- &:nth-child(2n + 1) {
97
- margin-left: 0;
98
- }
99
- }
89
+ @include o-grid(2)
100
90
  }
101
91
 
102
92
  @media (min-width: 55em) {
103
- & > * {
104
- width: calc((33.333% - (2 * #{space-unit()} / 3)) - 0.1px);
105
- width: calc((33.333% - (2 * var(--gutter) / 3)) - 0.1px);
106
-
107
- & + * {
108
- @include margin-left("gutter");
109
- }
110
-
111
- &:nth-child(3n + 1) {
112
- margin-left: 0;
113
- }
114
- }
93
+ @include o-grid(3)
115
94
  }
116
95
  }
117
96
 
118
97
  &--of-three-late {
119
98
  @media (min-width: 38em) and (max-width: 67.9375em) {
120
- & > * {
121
- width: calc((50% - (1 * #{space-unit()} / 2)) - 0.1px);
122
- width: calc((50% - (1 * var(--gutter) / 2)) - 0.1px);
123
-
124
- & + * {
125
- @include margin-left("gutter");
126
- }
127
-
128
- &:nth-child(2n + 1) {
129
- margin-left: 0;
130
- }
131
- }
99
+ @include o-grid(2)
132
100
  }
133
101
 
134
102
  @media (min-width: 68em) {
135
- & > * {
136
- width: calc((33.333% - (2 * #{space-unit()} / 3)) - 0.1px);
137
- width: calc((33.333% - (2 * var(--gutter) / 3)) - 0.1px);
103
+ @include o-grid(3)
104
+ }
105
+ }
138
106
 
139
- & + * {
140
- @include margin-left("gutter");
141
- }
107
+ &--of-three-early {
108
+ @media (min-width: 22.4em) and (max-width: 54.9375em) {
109
+ @include o-grid(2)
110
+ }
142
111
 
143
- &:nth-child(3n + 1) {
144
- margin-left: 0;
145
- }
146
- }
112
+ @media (min-width: 55em) {
113
+ @include o-grid(3)
147
114
  }
148
115
  }
149
116
 
150
117
  &--of-four {
151
118
  @media (min-width: 38em) and (max-width: 59.9375em) {
152
- & > * {
153
- width: calc((50% - (1 * #{space-unit()} / 2)) - 0.1px);
154
- width: calc((50% - (1 * var(--gutter) / 2)) - 0.1px);
155
-
156
- & + * {
157
- @include margin-left("gutter");
158
- }
159
-
160
- &:nth-child(2n + 1) {
161
- margin-left: 0;
162
- }
163
- }
119
+ @include o-grid(2)
164
120
  }
165
121
 
166
122
  @media (min-width: 60em) {
167
- & > * {
168
- width: calc((25% - (3 * #{space-unit()} / 4)) - 0.1px);
169
- width: calc((25% - (3 * var(--gutter) / 4)) - 0.1px);
123
+ @include o-grid(4)
124
+ }
125
+ }
170
126
 
171
- & + * {
172
- @include margin-left("gutter");
173
- }
127
+ &--of-four-early {
128
+ @media (min-width: 22.4em) and (max-width: 59.9375em) {
129
+ @include o-grid(2)
130
+ }
174
131
 
175
- &:nth-child(4n + 1) {
176
- margin-left: 0;
177
- }
178
- }
132
+ @media (min-width: 60em) {
133
+ @include o-grid(4)
179
134
  }
180
135
  }
181
136
 
@@ -20,7 +20,8 @@
20
20
  }
21
21
 
22
22
  p a:not(.c-button),
23
- li a:not(.c-button) {
23
+ li a:not(.c-button),
24
+ td a:not(.c-button) {
24
25
  color: color('utility-blue');
25
26
  text-decoration: underline;
26
27
  text-underline-offset: 3px;
@@ -10,6 +10,10 @@
10
10
  border-top: 1px solid color('petrol', 'step-2');
11
11
  }
12
12
 
13
+ .u-border-bottom {
14
+ border-bottom: 1px solid color('petrol', 'step-2');
15
+ }
16
+
13
17
  .u-border {
14
18
  border: 1px solid color('petrol', 'step-2');
15
19
  }
@@ -7,7 +7,19 @@
7
7
  text-decoration: underline;
8
8
  }
9
9
 
10
+ &--petrol {
11
+ color: color('petrol');
12
+ }
13
+
10
14
  &--red {
11
15
  color: color('red');
12
16
  }
13
- }
17
+
18
+ &--underline {
19
+ text-decoration: underline;
20
+
21
+ &:hover {
22
+ text-decoration: none;
23
+ }
24
+ }
25
+ }
@@ -97,6 +97,10 @@
97
97
  @include padding('xl');
98
98
  }
99
99
 
100
+ .u-pad-y-xs {
101
+ @include padding-top('xs');
102
+ @include padding-bottom('xs');
103
+ }
100
104
  .u-pad-y-s {
101
105
  @include padding-top('s');
102
106
  @include padding-bottom('s');
@@ -303,6 +307,18 @@
303
307
  @include margin-bottom('xl');
304
308
  }
305
309
 
310
+ .u-margin-x-3xs {
311
+ @include margin-left('3xs');
312
+ @include margin-right('3xs');
313
+ }
314
+ .u-margin-x-2xs {
315
+ @include margin-left('2xs');
316
+ @include margin-right('2xs');
317
+ }
318
+ .u-margin-x-xs {
319
+ @include margin-left('xs');
320
+ @include margin-right('xs');
321
+ }
306
322
  .u-margin-x-s {
307
323
  @include margin-left('s');
308
324
  @include margin-right('s');
@@ -29,3 +29,7 @@
29
29
  .u-text-center {
30
30
  text-align: center;
31
31
  }
32
+
33
+ .u-remove-bullets {
34
+ list-style-type: none;
35
+ }
@@ -35,12 +35,14 @@ Step 0 is the 'default' shade for each color."
35
35
  {
36
36
  name: "-1",
37
37
  hex: '003039',
38
- cmyk: '93.65.57.57'
38
+ cmyk: '93.65.57.57',
39
+ pantone: 'PAN 547'
39
40
  },
40
41
  {
41
42
  name: 0,
42
43
  hex: '005461',
43
- cmyk: '93.54.49.27'
44
+ cmyk: '93.54.49.27',
45
+ pantone: 'PAN 3165'
44
46
  },
45
47
  {
46
48
  name: 1,
@@ -71,7 +73,8 @@ Step 0 is the 'default' shade for each color."
71
73
  {
72
74
  name: 0,
73
75
  hex: '00a2c2',
74
- cmyk: '77.17.17.00'
76
+ cmyk: '77.17.17.00',
77
+ pantone: 'PAN 312'
75
78
  },
76
79
  {
77
80
  name: 1,
@@ -102,7 +105,8 @@ Step 0 is the 'default' shade for each color."
102
105
  {
103
106
  name: 0,
104
107
  hex: '13aa13',
105
- cmyk: '81.04.100.01'
108
+ cmyk: '81.04.100.01',
109
+ pantone: 'PAN 354'
106
110
  },
107
111
  {
108
112
  name: 1,
@@ -128,7 +132,8 @@ Step 0 is the 'default' shade for each color."
128
132
  {
129
133
  name: 0,
130
134
  hex: 'ce0058',
131
- cmyk: '14.100.50.2'
135
+ cmyk: '14.100.50.2',
136
+ pantone: 'PAN Rubine Red'
132
137
  }
133
138
  ]
134
139
  },
@@ -145,7 +150,8 @@ Step 0 is the 'default' shade for each color."
145
150
  {
146
151
  name: 0,
147
152
  hex: '333333',
148
- cmyk: '00.00.00.91'
153
+ cmyk: '00.00.00.91',
154
+ pantone: 'PAN 447'
149
155
  },
150
156
  {
151
157
  name: 1,
@@ -228,6 +234,9 @@ Step 0 is the 'default' shade for each color."
228
234
  <tbody>
229
235
  <tr><td>Hex</td><td>#{{step.hex | upper}}</td></tr>
230
236
  <tr><td>CMYK</td><td>{{step.cmyk}}</td></tr>
237
+ <tr class="{{ "u-petrol-step-3" if not step.pantone }}">
238
+ <td>Pantone</td><td>{{step.pantone if step.pantone}}</td>
239
+ </tr>
231
240
  </tbody>
232
241
  </table>
233
242
  {% endfor %}
@@ -0,0 +1,44 @@
1
+ ---
2
+ title: Illustration
3
+ layout: content-page
4
+ sidebar: brand
5
+ tags: brand
6
+ version: 1.0.0
7
+ status: 'Ready'
8
+ ---
9
+ Photography covers most of our needs for visual imagery, but there are times when photography isn't a good fit. For example when dealing with more abstract transactional concepts like "log in" or "verify your account". In these cases, we use illustration to add some vibrance to our designs.
10
+
11
+ ## Guidelines
12
+ Our illustration style is still a work-in-progress; currently it follows a few simple guidelines.
13
+
14
+ - Vector
15
+ - Isometric perspective
16
+ - Simple details
17
+ - Small characters (usually) around a large object
18
+ - Limited color palette
19
+ - White background
20
+
21
+ ## Resources
22
+ We have a library of pre-made characters which can be adapted for new designs, and an Adobe Illustrator color palette. Contact Will Wallace for access to both of these; I'll aim to make the available on this site in future.
23
+
24
+ ## Examples
25
+
26
+ <div class="c-library__illustration-grid">
27
+
28
+ ![alt text][login]
29
+
30
+ ![alt text][thankyou]
31
+
32
+ ![alt text][confirm]
33
+
34
+ ![alt text][support]
35
+
36
+ ![alt text][opt-in]
37
+
38
+ </div>
39
+
40
+ [login]: https://www.malvernpanalytical.com/resource/svg/login3.svg
41
+ [thankyou]: https://p3.aprimocdn.net/malvernpanalytical/0cd71419-bc75-4b43-8c4d-af69010bf927/thankyou_Original%20file.svg
42
+ [support]: https://p3.aprimocdn.net/malvernpanalytical/aef489f7-a3cc-4a0c-ad6c-af3300baaa3b/support3_Original%20file.svg
43
+ [opt-in]: https://p3.aprimocdn.net/malvernpanalytical/383c6156-cefd-4d8e-a913-af6d00cebf8a/opt-in%20success%20v02_Original%20file.svg
44
+ [confirm]: https://p3.aprimocdn.net/malvernpanalytical/68ccc179-959e-4b2e-b1c1-af7100be26af/get-started_Original%20file.svg
@@ -4,7 +4,7 @@ layout: system-page
4
4
  sidebar: brand
5
5
  tags: brand
6
6
  version: 1.0.0
7
- status: 'In production'
7
+ status: 'Ready'
8
8
  ---
9
9
 
10
10
  <div class="mp o-prose u-flow--prose">
@@ -6,8 +6,10 @@ crumb: ["/components/grid/", "Grid"]
6
6
  ---
7
7
 
8
8
  <div class="u-flow--l">
9
+ <p>All <code>o-grid</code>s are single-column, full width, below 22.4em/358px. Three- and four-column grids begin to split into columns above 38em/608px, and two-column grids split into columns above 40em/640px.</p>
9
10
  <div class="u-flow--xs">
10
11
  <p class="u-step--1"><code>.o-grid .o-grid--of-two</code></p>
12
+ <p class="u-step--1 u-grey-step-1">Two columns above 40em/640px</p>
11
13
  <div class="o-grid o-grid--of-two">
12
14
  <div>
13
15
  <div class="c-library-grid"></div>
@@ -18,8 +20,35 @@ crumb: ["/components/grid/", "Grid"]
18
20
  </div>
19
21
  </div>
20
22
 
23
+ <div class="u-flow--xs">
24
+ <p class="u-step--1"><code>.o-grid .o-grid--of-two-late</code></p>
25
+ <p class="u-step--1 u-grey-step-1">Two columns above 55em/880px</p>
26
+ <div class="o-grid o-grid--of-two-late">
27
+ <div>
28
+ <div class="c-library-grid"></div>
29
+ </div>
30
+ <div>
31
+ <div class="c-library-grid"></div>
32
+ </div>
33
+ </div>
34
+ </div>
35
+
36
+ <div class="u-flow--xs">
37
+ <p class="u-step--1"><code>.o-grid .o-grid--of-two-early</code></p>
38
+ <p class="u-step--1 u-grey-step-1">Two columns above 22.4em/358px</p>
39
+ <div class="o-grid o-grid--of-two-early">
40
+ <div>
41
+ <div class="c-library-grid"></div>
42
+ </div>
43
+ <div>
44
+ <div class="c-library-grid"></div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+
21
49
  <div class="u-flow--xs">
22
50
  <p class="u-step--1"><code>.o-grid .o-grid--of-three</code></p>
51
+ <p class="u-step--1 u-grey-step-1">Two columns above 38em/608px, then three columns above 55em/880px</p>
23
52
  <div class="o-grid o-grid--of-three">
24
53
  <div>
25
54
  <div class="c-library-grid"></div>
@@ -35,6 +64,7 @@ crumb: ["/components/grid/", "Grid"]
35
64
 
36
65
  <div class="u-flow--xs">
37
66
  <p class="u-step--1"><code>.o-grid .o-grid--of-three-late</code></p>
67
+ <p class="u-step--1 u-grey-step-1">Two columns above 38em/608px, then three columns above 68em/1088px</p>
38
68
  <div class="o-grid o-grid--of-three-late">
39
69
  <div>
40
70
  <div class="c-library-grid"></div>
@@ -50,6 +80,7 @@ crumb: ["/components/grid/", "Grid"]
50
80
 
51
81
  <div class="u-flow--xs">
52
82
  <p class="u-step--1"><code>.o-grid .o-grid--of-four</code></p>
83
+ <p class="u-step--1 u-grey-step-1">Two columns above 38em/608px, then three columns above 60em/960px</p>
53
84
  <div class="o-grid o-grid--of-four">
54
85
  <div>
55
86
  <div class="c-library-grid"></div>
@@ -5,8 +5,9 @@ sidebar: components
5
5
  ---
6
6
 
7
7
  {% from "components/card/macro.njk" import card %}
8
+ {% from "components/prose/macro.njk" import markdown %}
8
9
 
9
- <div class="o-grid o-grid--of-three-late">
10
+ <div class="o-grid o-grid--of-three-late u-margin-bottom-s">
10
11
  {{ card({
11
12
  theme: {
12
13
  layout: 'single',
@@ -64,4 +65,22 @@ sidebar: components
64
65
  }
65
66
  }
66
67
  }) }}
67
- </div>
68
+ </div>
69
+
70
+ {% set content %}
71
+ ## Common breakpoints (mobile first)
72
+
73
+ These are guidelines, not strict rules. In general you should add a breakpoint whenever the design requires it, not whenever these guidelines say so.
74
+
75
+ | Ems | Px | What happens above this breakpoint: |
76
+ |-----|----|--------|
77
+ | 38em | 608px | [Generic grids](/components/grid/generic) expand from single- to multi-column (anything below this is considered "Mobile") |
78
+ | 40em | 641px | Comparison tables expand from single- to multi-column |
79
+ | 48em | 768px | Mobile menu becomes desktop menu |
80
+ | 55em | 880px | [Layout grids](/components/grid/layout) expand from single- to multi-column |
81
+ | 70em | 1120px | Column widths expand slightly (anything above this is considered "Desktop") |
82
+ {% endset %}
83
+
84
+ {{ markdown({
85
+ content: content
86
+ }) }}
@@ -24,11 +24,11 @@ Options have been included to control component order when the layout is stacked
24
24
  {% set item = i[0] %}
25
25
  {% set modifier = i[1] %}
26
26
  <div class="u-flow">
27
- <h2 class="c-h c-h--step-3">{{ item }}{% if modifier %} ({{ modifier | replace('o-grid--', '') }}){% endif %}</h2>
27
+ <h2 class="c-h c-h--step-3">{{ item }} {{ '(' + modifier + ')' | replace('o-grid--', '') if modifier }}</h2>
28
28
 
29
29
  <div class="u-flow--xs">
30
- <p class="u-step--1"><code>o-grid o-grid--{{ item }}{% if modifier %} {{ modifier }}{% endif %}</code></p>
31
- <div class="o-grid o-grid--layout o-grid--{{ item }}{% if modifier %} {{ modifier }}{% endif %}">
30
+ <p class="u-step--1"><code>o-grid o-grid--{{ item }} {{ modifier if modifier }}</code></p>
31
+ <div class="o-grid o-grid--layout o-grid--{{ item }} {{ modifier if modifier }}">
32
32
  <main>
33
33
  <div class="c-library-grid c-library-grid--first"></div>
34
34
  </main>
@@ -39,8 +39,8 @@ Options have been included to control component order when the layout is stacked
39
39
  </div>
40
40
 
41
41
  <div class="u-flow--xs">
42
- <p class="u-step--1"><code>o-grid o-grid--{{ item }}-switch{% if modifier %} {{ modifier }}{% endif %}</code></p>
43
- <div class="o-grid o-grid--layout o-grid--{{ item }}-switch{% if modifier %} {{ modifier }}{% endif %}">
42
+ <p class="u-step--1"><code>o-grid o-grid--{{ item }}-switch {{ modifier if modifier }}</code></p>
43
+ <div class="o-grid o-grid--layout o-grid--{{ item }}-switch {{ modifier if modifier }}">
44
44
  <main>
45
45
  <div class="c-library-grid c-library-grid--first"></div>
46
46
  </main>