question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firefox `::placeholder` opacity

See original GitHub issue

Stripe Elements in Safari have an unexpected opacity applied:

Firefox (96.0.1, macOS 11.6.1) Screenshot 2022-02-15 at 14 37 09

Other browsers Screenshot 2022-02-15 at 14 37 26

Using the Firefox devtools the opacity can be ‘fixed’, but there is no way to do this in the Elements appearance config (it shows a warning about .Input::placeholder not supporting opacity). Screenshot 2022-02-15 at 14 41 29

Edit: Seems as though this is just how Firefox styles placeholders

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
tylersmith-stripecommented, Mar 18, 2022

Yep, those points are essentially correct. 👍

1reaction
tylersmith-stripecommented, Mar 17, 2022

Hey @glambert,

There are two primary ways to style Elements, depending on which Elements you’re using.

The Style object is used for styling the card Element, and other individual payment method Elements (e.g., cardNumber, cardExpiry, etc.).

For the context of this thread, and the Payment Element, there is a new styling API we call the Appearance API.

An important note in both of these approaches is that the styles are not loaded into your page directly, but rather into the Stripe Elements iframe(s).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Normalize Mozilla Firefox placeholder opacity #741 - GitHub
The placeholder has opacity. Solution: ::-moz-placeholder{opacity:1}. Normalize for all browsers (probably unnecessary) ::-webkit-input ...
Read more >
Firefox Placeholder Text Looking Lighter Than Other Browsers?
If you are new to styling placeholder text or perhaps have just not noticed, Firefox in version 19 and beyond by default applies...
Read more >
Placeholder text default style should use opacity instead of ...
So, I'm getting back on that because it might be interesting to change the default value for Firefox 4 if we want to....
Read more >
Firefox: Transition placeholder opacity - Stack Overflow
How about doing it like this? Instead of using opacity , switch the color shades. Demo <input type="text" placeholder="some cool text"/> ...
Read more >
Testing placeholder opacity in Firefox - CodePen
In Firefox (at least v.43) the colors of input placeholders look funky. This is because it automatically sets an opacity to the placeholder....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found