Hello Everyone I’m desperated, my client asks me for a new input style as the google style I’m almos there, but I’m with a big problem on the overflow as you can see:
All the colors are changing correctly, but the label is being cutted in the middle. Can anyone help me please? I’ve tryed to use overflow: visible; padding-top, margin and nothing
Thats My SCSS:
* {
--background-focused: transparent;
}
ion-toolbar {
--background: #3880ff !important;
--color: #fff !important;
}
#menu_header {
--background: #3880ff !important;
--color: #fff !important;
}
#avatar_menu {
margin-right: 10px !important;
}
.item-input {
margin-top: 5px;
&.invalid {
color: red;
}
}
ion-label.google-label {
color: #fff;
background-color: #3880ff;
font-size: 12px;
margin-left: 10px !important;
padding-left: 4px !important;
padding-right: 4px !important;
position: absolute !important;
margin-bottom: 5px !important;
z-index: 9;
}
ion-input.google-input {
padding-top: 10px !important;
color: white;
border: 2px solid white;
width: 100%;
max-width: 100%;
padding-left: 10px !important;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
.item-label-floating {
&.ion-invalid.ion-touched {
.google-label {
color: #f53d3d !important;
}
.google-input {
border: 2px solid #f53d3d !important;
}
}
&.item-has-value {
.google-label {
padding-left: 4px !important;
padding-right: 4px !important;
color: #062f77 !important;
-webkit-transform: translate3d(0, -50%, 0) !important;
transform: translate3d(0, -50%, 0) !important;
-webkit-transform-origin: left top;
transform-origin: left top;
-webkit-transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
&.invalid {
.google-label {
color: #f53d3d !important;
}
.google-input {
border: 2px solid #f53d3d !important;
}
}
}
&.ion-valid.ion-touched {
.google-label {
color: #fff !important;
}
}
}
&.item-has-focus {
.google-label {
padding-left: 4px !important;
padding-right: 4px !important;
color: #062f77 !important;
-webkit-transform: translate3d(0, -50%, 0) !important;
transform: translate3d(0, -50%, 0) !important;
-webkit-transform-origin: left top;
transform-origin: left top;
-webkit-transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.google-input {
border: 2px solid #062f77;
}
&.invalid {
.google-label {
color: #f53d3d !important;
}
.google-input {
border: 2px solid #f53d3d !important;
}
}
&.ion-valid.ion-touched {
.google-label {
color: #062f77 !important;
}
}
}
}
<ion-item lines="none" [class.invalid]="showErrors('email')">
<ion-label class="google-label" position="floating">
E-Mail
</ion-label>
<ion-input formControlName="email" class="google-input" type="text">
</ion-input>
</ion-item>