mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
176 lines
2.9 KiB
SCSS
176 lines
2.9 KiB
SCSS
// scss-lint:disable NestingDepth
|
|
|
|
.sci-input-container {
|
|
display: inline-block;
|
|
position: relative;
|
|
width: 100%;
|
|
|
|
label {
|
|
@include font-small;
|
|
color: var(--sn-dark-grey);
|
|
display: inline-block;
|
|
font-weight: 400;
|
|
margin-bottom: .5rem;
|
|
}
|
|
|
|
.sci-input-field {
|
|
@include font-button;
|
|
animation-timing-function: $timing-function-sharp;
|
|
border: 1px solid var(--sn-light-grey);
|
|
border-radius: $border-radius-default !important;
|
|
box-shadow: none;
|
|
height: 36px;
|
|
outline: 0;
|
|
padding: 0 0 0 10px;
|
|
transition: .3s;
|
|
width: 100%;
|
|
|
|
&:hover {
|
|
border: 1px solid var(--sn-science-blue-hover);
|
|
}
|
|
|
|
&:focus {
|
|
border: $border-focus;
|
|
}
|
|
|
|
&:disabled {
|
|
background-color: var(--sn-super-light-grey);
|
|
color: var(--sn-light-grey);
|
|
border: 1px solid var(--sn-light-grey);
|
|
}
|
|
|
|
&::placeholder {
|
|
color: $color-alto;
|
|
}
|
|
|
|
&.textarea {
|
|
height: unset;
|
|
min-height: 36px;
|
|
padding: 10px;
|
|
resize: vertical;
|
|
}
|
|
}
|
|
|
|
.sci-input-field[type=password] {
|
|
font-family: "SN Inter", "Open Sans", Arial, Helvetica, sans-serif;
|
|
letter-spacing: .075em;
|
|
|
|
&::placeholder {
|
|
letter-spacing: initial;
|
|
}
|
|
}
|
|
|
|
.sn-icon {
|
|
bottom: 6px;
|
|
position: absolute;
|
|
text-align: center;
|
|
width: 25px;
|
|
}
|
|
|
|
&.left-icon {
|
|
.sci-input-field {
|
|
padding: 0 0 0 30px;
|
|
}
|
|
|
|
.sn-icon {
|
|
left: 5px;
|
|
}
|
|
}
|
|
|
|
&.right-icon {
|
|
.sci-input-field {
|
|
padding: 0 30px 0 10px;
|
|
}
|
|
|
|
.sn-icon {
|
|
right: 5px;
|
|
}
|
|
}
|
|
|
|
&.success,
|
|
&.error {
|
|
&::after {
|
|
@include font-awesome;
|
|
bottom: 6px;
|
|
position: absolute;
|
|
right: 5px;
|
|
text-align: center;
|
|
top: 6px;
|
|
width: 25px;
|
|
}
|
|
}
|
|
|
|
&.error {
|
|
padding-bottom: 6px;
|
|
|
|
label {
|
|
color: $brand-danger;
|
|
}
|
|
|
|
.sci-input-field {
|
|
border: $border-danger;
|
|
}
|
|
|
|
.fas {
|
|
bottom: 6px;
|
|
}
|
|
|
|
&::before {
|
|
@include font-small;
|
|
bottom: -9px;
|
|
color: $brand-danger;
|
|
content: attr(data-error-text);
|
|
left: 0;
|
|
line-height: 15px;
|
|
position: absolute;
|
|
white-space: nowrap;
|
|
width: 100%;
|
|
}
|
|
|
|
&.success-icon {
|
|
&::after {
|
|
color: $brand-success;
|
|
content: $font-fas-check;
|
|
}
|
|
}
|
|
|
|
&.error-icon {
|
|
&::after {
|
|
color: $brand-danger;
|
|
content: $font-fas-exclamation-triangle;
|
|
}
|
|
}
|
|
|
|
&.success-icon,
|
|
&.error-icon {
|
|
.sci-input-field {
|
|
padding: 0 30px 0 10px;
|
|
}
|
|
|
|
&.right-icon {
|
|
.sci-input-field {
|
|
padding: 0 60px 0 10px;
|
|
}
|
|
|
|
&::after {
|
|
right: 35px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&.disabled {
|
|
label {
|
|
color: $color-alto;
|
|
}
|
|
|
|
.sci-input-field {
|
|
border: $border-tertiary;
|
|
color: $color-alto;
|
|
|
|
&::placeholder {
|
|
color: inherit;
|
|
}
|
|
}
|
|
}
|
|
}
|