mp-design-system 0.4.12 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,6 +30,10 @@
30
30
  background-position: center right 1rem;
31
31
  background-repeat: no-repeat;
32
32
  background-size: 0.875em auto;
33
+
34
+ &::-webkit-calendar-picker-indicator {
35
+ display: none !important;
36
+ }
33
37
  }
34
38
 
35
39
  &--textarea {
@@ -21,7 +21,7 @@
21
21
  color: inherit;
22
22
  }
23
23
 
24
- thead th {
24
+ th {
25
25
  background: color('petrol');
26
26
  color: color('white');
27
27
  }
@@ -2,14 +2,20 @@
2
2
  @include padding('s-m');
3
3
  border: 1px solid;
4
4
  border-image-slice: 1;
5
- border-image-source: linear-gradient(to right, rgba(color('blue'), 0.5), rgba(color('green'), 0.5));
5
+ border-image-source: linear-gradient( to right,
6
+ rgba(color('blue'), 0.5),
7
+ rgba(color('green'), 0.5));
8
+ position: relative;
6
9
 
7
10
  &__title {
8
11
  max-width: 300px;
9
12
  color: color('petrol');
10
13
 
11
14
  @supports(-webkit-text-fill-color:transparent) {
12
- background-image: -webkit-gradient(linear,0% 0%,100% 100%,from(color('petrol')),to(color('blue')));
15
+ background-image: -webkit-gradient(linear,
16
+ 0% 0%,100% 100%,
17
+ from(color('petrol')),
18
+ to(color('blue')));
13
19
  -webkit-background-clip: text;
14
20
  -webkit-text-fill-color: transparent;
15
21
  display: inline-block;
@@ -3,10 +3,6 @@
3
3
 
4
4
  {% extends "layout.njk" %}
5
5
 
6
- {% block head %}
7
- <link rel="stylesheet" href="https://www.malvernpanalytical.com/resource/css/malvernpanalytical.min.css?v=637466523520000000" />
8
- {% endblock %}
9
-
10
6
  {% block inner %}
11
7
  {{ header({
12
8
  siteNav: siteNav
@@ -1,47 +1,140 @@
1
+
1
2
  *,
2
3
  *:before,
3
4
  *:after {
4
5
  box-sizing: border-box;
5
6
  }
6
7
 
8
+ body {
9
+ display: flex;
10
+ flex-direction: column;
11
+ justify-content: flex-start;
12
+ align-items: stretch;
13
+ min-height: 100vh;
14
+ margin: 0;
15
+ }
16
+
17
+ html {
18
+ scroll-behavior: smooth;
19
+ }
20
+
21
+ blockquote,
22
+ pre,
23
+ ol,
24
+ ul,
25
+ figure {
26
+ padding: 0;
27
+ margin: 0;
28
+ }
29
+
30
+ img {
31
+ max-width: 100%;
32
+ display: block;
33
+ height: auto;
34
+ border: none;
35
+ }
36
+
37
+ article,
38
+ aside,
39
+ figure,
40
+ footer,
41
+ header,
42
+ aside,
43
+ main,
44
+ nav {
45
+ display: block;
46
+ }
47
+
48
+ iframe {
49
+ border: none;
50
+ }
51
+
52
+ // Typography
53
+
7
54
  @mixin mp-reset-base {
8
55
  font: weight() #{1.125rem}/lh() $font-stack;
9
56
  @include step();
10
57
  color: color('grey');
11
58
  }
12
59
 
13
- .mp {
60
+ body {
14
61
  @include mp-reset-base();
62
+ }
15
63
 
16
- a,
17
- a:hover {
18
- cursor: pointer;
19
- color: inherit;
20
- }
21
-
22
- p {
23
- margin-bottom: 0;
24
- }
64
+ h1,
65
+ h2,
66
+ h3,
67
+ h4,
68
+ h5,
69
+ h6,
70
+ p,
71
+ ul,
72
+ ol,
73
+ dl {
74
+ margin: 0
75
+ }
25
76
 
26
- ul, ol {
27
- line-height: lh();
28
- }
77
+ ul, ol, p {
78
+ line-height: lh();
79
+ }
29
80
 
30
- ol, p, ul {
31
- line-height: lh();
32
- }
81
+ a {
82
+ text-decoration: none;
33
83
  }
34
84
 
35
- html {
36
- scroll-behavior: smooth;
85
+ a,
86
+ a:hover {
87
+ cursor: pointer;
88
+ color: inherit;
37
89
  }
38
90
 
91
+ // Lists
92
+
39
93
  .mp ol,
40
94
  .mp ul {
41
95
  list-style: none;
42
96
  }
43
97
 
44
- [disabled] {
98
+ // Font styles
99
+
100
+ cite,
101
+ address {
102
+ font-style: normal;
103
+ }
104
+
105
+ // Form
106
+
107
+ [type="submit"],
108
+ [type="button"],
109
+ button {
110
+ border-radius: 0;
111
+ background: transparent;
112
+ box-shadow: none;
113
+ appearance: none;
114
+ padding: 0;
115
+ cursor: pointer;
116
+ border: none;
117
+ color: inherit;
118
+ font: inherit;
119
+ }
120
+
121
+ [disabled],
122
+ .mp.c-button[disabled] {
45
123
  opacity: 0.5;
46
124
  cursor: not-allowed;
47
- }
125
+ }
126
+
127
+ label {
128
+ cursor: pointer;
129
+ }
130
+
131
+ // Animation
132
+
133
+ @media (prefers-reduced-motion:reduce) {
134
+ * {
135
+ -webkit-animation: none!important;
136
+ animation: none!important;
137
+ transition: none!important;
138
+ scroll-behavior: auto!important;
139
+ }
140
+ }
@@ -1,6 +1,6 @@
1
1
  @import './tools';
2
2
  @import './foundations';
3
- @import './elements/reset-full';
3
+ @import './elements/reset';
4
4
  @import './objects/syntax-highlighting';
5
5
  @import './utilities/hr.scss';
6
6
  @import './objects/grid';
@@ -26,13 +26,13 @@
26
26
  color: color('white');
27
27
  font-weight: weight('bold');
28
28
 
29
- @media only screen and (min-width:600px) {
29
+ @media only screen and (min-width:650px) {
30
30
  @include step(-2);
31
31
  flex-direction: row;
32
32
  align-items: center;
33
33
  }
34
34
 
35
- @media only screen and (min-width:900px) {
35
+ @media only screen and (min-width:1000px) {
36
36
  @include step(-1);
37
37
  @include padding('s', 's-l');
38
38
  }
@@ -565,7 +565,7 @@
565
565
  }
566
566
 
567
567
  // Header responsive styles
568
- @media only screen and (max-width: 900px) {
568
+ @media only screen and (max-width: 1050px) {
569
569
  .c-library__logo-name span:nth-last-child(3),
570
570
  .c-library__logo-name span:nth-last-child(1) {
571
571
  @include step(-2);
@@ -580,7 +580,7 @@
580
580
  }
581
581
  }
582
582
 
583
- @media only screen and (min-width: 600px) and (max-width: 650px),
583
+ @media only screen and (min-width: 650px) and (max-width: 700px),
584
584
  screen and (max-width: 450px) {
585
585
  .c-library__header nav .u-row {
586
586
  @include space('gap', '2xs');
@@ -589,7 +589,7 @@
589
589
  }
590
590
 
591
591
  .c-library__header {
592
- @media only screen and (max-width: 600px) {
592
+ @media only screen and (max-width: 650px) {
593
593
  nav a {
594
594
  @include padding('2xs',0);
595
595
  display: block;
@@ -179,6 +179,27 @@ $grid-gutter-width: 36;
179
179
  }
180
180
  }
181
181
 
182
+ &--swipeable {
183
+ @media (max-width: 54.9375em) {
184
+ @include breakout('gutter');
185
+ flex-wrap: nowrap;
186
+ overflow-x: scroll;
187
+ scroll-snap-type: x mandatory;
188
+ -webkit-overflow-scrolling: touch;
189
+
190
+ & > * {
191
+ flex: 0 0 auto;
192
+ max-width: 23em;
193
+ width: calc(85vw - var(--gutter)*2.333); // !important
194
+ scroll-snap-align: center;
195
+ }
196
+
197
+ & > * + * {
198
+ margin-left: var(--gutter) !important;
199
+ }
200
+ }
201
+ }
202
+
182
203
  @media (min-width: 55em) {
183
204
  &--4\/7 > :nth-child(2n + 2),
184
205
  &--4\/7-switch > :nth-child(2n + 2) {
@@ -13,9 +13,9 @@
13
13
  @extend .c-h,.c-h--step-1;
14
14
  }
15
15
 
16
- &.mp p,
17
- &.mp ul,
18
- &.mp ol {
16
+ p,
17
+ ul,
18
+ ol {
19
19
  line-height: lh('prose');
20
20
  }
21
21
 
@@ -0,0 +1,15 @@
1
+ // Breakout
2
+ // Force an element to fill 100% of the window width, ignoring its container
3
+
4
+ @mixin breakout($pad: 0) {
5
+ left: 50%;
6
+ position: relative;
7
+ transform: translateX(-50vw);
8
+ width: 100vw;
9
+ padding-left: safe-space($pad);
10
+ padding-right: safe-space($pad);
11
+ }
12
+
13
+ .u-breakout {
14
+ @include breakout
15
+ }
@@ -1,3 +1,5 @@
1
+ @import './breakout.scss';
2
+
1
3
  @function color($palette, $tone: 'step-0') {
2
4
  @return map-get(map-get($colours, $palette), $tone);
3
5
  }
@@ -130,6 +130,38 @@ status: 'In production'
130
130
  }
131
131
  ]
132
132
  },
133
+ {
134
+ name: 'MP21UtilGold',
135
+ key: 'Utility-Orange',
136
+ steps: [
137
+
138
+ {
139
+ name: "-1",
140
+ hex: 'AE7809',
141
+ cmyk: '29.51.100.10'
142
+ },
143
+ {
144
+ name: 0,
145
+ hex: 'F2A60D',
146
+ cmyk: '04.38.100.00'
147
+ },
148
+ {
149
+ name: 1,
150
+ hex: 'F6BF51',
151
+ cmyk: '03.26.79.00'
152
+ },
153
+ {
154
+ name: 2,
155
+ hex: 'FCEAC5',
156
+ cmyk: '01.07.25.00'
157
+ },
158
+ {
159
+ name: 3,
160
+ hex: 'FEF8EC',
161
+ cmyk: '00.02.06.00'
162
+ }
163
+ ]
164
+ },
133
165
  {
134
166
  name: 'MP21Charcoal',
135
167
  key: 'Grey',
@@ -181,8 +213,8 @@ status: 'In production'
181
213
  </div>
182
214
  <table class="c-table">
183
215
  <tbody>
184
- <tr><th>Hex</th><td>#{{step.hex | upper}}</td></tr>
185
- <tr><th>CMYK</th><td>{{step.cmyk}}</td></tr>
216
+ <tr><td>Hex</td><td>#{{step.hex | upper}}</td></tr>
217
+ <tr><td>CMYK</td><td>{{step.cmyk}}</td></tr>
186
218
  </tbody>
187
219
  </table>
188
220
  {% endfor %}
@@ -190,6 +222,27 @@ status: 'In production'
190
222
  {% endfor%}
191
223
  </div>
192
224
 
225
+ {{ markdown({
226
+ content: "# When to use color
227
+
228
+ The color palette works best when it's used in a balanced way; too much of a strong color can make a design feel crowded or busy. Instead, try to keep your designs to mainly white backgrounds, with Grey text, and splashes of color to highlight important elements.
229
+
230
+ **Petrol** is our primary color - it represents Malvern Panalytical's spirit and personality. Along with **Blue** it is the color you will use most often in your designs.
231
+
232
+ **Green** is reserved for _calls to action_ - the single most important action that we want a reader or viewer to take next. On a web page for example, this would be the \"buy now\" button.
233
+
234
+ **Rubine** is reserved for important notices or warnings. It's such an eye-catching color that it must be used sparingly.
235
+
236
+ **Utility Gold** is intended for notices which are less urgent than Rubine. It can also be used sparingly as an accent color, to contrast against Petrol and Blue.
237
+
238
+ **Grey** is widely used for text in all designs.
239
+
240
+ ## Tints and shades
241
+ Each color is provided in _steps_. Step 0 is the \"default\" for each color. If you need a colored background, consider using step 2 or 3, as step 0 or 1 will often be too overpowering.
242
+
243
+ Using Petrol step 3 as a background color (instead of grey) can be a nice way to introduce a bit of our personality into a design."
244
+ }) }}
245
+
193
246
  {{ alert({
194
247
  type: 'warning',
195
248
  content: '<ul>
@@ -5,7 +5,7 @@ layout: patterns-page
5
5
 
6
6
  {% from "components/card/macro.njk" import card %}
7
7
 
8
- <div class="o-grid o-grid--of-three">
8
+ <div class="o-grid o-grid--of-three o-grid--swipeable">
9
9
  {% for _ in [0, 1, 2] %}
10
10
  {{ card({
11
11
  theme: {
@@ -20,12 +20,20 @@ tags: prototype
20
20
  {% block content %}
21
21
  {{ hero({
22
22
  title: "We’re BIG on small.",
23
- content: '<p>We make scientific instruments that make the invisible visible, and the impossible possible. For over 30 years, we’ve partnered with many of the world’s most pioneering companies, universities and research organizations so they can improve everything from the energies that power us and the materials we create with, to medicines that cure us and the food we enjoy.</p>',
23
+ content: '<p>We make scientific instruments and services that make the invisible visible, and the impossible possible.</p>',
24
24
  cta: {
25
25
  label: 'About Malvern Panalytical',
26
26
  link: ''
27
27
  },
28
- noCover: true
28
+ homepage: "dark",
29
+ images: [
30
+ { "src": "/static/img/homepage_1_back_alt.webp" },
31
+ { "src": "/static/img/homepage_2_back_alt.webp" }
32
+ ],
33
+ frontimages: [
34
+ { "src": "/static/img/homepage_1_front_full.webp" },
35
+ { "src": "/static/img/homepage_2_front_full.webp" }
36
+ ]
29
37
  }) }}
30
38
 
31
39
  <section class="mp c-slat c-slat--padded c-slat--white u-flow--l-2xl">
@@ -191,7 +199,7 @@ tags: prototype
191
199
 
192
200
  <div class="c-tabs__content">
193
201
  <div id="tab-webinars" class="c-tab c-tab--active">
194
- <div class="o-grid o-grid--of-three">
202
+ <div class="o-grid o-grid--of-three o-grid--swipeable">
195
203
  {{ card({
196
204
  theme: {
197
205
  layout: 'single',
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: Webinars and events
3
3
  tags: prototype
4
- tagTitle: Webinars
4
+ tagTitle: Webinars - featured layout
5
5
  ---
6
6
 
7
7
  {% from "components/button/macro.njk" import button %}
@@ -22,7 +22,7 @@ tagTitle: Webinars
22
22
 
23
23
  <aside class="u-flow">
24
24
  <h3 class="c-h c-h--upper">Featured events</h3>
25
- <div class="o-grid o-grid--of-three">
25
+ <div class="o-grid o-grid--of-three o-grid--swipeable">
26
26
  {{ card({
27
27
  theme: {
28
28
  layout: 'single',
@@ -8,6 +8,7 @@ tagTitle: Webinars
8
8
  {% from "components/filter-search/macro.njk" import filterSearch %}
9
9
  {% from "components/tabs/macro.njk" import tabsRadio %}
10
10
  {% from "components/card/macro.njk" import card %}
11
+ {% from "components/twi/macro.njk" import twi %}
11
12
 
12
13
  {% set siteNav %}{% include "navigation/corporate.njk" %}{% endset %}
13
14
 
@@ -23,7 +24,7 @@ tagTitle: Webinars
23
24
 
24
25
  <aside class="u-flow">
25
26
  <h3 class="c-h c-h--upper">Featured events</h3>
26
- <div class="o-grid o-grid--of-three">
27
+ <div class="o-grid o-grid--of-three o-grid--swipeable">
27
28
  {{ card({
28
29
  theme: {
29
30
  layout: 'single',
@@ -183,7 +184,7 @@ tagTitle: Webinars
183
184
  </aside>
184
185
  <main class="u-flow">
185
186
  <header class="u-split u-step--1">
186
- <span>Results (12)</span>
187
+ <span>12 results</span>
187
188
  <span>Sorted by nearest date</span>
188
189
  </header>
189
190
 
@@ -313,6 +314,86 @@ tagTitle: Webinars
313
314
  link: '/prototype/webinar'
314
315
  }) }}
315
316
 
317
+ {{ card({
318
+ theme: {
319
+ layout: 'single',
320
+ size: 'medium',
321
+ name: 'alt',
322
+ corner: true
323
+ },
324
+ header: {
325
+ title: 'Discover how on-line particle sizing optimises mining analytics.',
326
+ meta: ['English'],
327
+ date: {
328
+ date: '2021-05-13' | createDate,
329
+ time: '11:00 – 1200',
330
+ timezone: 'EST'
331
+ }
332
+ },
333
+ link: '/prototype/webinar'
334
+ }) }}
335
+
336
+ {{ card({
337
+ theme: {
338
+ layout: 'single',
339
+ size: 'medium',
340
+ name: 'alt',
341
+ corner: true
342
+ },
343
+ header: {
344
+ title: 'Ask us Anything: The API Edition - API Characterization & Developability',
345
+ meta: ['English'],
346
+ date: {
347
+ date: '2021-05-18' | createDate,
348
+ time: '11:00 – 1200',
349
+ timezone: 'EST'
350
+ }
351
+ },
352
+ link: '/prototype/webinar'
353
+ }) }}
354
+
355
+ {{ card({
356
+ theme: {
357
+ layout: 'single',
358
+ size: 'medium',
359
+ name: 'alt',
360
+ corner: true
361
+ },
362
+ header: {
363
+ title: 'Zetium ED X-ray fluorescence SuperQ application course',
364
+ meta: ['English'],
365
+ date: {
366
+ date: '2021-06-01' | createDate,
367
+ time: '11:00 – 1200',
368
+ timezone: 'EST'
369
+ }
370
+ },
371
+ link: '/prototype/webinar'
372
+ }) }}
373
+
374
+ {{ card({
375
+ theme: {
376
+ layout: 'single',
377
+ size: 'medium',
378
+ name: 'alt',
379
+ corner: true
380
+ },
381
+ header: {
382
+ title: 'Discover how on-line particle sizing optimises mining analytics.',
383
+ meta: ['English'],
384
+ date: {
385
+ date: '2021-06-07' | createDate,
386
+ time: '11:00 – 1200',
387
+ timezone: 'EST'
388
+ }
389
+ },
390
+ link: '/prototype/webinar'
391
+ }) }}
392
+
393
+ <footer class="u-split u-step--1 u-margin-top-m">
394
+ <span>Page 1 of 2</span>
395
+ {{ twi({ classes: 'u-link u-step--1', label: "Next page", icon: 'arrow-right', align: 'right', link: "#" }) }}
396
+ </footer>
316
397
 
317
398
  </main>
318
399
  </div>