fleet/frontend/components/forms/fields/InputFieldWithIcon/_styles.scss
Jacob Shandling 6b70d11bc6
UI: Login page bugs (#11520)
## Addresses #11338 

-  Validate emails on login page
- Fix jumping error state for no email provided ("Email field must be
completed")
- Fix jumping error state for password field
- Fix jumping error state for Forgot password > email field

https://www.loom.com/share/92a238fcd2614d6e8d2655d571aa2757

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-05-09 10:12:29 -07:00

127 lines
2.4 KiB
SCSS

.input-icon-field {
margin-top: $pad-medium;
position: relative;
width: 100%;
&__icon {
position: absolute;
right: 6px;
top: 28px;
font-size: 18px;
color: $core-fleet-blue;
&--active {
color: $core-vibrant-blue;
}
&--error {
border: 1px solid $core-vibrant-red;
box-sizing: border-box;
border-radius: 4px;
}
}
&__input {
border: 1px solid $ui-fleet-black-10;
background-color: $ui-light-grey;
border-radius: $border-radius;
padding: 9px 30px 9px $pad-medium;
font-size: $small;
text-indent: 1px;
position: relative;
width: 100%;
box-sizing: border-box;
color: $core-fleet-black;
font-weight: $regular;
transition: border-color 100ms;
::placeholder {
color: $core-fleet-blue;
}
&:hover,
&:focus {
border: 1px solid $core-vibrant-blue;
}
&:focus {
outline: none;
}
&:disabled {
color: $ui-fleet-black-50;
cursor: not-allowed;
}
&--error {
color: $core-vibrant-red;
border: 1px solid $core-vibrant-red;
box-sizing: border-box;
border-radius: 4px;
}
}
&__label {
display: block;
font-size: $x-small;
font-weight: $bold;
margin-bottom: $pad-xsmall;
&[data-has-tooltip="true"] {
margin-bottom: $pad-small;
}
}
&__errors {
color: $core-vibrant-red;
}
&__hint {
font-size: $x-small;
font-style: italic;
font-weight: $regular;
line-height: 20px;
display: inline-block;
margin-top: $pad-small;
code {
color: $core-vibrant-blue;
background-color: $ui-light-grey;
padding: $pad-xxsmall;
font-family: "SourceCodePro", $monospace;
}
}
// overwrite icon position and input padding
&--icon-start {
input {
padding: 9px 1rem 9px 3rem;
}
.fleeticon {
right: auto;
left: 16px;
top: 36px;
font-weight: 700;
}
}
/* removes the 'X' from IE input type=search */
input[type="search"]::-ms-clear {
display: none;
width: 0;
height: 0;
}
input[type="search"]::-ms-reveal {
display: none;
width: 0;
height: 0;
}
/* removes the 'X' from Chrome input type=search */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
display: none;
}
}