-
Notifications
You must be signed in to change notification settings - Fork 320
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
Update links (and things that look like links) to use the new focus style #1309
Changes from all commits
f121c99
1979c10
09ff00c
a921fcc
1570997
52a6712
3118967
eca6ca0
c0a6776
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 |
---|---|---|
|
@@ -32,3 +32,35 @@ | |
background-color: $govuk-focus-colour; | ||
} | ||
} | ||
|
||
/// Focusable with box-shadow | ||
/// | ||
/// Removes the visible outline and replace with box-shadow and background colour. | ||
/// Used for interactive text-based elements. | ||
/// | ||
/// @access public | ||
|
||
@mixin govuk-focusable-text-link { | ||
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. This mixin seems to be performing a task very similar to 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. As discussed on Slack we're going to wait until we have everything merged before deciding how the mixins should look. 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. 👍 |
||
&:focus { | ||
// When colours are overridden, for example when users have a dark mode, | ||
// backgrounds and box-shadows disappear, so we need to ensure there's a | ||
// transparent outline which will be set to a visible colour. | ||
|
||
// Since Internet Explorer 8 does not support box-shadow, we want to force the user-agent outlines | ||
@include govuk-not-ie8 { | ||
outline: $govuk-focus-width solid transparent; | ||
outline-offset: 0; | ||
} | ||
color: $govuk-text-colour; | ||
background-color: $govuk-focus-colour; | ||
// sass-lint:disable indentation | ||
box-shadow: -5px -1px 0 1px $govuk-focus-colour, | ||
5px -1px 0 1px $govuk-focus-colour, | ||
-3px 1px 0 3px $govuk-text-colour, | ||
3px 1px 0 3px $govuk-text-colour; | ||
// sass-lint:enable indentation | ||
// When link is focussed, hide the default underline since the | ||
// box shadow adds the "underline" | ||
text-decoration: none; | ||
} | ||
} |
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.
Why is this using govuk-focusable-fill and why is the skip link styled differently to other links?
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.
This is a design decision from @dashouse to not use the heavy underline focus state for skip-link.
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.
🤔 ok, currently this component and Footer are the only two components still using
govuk-focusable-fill
mixin. When we come to review the public mixing perhaps we can just hard code the mixins output here instead of having it hanging aroundThere 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.
Yeah once we've got everything production ready we can (after the audit potentially) decide on how the mixins should work, with the new guidance in mind...