-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v7.x
Current Behavior
Issue Summary:
When using ion-input within ion-item, and not add ion-label element - states(css classes) such as "focus", "disabled", and "invalid" are not set to ion-item element, it can lead to problems with setting highlight variables and other related functionalities. In the ionic 6 works as expected.
// working as expected
<ion-item lines="full">
<ion-label></ion-label>
<ion-input></ion-input>
</ion-item>
// not working
<ion-item lines="full" >
<ion-input></ion-input>
</ion-item>
css:
ion-item {
--highlight-height: 2px;
--highlight-color-focused: #43e7f3;
--highlight-color-valid: #6f58d8;
--highlight-color-invalid: #ff46be;
}
Expected Behavior
--highlight-color-focused: #43e7f3;
--highlight-color-valid: #6f58d8;
--highlight-color-invalid: #ff46be;
should work without using ion-label element
Steps to Reproduce
- create
- set focus inside input
3.inspect ion-item element classes in devtools
Code Reproduction URL
https://stackblitz.com/edit/angular-6xeqay?file=src%2Fapp%2Fexample.component.html
Ionic Info
Ionic:
Ionic CLI : 7.1.1
Ionic Framework : @ionic/angular 7.1.2
@angular-devkit/build-angular : 16.1.0
@angular-devkit/schematics : 16.1.0
@angular/cli : 16.1.3
Capacitor:
Capacitor CLI : 5.0.5
@capacitor/android : 5.0.5
@capacitor/core : 5.0.5
@capacitor/ios : 5.0.5
Utility:
cordova-res : not installed globally
native-run : 1.7.2
System:
NodeJS : v18.16.1
npm : 9.5.1
OS : macOS Unknown
Additional Information
No response