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

[FEATURE] Please add parts to the result ul and li elements #84

Open
2 of 7 tasks
taplar opened this issue Dec 9, 2020 · 1 comment
Open
2 of 7 tasks

[FEATURE] Please add parts to the result ul and li elements #84

taplar opened this issue Dec 9, 2020 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@taplar
Copy link

taplar commented Dec 9, 2020

I'm submitting a

  • Regression (a behavior that used to work and stopped working in a new release)
  • Bug report
  • Enhancement
  • Feature request
  • Documentation issue or request

Description

  • Bug: Description of the issue you encountered_
  • Feature: Description of the feature. Cause and its Motivation_

Our application allows for the client to choose between light/dark mode. In dark mode, the autosuggest results shows up in the default colors. Trying to style the results with the desired colors, I am able to use the [styles] to provide a list and listItem to be injected into the markup. However, the li elements dynamically get a .focus class which statically forces the background color to #f1f1f1, which clashes with the dark mode. I have not found a way yet to dynamically react to this and override that styling.

Most of the native ionic components that I have seen used a part="value" as part of their component composition which allows us to target them in the CSS with ::part(value). I would like to request that the ul and li elements of the results be given a part each that can be targeted like this.

This would allow us to create CSS rules targeting the parts, instead of injecting the inline styling, and would allow us to react to the dynamic things, such as (for example) with ::part(item).focus {}

Version Information

ionic4-auto-complete: ^2.9.2
@angular/cli: ~9.1.0
@taplar taplar changed the title [Feature]: Please as parts to the result ul and li elements [Feature]: Please add parts to the result ul and li elements Dec 9, 2020
@jrquick17
Copy link
Owner

Hey @taplar, thanks for the request. I am not too familiar with the ::part so I am not sure what to do but am certainly willing to help. Can you point me to some resources and/or another project using the concept? Or feel free to submit a PR.

@jrquick17 jrquick17 added enhancement New feature or request question Further information is requested labels Apr 12, 2021
@jrquick17 jrquick17 changed the title [Feature]: Please add parts to the result ul and li elements [FEATURE] Please add parts to the result ul and li elements Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants