Skip to content

Commit

Permalink
fixup! Make stylelint happy
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Aug 18, 2023
1 parent d05b825 commit cfd6e06
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions src/components/NcInputField/NcInputField.vue
Expand Up @@ -389,26 +389,46 @@ export default {
box-shadow: unset !important; // Override server rules
}
&--leading-icon {
padding-inline-start: 32px;
}
&--trailing-icon {
padding-inline-end: 32px;
}
&--success {
border-color: var(--color-success) !important; //Override hover border color
&:focus-visible {
box-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px
}
// Align label text color with border color (on hover / focus)
&:focus + .input-field__label,
&:hover:not(:placeholder-shown) + .input-field__label {
color: var(--color-success-text);
}
}
&--error {
border-color: var(--color-error) !important; //Override hover border color
&:focus-visible {
box-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px
}
}
&--leading-icon {
padding-inline-start: 32px;
// Align label text color with border color (on hover / focus)
&:focus + .input-field__label,
&:hover:not(:placeholder-shown) + .input-field__label {
color: var(--color-error-text);
}
}
&--trailing-icon {
padding-inline-end: 32px;
// Align label text color with border color (on hover / focus)
&:not(&--success, &--error) {
&:focus + .input-field__label,
&:hover:not(:placeholder-shown) + .input-field__label {
color: var(--color-primary-element);
}
}
}
Expand Down Expand Up @@ -457,28 +477,6 @@ export default {
}
}
// Align label text color with border color (on hover / focus)
&__input {
&:focus + .input-field__label,
&:hover:not(&--success, &--error):not(:placeholder-shown) + .input-field__label {
color: var(--color-primary-element);
}
&--success {
&:focus + .input-field__label,
&:hover:not(:placeholder-shown) + .input-field__label {
color: var(--color-success-text);
}
}
&--error {
&:focus + .input-field__label,
&:hover:not(:placeholder-shown) + .input-field__label {
color: var(--color-error-text);
}
}
}
&__icon {
position: absolute;
height: 32px;
Expand Down

0 comments on commit cfd6e06

Please sign in to comment.