Skip to content

Commit

Permalink
fix(locale-modal): replaced placeholder color for a bolder one (carbo…
Browse files Browse the repository at this point in the history
…n-design-system#4896)

### Related Ticket(s)
carbon-design-system#4802

### Description

The previous placeholder color for the Web Components version was failing contrast ratio testing. Changed the placeholder text to match the `$text-02` token used in the React version, where the contrast ratio has been fixed.

### Changelog

**Changed**

- `<dds-search>` placeholder color changed to `$text-02` to match React version

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "package: styles": Carbon Expressive -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
IgnacioBecerra committed Feb 22, 2021
1 parent f9f05ec commit 9d817d2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/web-components/src/components/search/search.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright IBM Corp. 2020
// Copyright IBM Corp. 2020, 2021
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -31,4 +31,15 @@
&[color-scheme='light'] {
@extend .#{$prefix}--search--light;
}

/**
* We are deliberatey diverging from the global helper mixins for placeholder, found here:
* (https://github.com/carbon-design-system/carbon/blob/v10.25.0/packages/components/src/globals/scss/_helper-mixins.scss#L44-L51)
*
* The reason for this being that the current placeholder color fails contrast testing,
* while this replacement color passes testing.
*/
::placeholder {
color: $text-02;
}
}

0 comments on commit 9d817d2

Please sign in to comment.