-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: clearInput icon should be rendered as an ion-icon for easier styling #17168
Comments
Thanks for the issue! You are right, at the moment it's not a nice implementation. |
This bug is fixed? |
This does the trick, put in global.css, but I didn't recommend this method.
|
YEAH! I forgot to talk here, I did it like you did. But instead of using |
Thanks for the issue. This has been resolved via #26354, and a fix will be available in an upcoming release of Ionic Framework. |
resolves #19178, resolves #17168 Co-authored-by: Mathieu-COSYNS <[email protected]>
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic version:
[x] 4.0.0-rc.1
Current behavior:
I can't change the color of the clearInput button inside the ion-input (not searchbar).
Probably because the svg is rendered as:
background-image: url("data:image/svg+xml;charset=utf-8,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'><path%20fill='var(--ion-color-step-600,%20%23666666)'%20d='M403.1,108.9c-81.2-81.2-212.9-81.2-294.2,0s-81.2,212.9,0,294.2c81.2,81.2,212.9,81.2,294.2,0S484.3,190.1,403.1,108.9z%20M352,340.2L340.2,352l-84.4-84.2l-84,83.8L160,339.8l84-83.8l-84-83.8l11.8-11.8l84,83.8l84.4-84.2l11.8,11.8L267.6,256L352,340.2z'/>
The relevant part is var(--ion-color-step-600,%20%23666666): no matter if I override the --ion-color-step-600 variable, it's always rendered as a dark grey.
Expected behavior:
It should reflect the color of --ion-color-step-600
Steps to reproduce:
<ion-input type="email" placeholder="Email" clearInput></ion-input>
ion-input { --ion-color-step-600: #ffffff; }
Other information:
Also can't understand why the svg use --ion-color-step-600 when in the code --ion-color-step-400 is used:
https://github.com/ionic-team/ionic/blob/a30f760d9292b857033247d4cd1581d3bf40d5db/core/src/components/input/input.md.vars.scss#L26
Ionic info:
The text was updated successfully, but these errors were encountered: