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

Remove unnecessary opacity override for Firefox placeholders #69312

Merged

Conversation

himanshupathak95
Copy link
Contributor

@himanshupathak95 himanshupathak95 commented Feb 25, 2025

What?

Closes #69311

This PR removes the obsolete opacity: 1 CSS property from ::-moz-placeholder selectors across, as Firefox has updated its placeholder implementation.

Why?

Since Firefox now implements placeholder transparency via the color property instead of opacity, our opacity: 1 override is no longer necessary and can be safely removed.

The visual appearance remains unchanged in current Firefox versions as setting just the color property correctly overrides Firefox's native transparency.

Testing Instructions

  • Update to the latest version of Firefox
  • In Firefox, navigate to about:config and set devtools.inspector.showAllAnonymousContent to true
  • Edit a post
  • Switch the editor to 'Code editor'
  • Make sure the textarea is empty to see the placeholder text
  • Inspect the placeholder text in Firefox DevTools
  • Verify that the placeholder text appears correctly without the opacity: 1 property

Screenshots

image

@himanshupathak95 himanshupathak95 marked this pull request as ready for review February 25, 2025 16:56
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: himanshupathak95 <[email protected]>
Co-authored-by: afercia <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@himanshupathak95
Copy link
Contributor Author

himanshupathak95 commented Feb 25, 2025

For the placeholder in the TextareaControl -

Screen.Recording.2025-02-25.at.23.20.26.mov

As can be seen, removing opacity doesn't make any change. So it can be safely removed. Screenshot after the removal (current PR) -

image

Copy link
Contributor

@afercia afercia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@afercia afercia merged commit 18a4c0d into WordPress:trunk Feb 27, 2025
61 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.4 milestone Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update CSS for ::-moz-placeholder
3 participants