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(storefront): BCTHEME-341 fix placeholder contrast ratio according to AA standard #1933

Merged
merged 1 commit into from
Jan 5, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Draft
- Fixed input placeholder color contrast according to AA standard. [#1933](https://github.com/bigcommerce/cornerstone/pull/1933)

## 5.0.0 (12-14-2020)
- Parse HTML entities in jsContext. [#1917](https://github.com/bigcommerce/cornerstone/pull/1917)
Expand Down
9 changes: 9 additions & 0 deletions assets/scss/components/citadel/forms/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@
// appear before the button.
//
// -----------------------------------------------------------------------------
@mixin placeholder {
&::-webkit-input-placeholder {@content}
&::-moz-placeholder {@content}
&:-ms-input-placeholder {@content}
}

.form-label--alternate {
font-family: fontFamily("headingSans");
Expand Down Expand Up @@ -209,6 +214,10 @@
@include breakpoint("large") {
width: auto;
}

@include placeholder {
color: $formInput-placeholder-color;
}
}

.button {
Expand Down
2 changes: 2 additions & 0 deletions assets/scss/settings/citadel/forms/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,5 @@ $form-checkRadio-labelBefore-top: remCalc(3px);
$form-checkRadio-labelAfter-top: remCalc(4px);

$form-minMaxRow-column-gutter: $column-gutter / 4;

$formInput-placeholder-color: stencilColor("input-font-color");