mp-design-system 1.2.23 → 1.2.25

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
@@ -55,6 +55,10 @@
55
55
  }
56
56
 
57
57
  &__logo {
58
+ display: block;
59
+ max-width: 216px;
60
+ width: 60%;
61
+
58
62
  img {
59
63
  @include margin-right('gutter');
60
64
  filter: saturate(0) brightness(10);
@@ -33,12 +33,14 @@
33
33
  </header>
34
34
 
35
35
  {% if params.cta %}
36
- {{ button({
37
- link: params.cta.link,
38
- inline: true,
39
- label: params.cta.label,
40
- color: 'green'
41
- }) }}
36
+ <div class="c-hero__button-wrap">
37
+ {{ button({
38
+ link: params.cta.link,
39
+ inline: true,
40
+ label: params.cta.label,
41
+ color: 'green'
42
+ }) }}
43
+ </div>
42
44
  {% endif %}
43
45
  </div>
44
46
  </div>
@@ -70,7 +72,9 @@
70
72
  {% endif %}
71
73
 
72
74
  {% if params.longvideo %}
73
- {{ button({ link: '', label: 'Play video', colour: 'outline-white', classes: 'c-hero__button', attrs: 'id=playVideo' }) }}
75
+ <div class="c-hero__video-button-wrap">
76
+ {{ button({ link: '', label: 'Play video', colour: 'outline-white', attrs: 'id=playVideo' }) }}
77
+ </div>
74
78
  {% endif %}
75
79
  </figure>
76
80
 
@@ -1,3 +1,11 @@
1
+ :root {
2
+ --body-width: min(100vw, calc(78.75rem + var(--gutter) + var(--gutter) ) );
3
+ --gutter-width: calc( (100vw - var(--body-width)) / 2 );
4
+ --text-width: min(100vw, 51.75rem);
5
+ --hero-gap: calc( var(--body-width) - var(--text-width));
6
+ --stop: calc( ( var(--hero-gap) + var(--gutter-width) ) *.8 );
7
+ }
8
+
1
9
  .c-hero {
2
10
  background-color: color('blue', 'step-2');
3
11
  background: linear-gradient(to top right, color('petrol', 'step-3'), color('blue', 'step-2'));
@@ -59,6 +67,16 @@
59
67
  p {
60
68
  line-height: lh('prose');
61
69
  }
70
+
71
+ .c-hero__button-wrap {
72
+ display: flex;
73
+ flex-wrap: wrap;
74
+ gap: var(--space-s);
75
+
76
+ &> .c-button {
77
+ margin: 0 !important;
78
+ }
79
+ }
62
80
  }
63
81
 
64
82
  &--image {
@@ -97,6 +115,12 @@
97
115
  background: radial-gradient(circle farthest-side at top right, rgba(color('grey', 'step--1'), 30%), color('grey', 'step--1'));
98
116
  }
99
117
  }
118
+
119
+ @media (min-width:70em) {
120
+ &:after {
121
+ background: linear-gradient(270deg, rgba(color('grey','step--1'),0%) var(--gutter-width), rgba(color('grey','step--1'),62%) var(--stop), color('grey','step--1'));
122
+ }
123
+ }
100
124
  }
101
125
 
102
126
  &--homepage {
@@ -105,6 +129,20 @@
105
129
  @media (min-width: 38em) {
106
130
  background: linear-gradient(84.46deg, color('petrol', 'step--1') 7.52%, color('petrol') 44.84%, rgba(35, 80, 87, 0.8) 51.02%, rgba(52, 82, 87, 0.62) 54.99%, rgba(78, 86, 87, 0.2209) 59.54%, rgba(87, 87, 87, 0) 65.59%);
107
131
  }
132
+
133
+ &::after {
134
+ position: absolute;
135
+ content: '';
136
+ top: 0;
137
+ left: 0;
138
+ background: rgba(black, 0.33);
139
+ width: 100%;
140
+ height: 100%;
141
+
142
+ @media (min-width: 38em) {
143
+ background: radial-gradient(circle farthest-side at top right, rgba(46, 50, 51, 0) 0%, rgba(46, 50, 51, 0) 15.16%, rgba(46, 50, 51, 0.2) 27.66%, rgba(41, 54, 56, 0.55) 39.61%, rgba(35, 66, 71, 0.8) 49.78%, #005461 59.87%, #003039 100%);
144
+ }
145
+ }
108
146
 
109
147
  .u-wrap {
110
148
  @include padding-bottom('l-3xl');
@@ -179,6 +217,17 @@
179
217
  }
180
218
  }
181
219
 
220
+ .u-wrap {
221
+ &::before,
222
+ &::after {
223
+ display: none;
224
+
225
+ @media (min-width: 38em) {
226
+ display: inline;
227
+ }
228
+ }
229
+ }
230
+
182
231
  .c-hero {
183
232
  &__video-bg {
184
233
  width: 100%;
@@ -203,14 +252,15 @@
203
252
  }
204
253
  }
205
254
 
206
- &__button {
255
+ &__video-button-wrap {
207
256
  position: absolute;
208
257
  z-index: 2;
209
258
  right: 0;
210
259
  bottom: calc(56.25% / 2 - 25px);
211
260
  left: 0;
212
- background: rgba(black, 0.2);
213
261
  margin: 0 auto;
262
+ display: flex;
263
+ justify-content: center;
214
264
 
215
265
  @media (min-width: 38em) {
216
266
  position: absolute;
@@ -219,6 +269,21 @@
219
269
  bottom: unset;
220
270
  left: unset;
221
271
  }
272
+
273
+ .c-button {
274
+ position: relative;
275
+
276
+ &::before {
277
+ content: '';
278
+ position: absolute;
279
+ background: rgba(black, 0.2);
280
+ height: 100%;
281
+ width: 100%;
282
+ top: 0;
283
+ left: 0;
284
+ border-radius: inherit;
285
+ }
286
+ }
222
287
  }
223
288
  }
224
289
  }
@@ -250,10 +315,14 @@
250
315
 
251
316
  &__canvas {
252
317
  position: absolute;
253
- z-index: 1;
318
+ z-index: -1;
254
319
  height: 100%;
255
320
  width: 100%;
256
321
  left: 0;
257
322
  top: 0;
323
+
324
+ @media (min-width: 38em) {
325
+ z-index: 1;
326
+ }
258
327
  }
259
328
  }
@@ -17,7 +17,7 @@
17
17
 
18
18
  &__image {
19
19
  margin-bottom: 0;
20
- @include padding-right("s");
20
+ // @include padding-right("s");
21
21
  flex-shrink: 0;
22
22
  }
23
23
 
@@ -28,6 +28,7 @@
28
28
  &__wrapper {
29
29
  display: flex;
30
30
  flex-direction: column;
31
+ @include space('gap', 'xs-s');
31
32
  }
32
33
 
33
34
  .o-prose p {
@@ -2,7 +2,7 @@
2
2
 
3
3
  <footer class="mp c-footer" role="contentinfo">
4
4
  <nav class="c-footer__primary u-wrap" aria-label="Footer">
5
- <div class="o-grid o-grid--8/3-switch o-grid--push">
5
+ <div class="o-grid o-grid--8/3-switch o-grid--push o-grid--layout">
6
6
  <ol class="u-flow--xs u-margin-top-2xs">
7
7
  <li><h3>Quick links</h3></li>
8
8
  <li><a href="/brand/resources">Brand resources</a></li>
@@ -4,7 +4,7 @@ function HeroVideo() {
4
4
  if(typeof(videoBackground) != 'undefined' && videoBackground != null) {
5
5
  const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
6
6
  if(!reducedMotion || reducedMotion.matches) {
7
- videoBackground.classList.add('u-hidden');
7
+ videoBackground.pause();
8
8
  }
9
9
 
10
10
  const lightboxTrigger = document.getElementById('playVideo');
@@ -145,3 +145,8 @@
145
145
  display: none !important;
146
146
  }
147
147
  }
148
+
149
+ // Used to hide un-compiled Vue code - Do not remove
150
+ [v-cloak] {
151
+ display: none;
152
+ }