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

Fixes #2886 - cross-browser placeholder opacity #3373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scheinercc
Copy link

@scheinercc scheinercc commented Jul 4, 2021

This is a bugfix.

Issue: #2886

TL;DR Firefox and Safari/Chrome have different computed styles for placeholders. The current implementation only targets Safari/Chrome and renders them too faint in Firefox.

Proposed solution

Split the single RGBA color value into a solid color and an opacity value. This renders the placeholder the same in all browsers.

Tradeoffs

Users who change the alpha values of $input-placeholder-color and $input-disabled-placeholder-color, would have to set that alpha value now in the new $input-placeholder-opacity and $input-disabled-placeholder-opacity.

No changes if the alpha value has not been altered.

Testing Done

Local.

Compared current implementation with this new implementation in Firefox, Safari and Chrome on macOS.

Changelog updated?

No.

This is a bug fix.

Issue: jgthms#2886

TL;DR Firefox and Safari/Chrome have different computed styles for placeholders. The current implementation only targets Safari/Chrome and renders them too faint in Firefox.

### Proposed solution
Split the single RGBA color value into a solid color and an opacity value. This renders the placeholder the same in all browsers.

### Tradeoffs
Users who change the  alpha values of `$input-placeholder-color` and `$input-disabled-placeholder-color`, would have to set that alpha value now in the new `$input-placeholder-opacity` and `$input-disabled-placeholder-opacity`.

No changes if the alpha value has not been altered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant