dxw_govuk_frontend_rails 3.8.0 → 3.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +61 -40
  4. data/lib/dxw_govuk_frontend_rails/version.rb +1 -1
  5. data/package-lock.json +22 -4
  6. data/package.json +1 -1
  7. data/vendor/assets/javascripts/govuk_frontend_rails.js +84 -33
  8. data/vendor/assets/stylesheets/components/_all.scss +2 -0
  9. data/vendor/assets/stylesheets/components/accordion/_index.scss +7 -17
  10. data/vendor/assets/stylesheets/components/back-link/_index.scss +4 -17
  11. data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +0 -1
  12. data/vendor/assets/stylesheets/components/button/_index.scss +5 -3
  13. data/vendor/assets/stylesheets/components/character-count/_index.scss +1 -4
  14. data/vendor/assets/stylesheets/components/checkboxes/_index.scss +13 -13
  15. data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.scss +2 -0
  16. data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +51 -0
  17. data/vendor/assets/stylesheets/components/details/_index.scss +5 -2
  18. data/vendor/assets/stylesheets/components/error-summary/_index.scss +2 -14
  19. data/vendor/assets/stylesheets/components/fieldset/_index.scss +1 -1
  20. data/vendor/assets/stylesheets/components/file-upload/_index.scss +13 -14
  21. data/vendor/assets/stylesheets/components/footer/_index.scss +14 -20
  22. data/vendor/assets/stylesheets/components/header/_index.scss +41 -26
  23. data/vendor/assets/stylesheets/components/hint/_index.scss +0 -2
  24. data/vendor/assets/stylesheets/components/input/_index.scss +91 -0
  25. data/vendor/assets/stylesheets/components/notification-banner/_index.scss +89 -0
  26. data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss +2 -0
  27. data/vendor/assets/stylesheets/components/panel/_index.scss +6 -2
  28. data/vendor/assets/stylesheets/components/phase-banner/_index.scss +1 -1
  29. data/vendor/assets/stylesheets/components/radios/_index.scss +13 -13
  30. data/vendor/assets/stylesheets/components/select/_index.scss +0 -1
  31. data/vendor/assets/stylesheets/components/skip-link/_index.scss +1 -1
  32. data/vendor/assets/stylesheets/components/summary-list/_index.scss +2 -10
  33. data/vendor/assets/stylesheets/components/table/_index.scss +21 -0
  34. data/vendor/assets/stylesheets/components/tabs/_index.scss +4 -12
  35. data/vendor/assets/stylesheets/components/tag/_index.scss +0 -1
  36. data/vendor/assets/stylesheets/components/textarea/_index.scss +0 -1
  37. data/vendor/assets/stylesheets/components/warning-text/_index.scss +10 -1
  38. data/vendor/assets/stylesheets/core/_links.scss +8 -0
  39. data/vendor/assets/stylesheets/helpers/_device-pixels.scss +3 -3
  40. data/vendor/assets/stylesheets/helpers/_font-faces.scss +9 -11
  41. data/vendor/assets/stylesheets/helpers/_links.scss +239 -32
  42. data/vendor/assets/stylesheets/helpers/_media-queries.scss +1 -5
  43. data/vendor/assets/stylesheets/helpers/_spacing.scss +2 -1
  44. data/vendor/assets/stylesheets/helpers/_typography.scss +7 -6
  45. data/vendor/assets/stylesheets/objects/_all.scss +1 -0
  46. data/vendor/assets/stylesheets/objects/_button-group.scss +94 -0
  47. data/vendor/assets/stylesheets/objects/_form-group.scss +0 -1
  48. data/vendor/assets/stylesheets/objects/_grid.scss +2 -3
  49. data/vendor/assets/stylesheets/objects/_main-wrapper.scss +0 -1
  50. data/vendor/assets/stylesheets/overrides/_display.scss +1 -1
  51. data/vendor/assets/stylesheets/overrides/_width.scss +1 -0
  52. data/vendor/assets/stylesheets/settings/_all.scss +2 -0
  53. data/vendor/assets/stylesheets/settings/_colours-applied.scss +9 -3
  54. data/vendor/assets/stylesheets/settings/_colours-organisations.scss +3 -0
  55. data/vendor/assets/stylesheets/settings/_colours-palette.scss +42 -35
  56. data/vendor/assets/stylesheets/settings/_compatibility.scss +0 -1
  57. data/vendor/assets/stylesheets/settings/_links.scss +62 -0
  58. data/vendor/assets/stylesheets/settings/_measurements.scss +0 -4
  59. data/vendor/assets/stylesheets/settings/_typography-font-families.scss +2 -2
  60. data/vendor/assets/stylesheets/settings/_typography-font.scss +14 -5
  61. data/vendor/assets/stylesheets/settings/_typography-responsive.scss +6 -2
  62. data/vendor/assets/stylesheets/tools/_font-url.scss +0 -3
  63. data/vendor/assets/stylesheets/tools/_image-url.scss +0 -3
  64. data/vendor/assets/stylesheets/utilities/_visually-hidden.scss +0 -1
  65. data/vendor/assets/stylesheets/vendor/_sass-mq.scss +0 -4
  66. metadata +9 -3
@@ -0,0 +1,51 @@
1
+ @include govuk-exports("govuk/component/cookie-banner") {
2
+
3
+ // This needs to be kept in sync with the header component's styles
4
+ $border-bottom-width: govuk-spacing(2);
5
+
6
+ .govuk-cookie-banner {
7
+ @include govuk-font($size: 19);
8
+
9
+ padding-top: govuk-spacing(4);
10
+ // The component does not set bottom spacing.
11
+ // The bottom spacing should be created by the items inside the component.
12
+
13
+ // Visually separate the cookie banner from content underneath
14
+ // when user changes colours in their browser.
15
+ border-bottom: $border-bottom-width solid transparent;
16
+
17
+ background-color: govuk-colour("light-grey", $legacy: "grey-3");
18
+ }
19
+
20
+ // Support older browsers which don't hide elements with the `hidden` attribute
21
+ // when user hides the whole cookie banner with a 'Hide' button.
22
+ .govuk-cookie-banner[hidden] {
23
+ display: none;
24
+ }
25
+
26
+ .govuk-cookie-banner__message {
27
+ // Remove the extra height added by the separator border.
28
+ margin-bottom: -$border-bottom-width;
29
+
30
+ &[hidden] {
31
+ // Support older browsers which don't hide elements with the `hidden` attribute
32
+ // when the visibility of cookie and replacement messages is toggled.
33
+ display: none;
34
+ }
35
+
36
+ &:focus {
37
+ // Remove the native visible focus indicator when the element is programmatically focused.
38
+ //
39
+ // The focused cookie banner is the first element on the page and the last thing the user
40
+ // interacted with prior to it gaining focus.
41
+ // We therefore assume that moving focus to it is not going to surprise users, and that giving
42
+ // it a visible focus indicator could be more confusing than helpful, especially as the
43
+ // element is not normally keyboard operable.
44
+ //
45
+ // We have flagged this in the research section of the guidance as something to monitor.
46
+ //
47
+ // A related discussion: https://github.com/w3c/wcag/issues/1001
48
+ outline: none;
49
+ }
50
+ }
51
+ }
@@ -1,5 +1,4 @@
1
1
  @include govuk-exports("govuk/component/details") {
2
-
3
2
  .govuk-details {
4
3
  @include govuk-font($size: 19);
5
4
  @include govuk-text-colour;
@@ -35,7 +34,11 @@
35
34
 
36
35
  // ...but only underline the text, not the arrow
37
36
  .govuk-details__summary-text {
38
- text-decoration: underline;
37
+ @include govuk-link-decoration;
38
+ }
39
+
40
+ .govuk-details__summary:hover .govuk-details__summary-text {
41
+ @include govuk-link-hover-decoration;
39
42
  }
40
43
 
41
44
  // Remove the underline when focussed to avoid duplicate borders
@@ -1,7 +1,6 @@
1
1
  @import "../../core/lists";
2
2
 
3
3
  @include govuk-exports("govuk/component/error-summary") {
4
-
5
4
  .govuk-error-summary {
6
5
  @include govuk-text-colour;
7
6
  @include govuk-responsive-padding(4);
@@ -38,18 +37,7 @@
38
37
 
39
38
  .govuk-error-summary__list a {
40
39
  @include govuk-typography-weight-bold;
41
-
42
- // Override default link styling to use error colour
43
- &:link,
44
- &:visited,
45
- &:hover,
46
- &:active {
47
- color: $govuk-error-colour;
48
- }
49
-
50
- &:focus {
51
- @include govuk-focused-text;
52
- }
40
+ @include govuk-link-common;
41
+ @include govuk-link-style-error;
53
42
  }
54
-
55
43
  }
@@ -11,7 +11,7 @@
11
11
  // https://bugzilla.mozilla.org/show_bug.cgi?id=504622
12
12
  @supports not (caret-color: auto) {
13
13
  .govuk-fieldset,
14
- x:-moz-any-link {
14
+ x:-moz-any-link { // stylelint-disable-line selector-type-no-unknown
15
15
  display: table-cell;
16
16
  }
17
17
  }
@@ -8,17 +8,21 @@
8
8
  .govuk-file-upload {
9
9
  @include govuk-font($size: 19);
10
10
  @include govuk-text-colour;
11
- padding-top: $component-padding;
12
- padding-bottom: $component-padding;
11
+ margin-left: -$component-padding;
12
+ padding: $component-padding;
13
+
14
+ // The default file upload button in Safari does not
15
+ // support setting a custom font-size. Set `-webkit-appearance`
16
+ // to `button` to drop out of the native appearance so the
17
+ // font-size is set to 19px
18
+ // https://bugs.webkit.org/show_bug.cgi?id=224746
19
+ &::-webkit-file-upload-button {
20
+ -webkit-appearance: button;
21
+ color: inherit;
22
+ font: inherit;
23
+ }
13
24
 
14
25
  &:focus {
15
- // "Yank" the padding with negative margin to avoid a jump
16
- // when element is focused
17
- margin-right: -$component-padding;
18
- margin-left: -$component-padding;
19
- padding-right: $component-padding;
20
- padding-left: $component-padding;
21
-
22
26
  outline: $govuk-focus-width solid $govuk-focus-colour;
23
27
  // Use `box-shadow` to add border instead of changing `border-width`
24
28
  // (which changes element size) and since `outline` is already used for the
@@ -37,11 +41,6 @@
37
41
  // to recognise `focus-within` and don't set any styles from the block
38
42
  // when it's a selector.
39
43
  &:focus-within {
40
- margin-right: -$component-padding;
41
- margin-left: -$component-padding;
42
- padding-right: $component-padding;
43
- padding-left: $component-padding;
44
-
45
44
  outline: $govuk-focus-width solid $govuk-focus-colour;
46
45
 
47
46
  box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
@@ -6,18 +6,13 @@
6
6
  // as it'll just be the same as $govuk-footer-border.
7
7
  $govuk-footer-border-top: $govuk-border-colour;
8
8
  $govuk-footer-text: $govuk-text-colour;
9
- $govuk-footer-link: $govuk-footer-text;
10
- $govuk-footer-link-hover: false;
9
+ $govuk-footer-link-hover-colour: null; // Only used with the legacy palette
11
10
 
12
11
  @if ($govuk-use-legacy-palette) {
13
- // sass-lint:disable no-color-literals
14
12
  $govuk-footer-border-top: #a1acb2;
15
13
  $govuk-footer-border: govuk-colour("grey-2");
16
14
  $govuk-footer-text: #454a4c;
17
- $govuk-footer-link: $govuk-footer-text;
18
-
19
- // Only used with the legacy palette
20
- $govuk-footer-link-hover: #171819;
15
+ $govuk-footer-link-hover-colour: #171819;
21
16
  }
22
17
 
23
18
  // Based on the govuk-crest-2x.png image dimensions.
@@ -38,27 +33,20 @@
38
33
  }
39
34
 
40
35
  .govuk-footer__link {
36
+ @include govuk-link-common;
37
+
41
38
  @if ($govuk-use-legacy-palette) {
42
39
  &:link,
43
40
  &:visited {
44
- color: $govuk-footer-link;
41
+ color: $govuk-footer-text;
45
42
  }
46
43
 
47
44
  &:hover,
48
45
  &:active {
49
- color: $govuk-footer-link-hover;
46
+ color: $govuk-footer-link-hover-colour;
50
47
  }
51
48
  } @else {
52
- &:link,
53
- &:visited,
54
- &:hover,
55
- &:active {
56
- color: $govuk-footer-link;
57
- }
58
- }
59
-
60
- &:focus {
61
- @include govuk-focused-text;
49
+ @include govuk-link-style-text;
62
50
  }
63
51
 
64
52
  // alphagov/govuk_template includes a specific a:link:focus selector
@@ -135,7 +123,6 @@
135
123
  background-position: 50% 0%;
136
124
  background-size: $govuk-footer-crest-image-width $govuk-footer-crest-image-height;
137
125
  text-align: center;
138
- text-decoration: none;
139
126
  white-space: nowrap;
140
127
  }
141
128
 
@@ -211,6 +198,13 @@
211
198
  list-style: none;
212
199
  -webkit-column-gap: $govuk-gutter;
213
200
  column-gap: $govuk-gutter; // Support: Columns
201
+
202
+ // Disable thicker underlines on hover because of a bug in Chromium
203
+ // affecting links within columns
204
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1190987
205
+ .govuk-footer__link:hover {
206
+ text-decoration-thickness: auto;
207
+ }
214
208
  }
215
209
 
216
210
  @include govuk-media-query ($from: desktop) {
@@ -4,10 +4,9 @@
4
4
  $govuk-header-border-color: $govuk-brand-colour;
5
5
  $govuk-header-border-width: govuk-spacing(2);
6
6
  $govuk-header-text: govuk-colour("white");
7
- $govuk-header-link: govuk-colour("white");
8
- $govuk-header-link-hover: govuk-colour("white");
9
7
  $govuk-header-link-active: #1d8feb;
10
8
  $govuk-header-nav-item-border-color: #2e3133;
9
+ $govuk-header-link-underline-thickness: 3px;
11
10
 
12
11
  .govuk-header {
13
12
  @include govuk-font($size: 16);
@@ -15,7 +14,6 @@
15
14
  border-bottom: govuk-spacing(2) solid govuk-colour("white");
16
15
  color: $govuk-header-text;
17
16
  background: $govuk-header-background;
18
-
19
17
  }
20
18
 
21
19
  .govuk-header__container--full-width {
@@ -37,7 +35,19 @@
37
35
 
38
36
  .govuk-header__logotype {
39
37
  display: inline-block;
38
+
39
+ // Add a gap between logo and any product name
40
40
  margin-right: govuk-spacing(1);
41
+
42
+ // Prevent readability backplate from obscuring underline in Windows
43
+ // High Contrast Mode
44
+ forced-color-adjust: none;
45
+
46
+ // But remove it if there's nothing after the logo to keep hover and focus
47
+ // states neat
48
+ &:last-child {
49
+ margin-right: 0;
50
+ }
41
51
  }
42
52
 
43
53
  .govuk-header__logotype-crown {
@@ -58,33 +68,33 @@
58
68
  .govuk-header__product-name {
59
69
  @include govuk-font($size: 24, $line-height: 1);
60
70
  display: inline-table;
61
- padding-right: govuk-spacing(2);
62
71
  }
63
72
 
64
73
  .govuk-header__link {
65
- text-decoration: none;
74
+ // Avoid using the `govuk-link-common` mixin because the links in the header
75
+ // get a special treatment, because:
76
+ //
77
+ // - underlines are only visible on hover
78
+ // - all links get a 3px underline regardless of text size, as there are
79
+ // multiple grouped elements close to one another and having slightly
80
+ // different underline widths looks unbalanced
81
+ @include govuk-typography-common;
82
+ @include govuk-link-style-inverse;
66
83
 
67
- &:link,
68
- &:visited {
69
- color: $govuk-header-link;
70
- }
84
+ text-decoration: none;
71
85
 
72
86
  &:hover {
73
87
  text-decoration: underline;
88
+ text-decoration-thickness: $govuk-header-link-underline-thickness;
89
+
90
+ @if ($govuk-link-underline-offset) {
91
+ text-underline-offset: $govuk-link-underline-offset;
92
+ }
74
93
  }
75
94
 
76
95
  &:focus {
77
96
  @include govuk-focused-text;
78
97
  }
79
-
80
- // alphagov/govuk_template includes a specific a:link:focus selector
81
- // designed to make unvisited links a slightly darker blue when focussed, so
82
- // we need to override the text colour for that combination of selectors.
83
- @include govuk-compatibility(govuk_template) {
84
- &:link:focus {
85
- @include govuk-text-colour;
86
- }
87
- }
88
98
  }
89
99
 
90
100
  .govuk-header__link--homepage {
@@ -93,6 +103,7 @@
93
103
  @include govuk-font($size: false, $weight: bold);
94
104
 
95
105
  display: inline-block;
106
+ margin-right: govuk-spacing(2);
96
107
  font-size: 30px; // We don't have a mixin that produces 30px font size
97
108
  line-height: 1;
98
109
 
@@ -104,10 +115,10 @@
104
115
  &:hover,
105
116
  &:active {
106
117
  // Negate the added border
107
- margin-bottom: -1px;
118
+ margin-bottom: $govuk-header-link-underline-thickness * -1;
108
119
  // Omitting colour will use default value of currentColor – if we
109
120
  // specified currentColor explicitly IE8 would ignore this rule.
110
- border-bottom: 1px solid;
121
+ border-bottom: $govuk-header-link-underline-thickness solid;
111
122
  }
112
123
 
113
124
  // Remove any borders that show when focused and hovered.
@@ -157,18 +168,24 @@
157
168
  margin: 0;
158
169
  padding: 0;
159
170
  border: 0;
160
- color: $govuk-header-link;
171
+ color: govuk-colour("white");
161
172
  background: none;
173
+ cursor: pointer;
162
174
 
163
175
  &:hover {
164
- text-decoration: underline;
176
+ -webkit-text-decoration: solid underline $govuk-header-link-underline-thickness;
177
+ text-decoration: solid underline $govuk-header-link-underline-thickness;
178
+
179
+ @if ($govuk-link-underline-offset) {
180
+ text-underline-offset: $govuk-link-underline-offset;
181
+ }
165
182
  }
166
183
 
167
184
  &:focus {
168
185
  @include govuk-focused-text;
169
186
  }
170
187
 
171
- &::after {
188
+ &:after {
172
189
  @include govuk-shape-arrow($direction: down, $base: 10px, $display: inline-block);
173
190
  content: "";
174
191
  margin-left: govuk-spacing(1);
@@ -180,7 +197,7 @@
180
197
  }
181
198
 
182
199
  .govuk-header__menu-button--open {
183
- &::after {
200
+ &:after {
184
201
  @include govuk-shape-arrow($direction: up, $base: 10px, $display: inline-block);
185
202
  }
186
203
  }
@@ -213,7 +230,6 @@
213
230
  }
214
231
  }
215
232
 
216
-
217
233
  .govuk-header__navigation--end {
218
234
  @include govuk-media-query ($from: desktop) {
219
235
  margin: 0;
@@ -308,5 +324,4 @@
308
324
  }
309
325
  // End adjustments
310
326
  }
311
-
312
327
  }
@@ -38,8 +38,6 @@
38
38
  }
39
39
 
40
40
  // Reduces visual spacing of legend when there is a hint
41
-
42
- .govuk-fieldset__legend + .govuk-hint,
43
41
  .govuk-fieldset__legend + .govuk-hint {
44
42
  margin-top: -(govuk-spacing(1));
45
43
  }
@@ -93,4 +93,95 @@
93
93
  max-width: 5.4ex;
94
94
  }
95
95
 
96
+ .govuk-input__wrapper {
97
+ display: -webkit-box;
98
+ display: -ms-flexbox;
99
+ display: flex;
100
+
101
+ .govuk-input {
102
+ -webkit-box-flex: 0;
103
+ -ms-flex: 0 1 auto;
104
+ flex: 0 1 auto;
105
+ }
106
+
107
+ .govuk-input:focus {
108
+ // Hack to stop focus style being overlapped by the suffix
109
+ z-index: 1;
110
+ }
111
+
112
+ // Split prefix/suffix onto separate lines on narrow screens
113
+ @include govuk-media-query($until: mobile) {
114
+ display: block;
115
+
116
+ .govuk-input {
117
+ // Set max-width to override potential width override class on the input
118
+ max-width: 100%;
119
+ }
120
+ }
121
+ }
122
+
123
+ .govuk-input__prefix,
124
+ .govuk-input__suffix {
125
+ @include govuk-font($size: 19);
126
+
127
+ box-sizing: border-box;
128
+ display: inline-block;
129
+ min-width: 40px;
130
+ @if $govuk-typography-use-rem {
131
+ min-width: govuk-px-to-rem(40px);
132
+ }
133
+ height: 40px;
134
+ @if $govuk-typography-use-rem {
135
+ height: govuk-px-to-rem(40px);
136
+ }
137
+
138
+ padding: govuk-spacing(1);
139
+ border: $govuk-border-width-form-element solid $govuk-input-border-colour;
140
+ background-color: govuk-colour("light-grey", $legacy: "grey-3");
141
+
142
+ text-align: center;
143
+ @include govuk-media-query($until: tablet) {
144
+ line-height: 1.6;
145
+ }
146
+ white-space: nowrap;
147
+
148
+ // Emphasise non-editable status of prefixes and suffixes
149
+ cursor: default;
150
+
151
+ -webkit-box-flex: 0;
152
+
153
+ -ms-flex: 0 0 auto;
154
+
155
+ flex: 0 0 auto;
156
+
157
+ // Split prefix/suffix onto separate lines on narrow screens
158
+ @include govuk-media-query($until: mobile) {
159
+ display: block;
160
+ height: 100%;
161
+ white-space: normal;
162
+ }
163
+ }
164
+
165
+ .govuk-input__prefix {
166
+ @include govuk-media-query($until: mobile) {
167
+ border-bottom: 0;
168
+ }
169
+ @include govuk-media-query($from: mobile) {
170
+ @include govuk-not-ie8 {
171
+ border-right: 0;
172
+ }
173
+ }
174
+ }
175
+
176
+ // Split prefix/suffix onto separate lines on narrow screens
177
+ .govuk-input__suffix {
178
+ @include govuk-media-query($until: mobile) {
179
+ border-top: 0;
180
+ }
181
+ @include govuk-media-query($from: mobile) {
182
+ @include govuk-not-ie8 {
183
+ border-left: 0;
184
+ }
185
+ }
186
+ }
96
187
  }
@@ -0,0 +1,89 @@
1
+ @include govuk-exports("govuk/component/notification-banner") {
2
+ .govuk-notification-banner {
3
+ @include govuk-font($size: 19);
4
+ @include govuk-responsive-margin(8, "bottom");
5
+
6
+ border: $govuk-border-width solid $govuk-brand-colour;
7
+
8
+ background-color: $govuk-brand-colour;
9
+
10
+ &:focus {
11
+ outline: $govuk-focus-width solid $govuk-focus-colour;
12
+ }
13
+ }
14
+
15
+ .govuk-notification-banner__header {
16
+ padding: 2px govuk-spacing(3) govuk-spacing(1);
17
+
18
+ // Ensures the notification header appears separate to the notification body text in high contrast mode
19
+ border-bottom: 1px solid transparent;
20
+
21
+ @include govuk-media-query($from: tablet) {
22
+ padding: 2px govuk-spacing(4) govuk-spacing(1);
23
+ }
24
+ }
25
+
26
+ .govuk-notification-banner__title {
27
+ @include govuk-font($size: 19, $weight: bold);
28
+
29
+ margin: 0;
30
+
31
+ padding: 0;
32
+
33
+ color: govuk-colour("white");
34
+ }
35
+
36
+ .govuk-notification-banner__content {
37
+ $padding-tablet: govuk-spacing(4);
38
+ @include govuk-text-colour;
39
+ padding: govuk-spacing(3);
40
+
41
+ background-color: $govuk-body-background-colour;
42
+
43
+ @include govuk-media-query($from: tablet) {
44
+ padding: $padding-tablet;
45
+ }
46
+
47
+ // Wrap content at the same place that a 2/3 grid column ends, to maintain
48
+ // shorter line-lengths when the notification banner is full width
49
+ > * {
50
+ // When elements have their own padding (like lists), include the padding
51
+ // in the max-width calculation
52
+ box-sizing: border-box;
53
+
54
+ // Calculate the internal width of a two-thirds column...
55
+ $two-col-width: ($govuk-page-width * 2 / 3) - ($govuk-gutter * 1 / 3);
56
+
57
+ // ...and then factor in the left border and padding
58
+ $banner-exterior: ($padding-tablet + $govuk-border-width);
59
+ max-width: $two-col-width - $banner-exterior;
60
+ }
61
+
62
+ > :last-child {
63
+ margin-bottom: 0;
64
+ }
65
+ }
66
+
67
+ .govuk-notification-banner__heading {
68
+ @include govuk-font($size: 24, $weight: bold);
69
+
70
+ margin: 0 0 govuk-spacing(3) 0;
71
+
72
+ padding: 0;
73
+ }
74
+
75
+ .govuk-notification-banner__link {
76
+ @include govuk-link-common;
77
+ @include govuk-link-style-no-visited-state;
78
+ }
79
+
80
+ .govuk-notification-banner--success {
81
+ border-color: $govuk-success-colour;
82
+
83
+ background-color: $govuk-success-colour;
84
+
85
+ .govuk-notification-banner__link {
86
+ @include govuk-link-style-success;
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -1,5 +1,4 @@
1
1
  @include govuk-exports("govuk/component/panel") {
2
-
3
2
  .govuk-panel {
4
3
  @include govuk-font($size: 19);
5
4
 
@@ -20,6 +19,12 @@
20
19
  .govuk-panel--confirmation {
21
20
  color: govuk-colour("white");
22
21
  background: govuk-colour("green", $legacy: "turquoise");
22
+
23
+ @include govuk-media-query($media-type: print) {
24
+ border-color: currentColor;
25
+ color: $govuk-print-text-colour;
26
+ background: none;
27
+ }
23
28
  }
24
29
 
25
30
  .govuk-panel__title {
@@ -36,5 +41,4 @@
36
41
  .govuk-panel__body {
37
42
  @include govuk-font($size: 36);
38
43
  }
39
-
40
44
  }
@@ -22,6 +22,6 @@
22
22
 
23
23
  .govuk-phase-banner__text {
24
24
  display: table-cell;
25
- vertical-align: baseline;
25
+ vertical-align: middle;
26
26
  }
27
27
  }