The colors of the card form look out of place and hard to read in a dark theme. Other form elements would use a darker background.
This documentation is incorrect: https://developer.squareup.com/docs/web-payments/customize-styles
Though it does seem to affect text that is outside of the form, like “Enter your card number”. It mentions a dark-mode.css
, but not only is the form is in an <iframe>
and won’t styled by that method, it doesn’t mention what the contents of that CSS file would be. Also adding class="dark-mode"
to the body appears to have no affect on anything. Should Step 1 on that page be taken out entirely? Is it attempting to instruct users on how to add a dark mode to a page in general or something? If so, why? Is this content generated by ChatGPT?
The 2nd step, “Step 2: Define a custom style” appears to be on the right track. But it doesn’t change the form elements, possibly wrong selectors. I started to fix the selectors myself, but I have no way of knowing what will last and what won’t.
Really my main questions are this:
-
Is this form the only way to get a Card Nonce token?
-
Is there any documentation on how to customize the look of this form so that it can fit into a form when embedded into a website as intended?