From 47fdb90bd7c50bd321b2fe95f4b920af55c9e13c Mon Sep 17 00:00:00 2001 From: Sainath Poojary <53347682+SainathPoojary@users.noreply.github.com> Date: Thu, 27 Feb 2025 17:20:58 +0530 Subject: [PATCH] InputControl: Ensure consistent placeholder color (#69334) * InputControl: Ensure consistent placeholder color * InputControl: Add CHANGELOG entry * InputControl: Remove unnecessary line-height styles Co-authored-by: SainathPoojary Co-authored-by: afercia Co-authored-by: ciampo Co-authored-by: im3dabasia --- packages/components/CHANGELOG.md | 1 + .../src/input-control/styles/input-control-styles.tsx | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 5cdf14f89937f1..31cd61305a730c 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -5,6 +5,7 @@ ### Bug Fixes - `TextControl`: Ensures email and url inputs have consistent LTR alignment in RTL languages ([#68561](https://github.com/WordPress/gutenberg/pull/68561)). +- `InputControl`: Ensure consistent placeholder color ([#69334](https://github.com/WordPress/gutenberg/pull/69334)). ### Enhancement diff --git a/packages/components/src/input-control/styles/input-control-styles.tsx b/packages/components/src/input-control/styles/input-control-styles.tsx index db24a5e60f137a..492c4bef0f4e20 100644 --- a/packages/components/src/input-control/styles/input-control-styles.tsx +++ b/packages/components/src/input-control/styles/input-control-styles.tsx @@ -285,7 +285,15 @@ export const Input = styled.input< InputProps >` ${ customPaddings } &::-webkit-input-placeholder { - line-height: normal; + color: ${ COLORS.ui.darkGrayPlaceholder }; + } + + &::-moz-placeholder { + color: ${ COLORS.ui.darkGrayPlaceholder }; + } + + &:-ms-input-placeholder { + color: ${ COLORS.ui.darkGrayPlaceholder }; } &[type='email'],