|
5 | 5 | @include govuk-responsive-margin(6, "bottom");
|
6 | 6 |
|
7 | 7 | display: block;
|
8 |
| - |
9 |
| - border-left: $govuk-border-width-wide solid $govuk-border-colour; |
10 | 8 | }
|
11 | 9 |
|
12 | 10 | .govuk-details__summary {
|
13 | 11 | // Make the focus outline shrink-wrap the text content of the summary
|
14 | 12 | display: inline-block;
|
15 | 13 |
|
16 |
| - margin-top: govuk-spacing(3); |
17 |
| - |
18 | 14 | margin-bottom: govuk-spacing(1);
|
19 | 15 | }
|
20 | 16 |
|
21 | 17 | .govuk-details__summary-text {
|
22 |
| - @include govuk-typography-weight-bold; |
23 |
| - @include govuk-responsive-margin(4, "bottom"); |
24 |
| - padding-left: govuk-spacing(4); |
25 |
| - |
26 | 18 | > :first-child {
|
27 | 19 | margin-top: 0;
|
28 | 20 | }
|
|
48 | 40 | margin-bottom: 0;
|
49 | 41 | }
|
50 | 42 |
|
| 43 | + // Hack to target IE8 - IE11 (and REALLY old Firefox) |
| 44 | + // These browsers don't support the details element, so fall back to looking |
| 45 | + // like inset text |
| 46 | + @media screen\0 { |
| 47 | + .govuk-details { |
| 48 | + border-left: $govuk-border-width-wide solid $govuk-border-colour; |
| 49 | + } |
| 50 | + |
| 51 | + .govuk-details__summary { |
| 52 | + margin-top: govuk-spacing(3); |
| 53 | + } |
| 54 | + |
| 55 | + .govuk-details__summary-text { |
| 56 | + @include govuk-typography-weight-bold; |
| 57 | + @include govuk-responsive-margin(4, "bottom"); |
| 58 | + padding-left: govuk-spacing(4); |
| 59 | + } |
| 60 | + } |
| 61 | + |
51 | 62 | // We wrap styles for newer browsers in a feature query, which is ignored by
|
52 | 63 | // older browsers, which always expand the details element.
|
53 | 64 | //
|
|
57 | 68 | // - support ES6 modules but not the <details> element (Edge 16 - 18)
|
58 | 69 | // - do not support ES6 modules or the <details> element (eg, IE8+)
|
59 | 70 | @supports not (-ms-ime-align: auto) {
|
60 |
| - // Override default border |
61 |
| - .govuk-details { |
62 |
| - border-left: none; |
63 |
| - } |
64 |
| - |
65 | 71 | .govuk-details__summary {
|
66 | 72 |
|
67 | 73 | // Absolutely position the marker against this element
|
68 | 74 | position: relative;
|
69 | 75 |
|
70 |
| - // Override default top margin |
71 |
| - margin-top: 0; |
72 |
| - |
73 | 76 | // Allow for absolutely positioned marker and align with disclosed text
|
74 | 77 | padding-left: govuk-spacing(4) + $govuk-border-width;
|
75 | 78 |
|
|
88 | 91 | // ...but only underline the text, not the arrow
|
89 | 92 | .govuk-details__summary-text {
|
90 | 93 | @include govuk-link-decoration;
|
91 |
| - // Override default font weight |
92 |
| - @include govuk-typography-weight-regular; |
93 |
| - // Override default margin |
94 |
| - margin-bottom: 0; |
95 |
| - // Override default padding |
96 |
| - padding-left: 0; |
97 | 94 | }
|
98 | 95 |
|
99 | 96 | .govuk-details__summary:hover .govuk-details__summary-text {
|
|
0 commit comments