In #9453, I removed the maybeConvertRGBAtoRGB method because it looked like Stripe does not throw a warning regarding rgba values anymore. This is not well documented on their side so we only discover this by trial and error.
Now while working on the Blocks Checkout, I discovered Stripe supports RGBA for background color but not for text color, so we need to bring back that method for text color.
To Reproduce
Use custom css to set the background and text color of your labels and inputs to an RGBA value.
Go to the checkout and render the Payment Element.
Notice warnings in the console for the text color.
[Stripe.js] elements-inner-loader-ui.html: invalid variable value "rgba(18, 18, 18, 0.7)" provided to "colorText"; "colorText" accepts a valid HEX, rgb(), or hsl() CSS color.
Triaging alert: This issue is related to the checkout form and there is already a PR attached. Sending it to Heisenberg as per Pc2DNy-3z-p2 by adding the relevant focus label. cc @FangedParakeet
Describe the bug
In #9453, I removed the
maybeConvertRGBAtoRGB
method because it looked like Stripe does not throw a warning regarding rgba values anymore. This is not well documented on their side so we only discover this by trial and error. Now while working on the Blocks Checkout, I discovered Stripe supports RGBA for background color but not for text color, so we need to bring back that method for text color.To Reproduce
Screenshots