-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defend against a:link:focus in GOV.UK Template #609
Changes from 2 commits
fb4c5af
12e1e79
264028f
e426868
293fcaf
f82730e
eeff255
5d8735e
74e5012
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,10 +105,18 @@ | |
.govuk-c-breadcrumbs__link { | ||
@include govuk-focusable-fill; | ||
|
||
// Override link colour to use text colour | ||
// | ||
// GOV.UK Template includes a specific a:link:focus selector designed to | ||
// make unvisited links a slightly darker blue when focussed, so we need to | ||
// override the text colour for that combination of selectors so so that | ||
// the skip link does not end up with dark blue text when focussed. (1) | ||
&:link, | ||
&:visited, | ||
&:hover, | ||
&:active { | ||
&:active, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we break these out into their own sections and do something like .class {
&:link,
&:visited,
&:hover,
&:active {
color: $govuk-text-colour;
}
if ($with-govuk-template) {
... overrides here
}
} This would mean if we wanted to do 'pure' builds we could. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this in principle, but not sure how it'll work in practise – especially for users that are not compiling the Sass themselves. I'm not sure what we'd do for the Also, I'm not sure that we have the tooling in place to have confidence in this when introducing yet more complexity into the builds. In the example above we'd need to set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For general builds we would set these to on by default, as is the same as your current code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Low-fi is just to make sure each selector that overrides for govuk-template has a comment next to it, which most of these do? |
||
&:focus, | ||
&:link:focus { | ||
color: $govuk-text-colour; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of 'GOV.UK Template' should we use 'alphagov/govuk_template' which is less ambiguous for people in the future?
If we intend to deprecate GOV.UK Template there will be people in the future that don't even know what this is.