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

Selected class on current country item #1855

Open
MaartenPetiet opened this issue Oct 30, 2024 · 3 comments
Open

Selected class on current country item #1855

MaartenPetiet opened this issue Oct 30, 2024 · 3 comments

Comments

@MaartenPetiet
Copy link

Plugin version

v24.6.0

Steps to reproduce

N/A

Expected behaviour

We would like to add some additional styling to the country dropdown item that is currently active (so not the selected by mouse/keyboard but selected in the dropdown value). It seems we now have to add some JS to check the value. Could you add some sort of class to this item to make a css-only solution possible? Thank you for the awesome package!

Actual behaviour

No way of adding styling for the country item that is selected in the dropdown with only css.

Initialisation options

N/A

@jackocnr
Copy link
Owner

jackocnr commented Nov 4, 2024

I'm confused. Currently we use the .iti__highlight class for the selected dropdown item, which is how we colour it differently. But do you mean something else?

not the selected by mouse/keyboard but selected in the dropdown value

Please can you provide more specific details of what you mean here?

@MaartenPetiet
Copy link
Author

@jackocnr thank you for your reply. Yes so basically we want a class on the li.iti__country that is currently the active value of the dropdown:

image

Hope this is clear.

@jackocnr
Copy link
Owner

jackocnr commented Nov 4, 2024

Thanks for explaining. I understand now. Sure, I would be open to adding this - it should be fairly straight forward. I don't have time to look into it myself right now, but I would be open to a pull request implementing this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants