|
11 | 11 | // - spacing between the buttons and links is handled automatically, including |
12 | 12 | // when they wrap across multiple lines |
13 | 13 | .nhsuk-button-group { |
14 | | - $horizontal-gap: nhsuk-spacing(3); |
| 14 | + $horizontal-gap: nhsuk-spacing(4); |
15 | 15 | $vertical-gap: nhsuk-spacing(3); |
16 | 16 |
|
17 | 17 | // These need to be kept in sync with the button component's styles |
18 | 18 | $button-border-radius: $nhsuk-border-width-form-element * 2; |
19 | 19 | $button-shadow-size: $button-border-radius; |
| 20 | + $button-padding-top-bottom-mobile: 8px; |
| 21 | + $button-padding-top-bottom-desktop: 12px; |
20 | 22 |
|
21 | | - $link-spacing: nhsuk-spacing(1); |
| 23 | + $link-spacing: nhsuk-spacing(2); |
22 | 24 |
|
23 | 25 | // Flexbox is used to center-align links on mobile, align everything along |
24 | 26 | // the baseline on tablet and above, and to removes extra whitespace that |
|
32 | 34 | flex-direction: column; |
33 | 35 | align-items: center; |
34 | 36 |
|
35 | | - @include nhsuk-responsive-margin(5, "bottom", $adjustment: $vertical-gap * -1); |
| 37 | + @include nhsuk-responsive-margin(6, "bottom", $adjustment: $vertical-gap * -1); |
36 | 38 |
|
37 | 39 | // Give links within the button group the same font-size and line-height |
38 | 40 | // as buttons. |
|
42 | 44 | .nhsuk-link, |
43 | 45 | a:not(.nhsuk-button) { |
44 | 46 | display: inline-block; |
45 | | - margin-top: $link-spacing; |
46 | | - margin-bottom: $vertical-gap; |
| 47 | + // Prevent links overflowing their container in IE10/11 because of bug |
| 48 | + // with align-items: center |
| 49 | + max-width: 100%; |
| 50 | + margin-top: $button-padding-top-bottom-desktop + $nhsuk-border-width-form-element; |
| 51 | + margin-bottom: $button-padding-top-bottom-desktop + $nhsuk-border-width-form-element; |
| 52 | + text-align: center; |
47 | 53 | @include nhsuk-font($size: 19); |
| 54 | + |
| 55 | + @include nhsuk-media-query($until: tablet) { |
| 56 | + margin-top: $link-spacing; |
| 57 | + margin-bottom: $link-spacing + $vertical-gap; |
| 58 | + } |
48 | 59 | } |
49 | 60 |
|
50 | 61 | // Reduce the bottom margin to the size of the vertical gap (accommodating |
|
61 | 72 |
|
62 | 73 | flex-direction: row; |
63 | 74 | flex-wrap: wrap; |
64 | | - align-items: baseline; |
| 75 | + align-items: flex-start; |
65 | 76 |
|
66 | 77 | .nhsuk-button, |
67 | 78 | .nhsuk-link, |
|
0 commit comments