|
3 | 3 |
|
4 | 4 | .app-card {
|
5 | 5 | &--aqua-green {
|
6 |
| - .nhsuk-card__heading--feature { |
7 |
| - background-color: nhsuk-colour("aqua-green"); |
| 6 | + background-color: nhsuk-tint(nhsuk-colour("aqua-green"), 80%); |
| 7 | + border-color: nhsuk-tint(nhsuk-colour("aqua-green"), 50%); |
| 8 | + color: nhsuk-shade(nhsuk-colour("aqua-green"), 50%); |
| 9 | + |
| 10 | + &.nhsuk-card__clickable:active { |
| 11 | + border-color: nhsuk-shade(nhsuk-colour("aqua-green"), 50%); |
8 | 12 | }
|
9 | 13 | }
|
10 | 14 |
|
11 |
| - &--dark-orange { |
12 |
| - .nhsuk-card__heading--feature { |
13 |
| - background-color: app.$dark-orange-colour; |
| 15 | + &--blue { |
| 16 | + background-color: nhsuk-tint(nhsuk-colour("blue"), 80%); |
| 17 | + border-color: nhsuk-tint(nhsuk-colour("blue"), 30%); |
| 18 | + color: nhsuk-shade(nhsuk-colour("blue"), 30%); |
| 19 | + |
| 20 | + &.nhsuk-card__clickable:active { |
| 21 | + border-color: nhsuk-shade(nhsuk-colour("blue"), 30%); |
14 | 22 | }
|
15 | 23 | }
|
16 | 24 |
|
17 | 25 | &--green {
|
18 |
| - .nhsuk-card__heading--feature { |
19 |
| - background-color: nhsuk-colour("green"); |
| 26 | + background-color: nhsuk-tint(nhsuk-colour("green"), 80%); |
| 27 | + border-color: nhsuk-tint(nhsuk-colour("green"), 40%); |
| 28 | + color: nhsuk-shade(nhsuk-colour("green"), 40%); |
| 29 | + |
| 30 | + &.nhsuk-card__clickable:active { |
| 31 | + border-color: nhsuk-shade(nhsuk-colour("green"), 40%); |
20 | 32 | }
|
21 | 33 | }
|
22 | 34 |
|
23 | 35 | &--grey {
|
24 |
| - .nhsuk-card__heading--feature { |
25 |
| - background-color: nhsuk-colour("grey-1"); |
26 |
| - } |
27 |
| - } |
| 36 | + background-color: nhsuk-tint(nhsuk-colour("grey-1"), 80%); |
| 37 | + border-color: nhsuk-tint(nhsuk-colour("grey-1"), 30%); |
| 38 | + color: nhsuk-shade(nhsuk-colour("grey-1"), 30%); |
28 | 39 |
|
29 |
| - &--purple { |
30 |
| - .nhsuk-card__heading--feature { |
31 |
| - background-color: nhsuk-colour("purple"); |
| 40 | + &.nhsuk-card__clickable:active { |
| 41 | + border-color: nhsuk-shade(nhsuk-colour("grey-1"), 30%); |
32 | 42 | }
|
33 | 43 | }
|
34 | 44 |
|
35 | 45 | &--red {
|
36 |
| - .nhsuk-card__heading--feature { |
37 |
| - background-color: nhsuk-colour("red"); |
| 46 | + background-color: nhsuk-tint(nhsuk-colour("red"), 80%); |
| 47 | + border-color: nhsuk-tint(nhsuk-colour("red"), 50%); |
| 48 | + color: nhsuk-shade(nhsuk-colour("red"), 50%); |
| 49 | + |
| 50 | + &.nhsuk-card__clickable:active { |
| 51 | + border-color: nhsuk-shade(nhsuk-colour("red"), 50%); |
38 | 52 | }
|
39 | 53 | }
|
40 | 54 |
|
41 |
| - &--reversed { |
42 |
| - background-color: nhsuk-colour("blue"); |
43 |
| - border-color: nhsuk-shade(nhsuk-colour("blue"), 25%); |
44 |
| - color: nhsuk-colour("white"); |
| 55 | + &--yellow { |
| 56 | + background-color: nhsuk-tint(nhsuk-colour("warm-yellow"), 80%); |
| 57 | + border-color: nhsuk-colour("warm-yellow"); |
45 | 58 |
|
46 |
| - &:active { |
47 |
| - border-color: nhsuk-shade(nhsuk-colour("blue"), 50%); |
| 59 | + .nhsuk-card__heading--feature { |
| 60 | + background-color: nhsuk-colour("warm-yellow"); |
| 61 | + color: $nhsuk-text-colour; |
| 62 | + } |
| 63 | + |
| 64 | + blockquote { |
| 65 | + border-color: nhsuk-colour("warm-yellow"); |
48 | 66 | }
|
| 67 | + } |
49 | 68 |
|
50 |
| - .nhsuk-card__link { |
51 |
| - @include nhsuk-link-style-white; |
| 69 | + &--aqua-green, |
| 70 | + &--blue, |
| 71 | + &--green, |
| 72 | + &--grey, |
| 73 | + &--red, |
| 74 | + &--yellow { |
| 75 | + .nhsuk-card__link, |
| 76 | + .nhsuk-card__link:hover { |
| 77 | + color: inherit; |
52 | 78 | }
|
53 | 79 | }
|
54 | 80 |
|
55 | 81 | &--offset {
|
56 | 82 | background-color: rgba(nhsuk-colour("grey-5"), 0.5);
|
57 | 83 | }
|
| 84 | +} |
58 | 85 |
|
59 |
| - &--data { |
60 |
| - display: flex; |
| 86 | +.app-card--compact { |
| 87 | + @include nhsuk-responsive-margin(3, "bottom"); |
61 | 88 |
|
62 |
| - .nhsuk-card__content { |
63 |
| - display: flex; |
64 |
| - flex-direction: column; |
65 |
| - flex-grow: 1; |
66 |
| - } |
| 89 | + .nhsuk-card__heading { |
| 90 | + @include nhsuk-responsive-margin(1, "bottom"); |
| 91 | + } |
67 | 92 |
|
68 |
| - .nhsuk-card__heading { |
69 |
| - @include nhsuk-typography-weight-normal; |
70 |
| - } |
| 93 | + .nhsuk-card__content { |
| 94 | + @include nhsuk-responsive-padding(4); |
| 95 | + @include nhsuk-responsive-padding(3, "bottom"); |
| 96 | + } |
| 97 | +} |
71 | 98 |
|
72 |
| - .nhsuk-card__description { |
73 |
| - margin-top: auto; |
| 99 | +.app-card--dense { |
| 100 | + @include nhsuk-responsive-margin(2, "bottom", $important: true); |
74 | 101 |
|
75 |
| - @include nhsuk-font-size(48); |
76 |
| - @include nhsuk-typography-weight-bold; |
77 |
| - } |
| 102 | + .nhsuk-card__heading { |
| 103 | + @include nhsuk-responsive-margin(1, "bottom"); |
| 104 | + } |
| 105 | + |
| 106 | + .nhsuk-card__content { |
| 107 | + @include nhsuk-responsive-padding(3); |
| 108 | + @include nhsuk-responsive-padding(2, "bottom"); |
78 | 109 | }
|
79 | 110 | }
|
80 | 111 |
|
81 |
| -.app-card--compact { |
82 |
| - @include nhsuk-responsive-margin(3, "bottom"); |
| 112 | +// Align counts across cards |
| 113 | +.nhsuk-card:has(> .nhsuk-card__content > .app-card__count) { |
| 114 | + display: flex; |
83 | 115 |
|
84 | 116 | .nhsuk-card__heading {
|
85 |
| - @include nhsuk-responsive-margin(1, "bottom"); |
| 117 | + line-height: 1.2; |
86 | 118 | }
|
87 | 119 |
|
88 | 120 | .nhsuk-card__content {
|
89 |
| - @include nhsuk-responsive-padding(4); |
90 |
| - @include nhsuk-responsive-padding(3, "bottom"); |
| 121 | + display: flex; |
| 122 | + flex: 1; |
| 123 | + flex-direction: column; |
| 124 | + justify-content: space-between; |
| 125 | + } |
| 126 | +} |
| 127 | + |
| 128 | +.app-card__count { |
| 129 | + @include nhsuk-font-size(48); |
| 130 | + @include nhsuk-typography-weight-bold; |
| 131 | + |
| 132 | + .app-card--dense & { |
| 133 | + @include nhsuk-font-size(26); |
| 134 | + } |
| 135 | +} |
| 136 | + |
| 137 | +.app-card__heading--xxs { |
| 138 | + @include nhsuk-font(16, $weight: bold); |
| 139 | +} |
| 140 | + |
| 141 | +.app-card__heading { |
| 142 | + &--aqua-green { |
| 143 | + background-color: nhsuk-colour("aqua-green"); |
| 144 | + } |
| 145 | + |
| 146 | + &--dark-orange { |
| 147 | + background-color: app.$dark-orange-colour; |
| 148 | + } |
| 149 | + |
| 150 | + &--green { |
| 151 | + background-color: nhsuk-colour("green"); |
| 152 | + } |
| 153 | + |
| 154 | + &--grey { |
| 155 | + background-color: nhsuk-colour("grey-1"); |
| 156 | + } |
| 157 | + |
| 158 | + &--purple { |
| 159 | + background-color: nhsuk-colour("purple"); |
| 160 | + } |
| 161 | + |
| 162 | + &--red { |
| 163 | + background-color: nhsuk-colour("red"); |
| 164 | + } |
| 165 | + |
| 166 | + &--warm-yellow { |
| 167 | + background-color: nhsuk-colour("warm-yellow"); |
| 168 | + color: $nhsuk-text-colour; |
91 | 169 | }
|
92 | 170 | }
|
0 commit comments