|
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; |
8 | 10 | }
|
9 | 11 |
|
10 | 12 | .govuk-details__summary {
|
11 | 13 | // Make the focus outline shrink-wrap the text content of the summary
|
12 | 14 | display: inline-block;
|
13 | 15 |
|
| 16 | + margin-top: govuk-spacing(3); |
| 17 | + |
14 | 18 | margin-bottom: govuk-spacing(1);
|
15 | 19 | }
|
16 | 20 |
|
| 21 | + .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 | + > :first-child { |
| 27 | + margin-top: 0; |
| 28 | + } |
| 29 | + |
| 30 | + > :only-child, |
| 31 | + > :last-child { |
| 32 | + margin-bottom: 0; |
| 33 | + } |
| 34 | + } |
| 35 | + |
17 | 36 | .govuk-details__text {
|
18 | 37 | padding-top: govuk-spacing(3);
|
19 | 38 | padding-bottom: govuk-spacing(3);
|
20 | 39 | padding-left: govuk-spacing(4);
|
21 |
| - border-left: $govuk-border-width solid $govuk-border-colour; |
22 | 40 | }
|
23 | 41 |
|
24 | 42 | .govuk-details__text p {
|
|
30 | 48 | margin-bottom: 0;
|
31 | 49 | }
|
32 | 50 |
|
33 |
| - // Fix for older browsers which: |
| 51 | + // We wrap styles for newer browsers in a feature query, which is ignored by |
| 52 | + // older browsers, which always expand the details element. |
| 53 | + // |
| 54 | + // Additionally, -ms-ime-align is only supported by Edge 12 - 18 |
| 55 | + // |
| 56 | + // This ensures we don't use these styles in browsers which: |
34 | 57 | // - support ES6 modules but not the <details> element (Edge 16 - 18)
|
35 | 58 | // - do not support ES6 modules or the <details> element (eg, IE8+)
|
36 |
| - // -ms-ime-align is only supported by Edge 12 - 18 |
37 |
| - // Older browsers ignore the entire feature query and use the styles above |
38 | 59 | @supports not (-ms-ime-align: auto) {
|
| 60 | + // Override default border |
| 61 | + .govuk-details { |
| 62 | + border-left: none; |
| 63 | + } |
| 64 | + |
39 | 65 | .govuk-details__summary {
|
40 | 66 |
|
41 | 67 | // Absolutely position the marker against this element
|
42 | 68 | position: relative;
|
43 | 69 |
|
| 70 | + // Override default top margin |
| 71 | + margin-top: 0; |
| 72 | + |
44 | 73 | // Allow for absolutely positioned marker and align with disclosed text
|
45 | 74 | padding-left: govuk-spacing(4) + $govuk-border-width;
|
46 | 75 |
|
|
59 | 88 | // ...but only underline the text, not the arrow
|
60 | 89 | .govuk-details__summary-text {
|
61 | 90 | @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; |
62 | 97 | }
|
63 | 98 |
|
64 | 99 | .govuk-details__summary:hover .govuk-details__summary-text {
|
|
93 | 128 | @include govuk-shape-arrow($direction: down, $base: 14px);
|
94 | 129 | }
|
95 | 130 | }
|
| 131 | + |
| 132 | + .govuk-details__text { |
| 133 | + border-left: $govuk-border-width solid $govuk-border-colour; |
| 134 | + } |
96 | 135 | }
|
97 | 136 | }
|
0 commit comments