mirror of
https://github.com/Karaka-Management/cssOMS.git
synced 2026-01-11 03:08:41 +00:00
256 lines
5.6 KiB
SCSS
256 lines
5.6 KiB
SCSS
/**
|
|
* @todo Orange-Management/cssOMS#4
|
|
* Nicer visual input validation
|
|
*
|
|
* @todo Orange-Management/cssOMS#14
|
|
* Create drop down with search field
|
|
*
|
|
* @todo Orange-Management/cssOMS#12
|
|
* Create slider element
|
|
*/
|
|
input, select, textarea, .textarea {
|
|
border: 1px solid var(--input-border);
|
|
}
|
|
|
|
progress {
|
|
height: 20px;
|
|
width: 100%;
|
|
min-width: 150px;
|
|
}
|
|
|
|
.textarea,
|
|
.tag-input,
|
|
textarea,
|
|
select,
|
|
input[type="password"],
|
|
input[type="text"],
|
|
input[type="datetime"],
|
|
input[type="email"],
|
|
input[type="date"],
|
|
input[type="number"],
|
|
input[type="datetime-local"] {
|
|
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
|
|
box-sizing: border-box;
|
|
color: var(--input-color);
|
|
background: var(--input-background);
|
|
width: 100%;
|
|
height: 2rem;
|
|
min-width: 70px;
|
|
max-width: 100%;
|
|
padding: 7px;
|
|
font-size: 1rem;
|
|
border: 1px solid var(--input-border);
|
|
transition: background 0.3s, border 0.3s;
|
|
|
|
&:focus, .active, &:active {
|
|
border-color: var(--input-background-active);
|
|
border: 1px solid var(--input-border-active);
|
|
color: var(--input-color-active);
|
|
}
|
|
|
|
&:disabled {
|
|
background: #efefef;
|
|
}
|
|
}
|
|
|
|
.inputWrapper {
|
|
display: flex;
|
|
flex-direction: row;
|
|
|
|
.textWrapper+input[type=submit], .textWrapper+input[type=button], .textWrapper+button {
|
|
background: var(--button-colored-background);
|
|
color: var(--text-on-background-color-2);
|
|
margin: 0;
|
|
padding: 0;
|
|
flex: 0;
|
|
height: auto;
|
|
border: none;
|
|
box-shadow: none;
|
|
|
|
&:hover {
|
|
background: var(--button-colored-background-hover);
|
|
}
|
|
}
|
|
|
|
.textWrapper {
|
|
flex: 1;
|
|
position: relative;
|
|
|
|
input {
|
|
padding-left: 2rem;
|
|
}
|
|
|
|
.frontIcon, .endIcon {
|
|
color: var(--input-icon-color);
|
|
font-size: 1.1rem;
|
|
position: absolute;
|
|
top: 0;
|
|
padding: .6rem .6rem .6rem .4rem;
|
|
}
|
|
|
|
.frontIcon {
|
|
left: 0;
|
|
}
|
|
|
|
.endIcon {
|
|
right: 0;
|
|
}
|
|
|
|
input[type=text]:active, input[type=text]:focus,
|
|
input[type=password]:active, input[type=password]:focus {
|
|
border: 1px solid var(--input-border-active);
|
|
}
|
|
|
|
input[type=text]:active~.frontIcon, input[type=text]:focus~.frontIcon,
|
|
input[type=password]:active~.frontIcon, input[type=password]:focus~.frontIcon,
|
|
input[type=text]:active~.endIcon, input[type=text]:focus~.endIcon,
|
|
input[type=password]:active~.endIcon, input[type=password]:focus~.endIcon {
|
|
color: var(--input-icon-color-active);
|
|
}
|
|
|
|
input[type=text]~.endIcon, input[type=text]~.endIcon,
|
|
input[type=password]~.endIcon, input[type=password]~.endIcon {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
|
|
.advancedInput {
|
|
/* position: relative; uncomment! otherwise the drop down inside would not be able to overflow and add a scroll bar to the container which is not desired in this case! */
|
|
}
|
|
|
|
input ~ .dropdown {
|
|
position: absolute;
|
|
display: none;
|
|
z-index: 3;
|
|
}
|
|
|
|
input:focus ~ .dropdown, input ~ .dropdown.active {
|
|
display: inline-block;
|
|
}
|
|
|
|
select {
|
|
cursor: pointer;
|
|
padding: 0 7px 0 7px; /* overwrites input padding: 7px. don't know why i have to do this! */
|
|
}
|
|
|
|
option {
|
|
line-height: 1rem;
|
|
}
|
|
|
|
input[type="file"] {
|
|
border: 1px solid var(--input-border-active);
|
|
width: 100%;
|
|
max-width: 100%;
|
|
color: var(--input-color);
|
|
padding: 10px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
input::placeholder {
|
|
color: var(--input-icon-color);
|
|
opacity: 0.5;
|
|
}
|
|
|
|
input::placeholder {
|
|
font-family: 'FontAwesome', serif;
|
|
}
|
|
|
|
input:invalid {
|
|
transition: all 0.5s;
|
|
border-color: #f00;
|
|
}
|
|
|
|
textarea, .textarea {
|
|
overflow: auto;
|
|
resize: both;
|
|
min-height: 100px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
span.checkbox, span.radio {
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
|
|
label {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
span.checkbox input[type="checkbox"], span.radio input[type="radio"] {
|
|
position: relative;
|
|
vertical-align: middle;
|
|
bottom: 1px;
|
|
margin-right: 5px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
input[type="range"] {
|
|
border: none;
|
|
width: 100%;
|
|
min-width: 150px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.input {
|
|
width: 100%;
|
|
min-width: 120px;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-wrap: nowrap;
|
|
|
|
button {
|
|
box-sizing: border-box;
|
|
display: inline-block;
|
|
background: var(--button-colored-background);
|
|
height: 2rem;
|
|
font-size: 1rem;
|
|
min-width: 40px;
|
|
border-left: solid 1px var(--input-border);
|
|
border-top: solid 1px var(--input-border);
|
|
border-bottom: solid 1px var(--input-border);
|
|
border-right: none;
|
|
padding: 0;
|
|
|
|
position: relative;
|
|
vertical-align: middle;
|
|
flex-grow: 0;
|
|
flex-shrink: 0;
|
|
|
|
&:hover {
|
|
background: var(--button-colored-background-hover);
|
|
}
|
|
}
|
|
|
|
i {
|
|
position: relative;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
input {
|
|
box-sizing: border-box;
|
|
font-size: 1rem;
|
|
|
|
position: relative;
|
|
vertical-align: middle;
|
|
flex-grow: 1;
|
|
flex-shrink: 1;
|
|
}
|
|
}
|
|
|
|
select.plain {
|
|
width: auto;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: none;
|
|
outline: none;
|
|
display: inline-block;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
cursor: pointer;
|
|
box-shadow: none;
|
|
}
|