#shenlok-styling
1 messages · Page 1 of 1 (latest)
Here's a stripe codesandbox I found and modified to reproduce the error https://codesandbox.io/s/react-stripe-elements-textfield-integration-forked-i1zfg?file=/src/CreditCardDetail.js
You can see the error in your browser console (not the codesandbox console)
Look like the color is checked against this regex /^[#a-zA-Z0-9-_\s,"'().]*$/ which doesn't support % character
OK, let me take a look
Indeed it does not support % character. Can I suggest using other color format instead? for instance rgba?
Our themeing system uses hsla for various colours as they're a lot more sensible to read etc. I'm trying to figure out a workaround of converting between hsla and rgba when passing these colors to stripe.
Seems like it would be worth supporting on the Stripe end though too!
Do you think this is something that will be fixed/supported? If not, I think it should at least be documented, as the styling docs make no mention of there being any restriction of what values can be passed
Please write in to us for any suggestions that can improve our product. https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.