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

Fix non-semantic use of text colour for borders. #551

Merged
merged 4 commits into from
Feb 26, 2018
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@ Breaking changes:
`.govuk-section-break--visible` as it is a modifier, not an element.
(PR [#547](https://github.com/alphagov/govuk-frontend/pull/547)

New features:

- A new variable `$govuk-input-border-colour` has been introduced to define the
border colour for inputs. The Input, Select and Textarea components have been
updated to use it.
(PR [#551](https://github.com/alphagov/govuk-frontend/pull/551)

Fixes:

- Fieldset legends now correctly use 'full black' text colour when printed
(PR [#544](https://github.com/alphagov/govuk-frontend/pull/544)
- Radio and Checkbox components now explicitly use currentColor for their
borders, rather than relying on inheriting it
(PR [#551](https://github.com/alphagov/govuk-frontend/pull/551)

## 0.0.23-alpha (Breaking release)

Expand Down
2 changes: 1 addition & 1 deletion src/components/checkboxes/_checkboxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
left: 0;
width: $govuk-spacing-scale-7;
height: $govuk-spacing-scale-7;
border: $govuk-border-width-form-element solid $govuk-text-colour;
border: $govuk-border-width-form-element solid currentColor;
background: transparent;

// padding-bottom: 1px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/input/_input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
padding: $govuk-spacing-scale-1;
// setting any background-color makes text invisible when changing colours to dark backgrounds in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1335476)
// as background-color and color need to always be set together, color should not be set either
border: $govuk-border-width-form-element solid $govuk-text-colour;
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
border-radius: 0;

// Disable inner shadow and remove rounded corners
Expand Down
4 changes: 2 additions & 2 deletions src/components/radios/_radios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
width: $govuk-spacing-scale-7;
height: $govuk-spacing-scale-7;

border: $govuk-border-width-form-element solid;
border: $govuk-border-width-form-element solid currentColor;
border-radius: 50%;
background: transparent;
}
Expand All @@ -80,7 +80,7 @@
width: 0;
height: 0;

border: $govuk-spacing-scale-2 solid;
border: $govuk-spacing-scale-2 solid currentColor;
border-radius: 50%;
opacity: 0;
background: currentColor;
Expand Down
2 changes: 1 addition & 1 deletion src/components/select/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
height: 40px;

padding: $govuk-spacing-scale-1; // was 5px 4px 4px - size of it should be adjusted to match other form elements
border: $govuk-border-width-form-element solid $govuk-text-colour;
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
}

.govuk-c-select option:active,
Expand Down
2 changes: 1 addition & 1 deletion src/components/textarea/_textarea.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom");
padding: $govuk-spacing-scale-1;

border: $govuk-border-width-form-element solid $govuk-text-colour;
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
border-radius: 0;

-webkit-appearance: none;
Expand Down
4 changes: 4 additions & 0 deletions src/globals/scss/settings/_colours-applied.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ $govuk-error-colour: $govuk-red;

$govuk-border-colour: $govuk-grey-2;

// Used for form inputs and controls

$govuk-input-border-colour: $govuk-black;

// Buttons

$govuk-button-colour: #00823b;
Expand Down