Skip to content

Commit

Permalink
Remove unnecessary opacity override for Firefox placeholders (WordPre…
Browse files Browse the repository at this point in the history
…ss#69312)

* Remove unnecessary opacity override for Firefox placeholders

* Changelog: Add entry for TextareaControl

* Move changelog entry under the Enhancement section.

Co-authored-by: himanshupathak95 <[email protected]>
Co-authored-by: afercia <[email protected]>
  • Loading branch information
3 people authored Feb 27, 2025
1 parent 079996b commit 18a4c0d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@
}

&::-moz-placeholder {
opacity: 1; // Necessary because Firefox reduces this from 1.
color: $dark-gray-placeholder;
}

Expand Down
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

### Enhancement

- `TextareaControl`: Fix Firefox placeholder text opacity override ([#69312](https://github.com/WordPress/gutenberg/pull/69312)).
- `BorderControlDropdown`, `BorderControl`: Reset button is always visible. ([#69066](https://github.com/WordPress/gutenberg/pull/69066)).

### Internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const StyledTextarea = styled.textarea`
}
&::-moz-placeholder {
opacity: 1; // Necessary because Firefox reduces this from 1.
color: ${ COLORS.ui.darkGrayPlaceholder };
}
Expand All @@ -76,7 +75,6 @@ export const StyledTextarea = styled.textarea`
}
&::-moz-placeholder {
opacity: 1; // Necessary because Firefox reduces this from 1.
color: ${ COLORS.ui.lightGrayPlaceholder };
}
Expand Down
2 changes: 0 additions & 2 deletions packages/editor/src/components/post-text-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ textarea.editor-post-text-editor {

&::-moz-placeholder {
color: $dark-gray-placeholder;
// Override Firefox default.
opacity: 1;
}

&:-ms-input-placeholder {
Expand Down

0 comments on commit 18a4c0d

Please sign in to comment.