Skip to content
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

Windows10 select box contrast ratio in IE and Edge #456

Merged
merged 1 commit into from
Apr 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions public/sass/elements/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// 4. Form hints
// 5. Form controls
// 6. Form control widths
// 7. Browser accessibility fixes

// 1. Helpers
// ==========================================================================
Expand Down Expand Up @@ -223,3 +224,13 @@ textarea.form-control {
width: 12.5%;
}
}

// 7. Browser accessibility fixes
// ==========================================================================

option:active,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure :active is needed? My gut feeling said :checked is weird but from testing all 3 of them just now, it seems like :checked is needed for the activate state when the select box is open and :focus::-ms-value is needed for the active state when the select box is closed (but still focussed). Do you know for what case :active is needed?

Copy link
Author

@kr8n3r kr8n3r Apr 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to retain the correct background colour as you press down with a mouse
see http://codepen.io/igloo/pen/EmNdmp

option:checked,
select:focus::-ms-value {
color: $white;
background-color: $govuk-blue;
}