|
169 | 169 |
|
170 | 170 | /* GOV.UK Button Styles - Scoped to our component with high specificity */
|
171 | 171 | .app-masthead .govuk-button.govuk-button {
|
| 172 | + /* @include govuk-font($size: 19, $line-height: 19px); */ |
172 | 173 | font-family: "GDS Transport", arial, sans-serif;
|
173 | 174 | font-weight: 400;
|
174 |
| - font-size: 1rem; |
175 |
| - line-height: 1.1875; |
| 175 | + font-size: 1.1875rem; /* 19px */ |
| 176 | + line-height: 1.1875; /* 19px line height */ |
176 | 177 | box-sizing: border-box;
|
177 | 178 | display: inline-block;
|
178 | 179 | position: relative;
|
179 | 180 | width: 100%;
|
180 | 181 | margin-top: 0;
|
181 | 182 | margin-right: 0;
|
182 | 183 | margin-left: 0;
|
183 |
| - margin-bottom: 1.375rem; |
184 |
| - padding: 0.5rem 0.625rem 0.4375rem; |
185 |
| - border: 0.125rem solid transparent; |
| 184 | + margin-bottom: 1.375rem; /* 22px - adjusted for shadow */ |
| 185 | + /* Padding calculation: govuk-spacing(2) - border-width - shadow adjustment */ |
| 186 | + padding: 0.4375rem 0.625rem 0.3125rem; /* 7px 10px 5px */ |
| 187 | + border: 0.125rem solid transparent; /* 2px border */ |
186 | 188 | border-radius: 0;
|
187 |
| - color: #ffffff; |
188 |
| - background-color: #00703c; |
189 |
| - box-shadow: 0 0.125rem 0 #002d18; |
| 189 | + color: #ffffff; /* $govuk-button-text-colour */ |
| 190 | + background-color: #00703c; /* $govuk-button-colour (green) */ |
| 191 | + box-shadow: 0 0.125rem 0 #002d18; /* 2px shadow */ |
190 | 192 | text-align: center;
|
191 | 193 | vertical-align: top;
|
192 | 194 | cursor: pointer;
|
193 | 195 | text-decoration: none;
|
| 196 | + -webkit-appearance: none; |
194 | 197 | }
|
195 | 198 |
|
196 | 199 | @media (min-width: 40.0625em) {
|
|
200 | 203 | }
|
201 | 204 | }
|
202 | 205 |
|
| 206 | + /* Link states for buttons */ |
| 207 | + .app-masthead .govuk-button.govuk-button:link, |
| 208 | + .app-masthead .govuk-button.govuk-button:visited, |
| 209 | + .app-masthead .govuk-button.govuk-button:active { |
| 210 | + color: #ffffff; |
| 211 | + text-decoration: none; |
| 212 | + } |
| 213 | +
|
203 | 214 | .app-masthead .govuk-button.govuk-button:hover {
|
204 |
| - background-color: #005a30; |
205 |
| - box-shadow: 0 0.25rem 0 #002d18; |
| 215 | + background-color: #005a30; /* $govuk-button-hover-colour */ |
| 216 | + box-shadow: 0 0.25rem 0 #002d18; /* 4px shadow on hover */ |
| 217 | + color: #ffffff; |
| 218 | + text-decoration: none; |
206 | 219 | }
|
207 | 220 |
|
208 | 221 | .app-masthead .govuk-button.govuk-button:active {
|
209 |
| - top: 0.125rem; |
210 |
| - box-shadow: 0 0 0 #002d18; |
| 222 | + top: 0.125rem; /* 2px - button pressed down */ |
| 223 | + box-shadow: 0 0 0 #002d18; /* No shadow when pressed */ |
211 | 224 | }
|
212 | 225 |
|
213 |
| - .app-masthead .govuk-button.govuk-button--inverse { |
214 |
| - background-color: #ffffff; |
| 226 | + .app-masthead .govuk-button.govuk-button:focus { |
| 227 | + border-color: #ffdd00; /* $govuk-focus-colour */ |
| 228 | + outline: 0.1875rem solid transparent; /* 3px */ |
| 229 | + box-shadow: inset 0 0 0 1px #ffdd00; |
| 230 | + } |
| 231 | +
|
| 232 | + .app-masthead .govuk-button.govuk-button:focus:not(:active):not(:hover) { |
| 233 | + border-color: #ffdd00; |
| 234 | + color: #0b0c0c; /* $govuk-focus-text-colour */ |
| 235 | + background-color: #ffdd00; |
215 | 236 | box-shadow: 0 0.125rem 0 #0b0c0c;
|
216 |
| - color: #0b0c0c; |
| 237 | + } |
| 238 | +
|
| 239 | + /* Inverse button styles - white button with blue text */ |
| 240 | + .app-masthead .govuk-button.govuk-button--inverse { |
| 241 | + background-color: #ffffff; /* $govuk-inverse-button-colour */ |
| 242 | + box-shadow: 0 0.125rem 0 #0b0c0c; /* $govuk-inverse-button-shadow-colour */ |
| 243 | + color: #1d70b8; /* $govuk-inverse-button-text-colour - BLUE text, not white! */ |
| 244 | + } |
| 245 | +
|
| 246 | + .app-masthead .govuk-button.govuk-button--inverse:link, |
| 247 | + .app-masthead .govuk-button.govuk-button--inverse:visited, |
| 248 | + .app-masthead .govuk-button.govuk-button--inverse:active { |
| 249 | + color: #1d70b8; /* Blue text for all states */ |
217 | 250 | }
|
218 | 251 |
|
219 | 252 | .app-masthead .govuk-button.govuk-button--inverse:hover {
|
220 |
| - background-color: #f3f2f1; |
221 |
| - color: #0b0c0c; |
| 253 | + background-color: #f3f2f1; /* $govuk-inverse-button-hover-colour */ |
| 254 | + color: #1d70b8; /* Keep blue text on hover */ |
222 | 255 | }
|
223 | 256 |
|
| 257 | + /* Start button styles */ |
224 | 258 | .app-masthead .govuk-button.govuk-button--start {
|
| 259 | + /* @include govuk-typography-weight-bold; @include govuk-font-size($size: 24, $line-height: 1); */ |
225 | 260 | font-weight: 700;
|
| 261 | + font-size: 1.5rem; /* 24px */ |
| 262 | + line-height: 1; |
226 | 263 | display: inline-flex;
|
227 |
| - align-items: center; |
| 264 | + min-height: auto; |
| 265 | + justify-content: center; |
228 | 266 | }
|
229 | 267 |
|
230 | 268 | .app-masthead .govuk-button .govuk-button__start-icon {
|
231 |
| - margin-left: 0.5rem; |
| 269 | + /* margin-left: govuk-spacing(1); on mobile, govuk-spacing(2) on desktop */ |
| 270 | + margin-left: 0.3125rem; /* 5px - govuk-spacing(1) */ |
232 | 271 | vertical-align: middle;
|
233 | 272 | flex-shrink: 0;
|
| 273 | + align-self: center; |
| 274 | + forced-color-adjust: auto; |
| 275 | + } |
| 276 | +
|
| 277 | + @media (min-width: 48.0625em) { |
| 278 | + .app-masthead .govuk-button .govuk-button__start-icon { |
| 279 | + margin-left: 0.625rem; /* 10px - govuk-spacing(2) */ |
| 280 | + } |
234 | 281 | }
|
235 | 282 |
|
236 | 283 | /* GOV.UK Typography - Scoped to our component with high specificity */
|
|
0 commit comments