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

How to style pseudo classes for the Adyen input fields #2677

Open
ashrafnazar opened this issue May 8, 2024 · 5 comments
Open

How to style pseudo classes for the Adyen input fields #2677

ashrafnazar opened this issue May 8, 2024 · 5 comments
Labels
Enhancement New feature or request Needs more info Further information is requested

Comments

@ashrafnazar
Copy link

Is your feature request related to a problem? Please describe.
I would like to be able to style a pseudo class in :focus, for the input fields in the AdyenCheckout instance.

Describe the solution you'd like
A way to style pseudo classes, so potentially an onFocus property in the CoreOptions interface or a way to do the same thing inside the styles object, as part of the PaymentMethodOptions generic type.

Describe alternatives you've considered
I've attempted to use the second argument (element) inside the onChange property within the CoreOptions interface, but have not found a way to do so.

Additional context
N/A

@ashrafnazar ashrafnazar added the Enhancement New feature or request label May 8, 2024
@m1aw
Copy link
Contributor

m1aw commented May 8, 2024

Hello @ashrafnazar

What would be the objective here? I ask because we are going to be rolling out CSS variables in V6 and you will be able to customise it that way.
I wonder however if your use case would be covered. Can you share a few more details on what you are trying to accomplish?

@m1aw m1aw added the Needs more info Further information is requested label May 8, 2024
@ashrafnazar
Copy link
Author

ashrafnazar commented May 8, 2024

Hey @m1aw - it's to match our current designs, so when a user tabs through to an input field, or is on it, then we would like the outline property to change, i.e. its stroke width and colour. Hope that makes sense

@m1aw
Copy link
Contributor

m1aw commented May 8, 2024

Is it currently not possible just by using CSS?

@ashrafnazar
Copy link
Author

ashrafnazar commented May 8, 2024

Hi @m1aw - because the input fields are inside iframes, I don't think it's as simple as updating the CSS. Unless I'm mistaken?

@ashrafnazar
Copy link
Author

ashrafnazar commented May 15, 2024

@m1aw I've been told that I can style the parent element, i.e. the span with the data-cse attribute, but unless I do some sort of hack, there isn't a clean way to update the :focus state of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Needs more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants