audio-vis/raw/scss/_input.scss

377 lines
5.9 KiB
SCSS

.range {
-webkit-appearance: none;
width: 100%;
margin: 5px 0;
}
.range.center {
margin-left: auto;
margin-right: auto;
}
.range.right {
margin-left: 10%;
}
.range:focus {
outline: none;
}
.range::-webkit-slider-runnable-track {
width: 100%;
height: 5px;
cursor: pointer;
background: rgba(0, 0, 0, 0.12);
border-radius: 15px;
border: none;
}
.range::-webkit-slider-thumb {
border: 0 solid rgba(0, 0, 30, 0);
height: 15px;
width: 15px;
border-radius: 15px;
background: #ff0089;
cursor: pointer;
-webkit-appearance: none;
margin-top: -5px;
}
.range:focus::-webkit-slider-runnable-track {
background: rgba(89, 89, 89, 0.12);
}
.range::-moz-range-track {
width: 100%;
height: 5px;
cursor: pointer;
background: rgba(0, 0, 0, 0.12);
border-radius: 15px;
border: none;
}
.range::-moz-range-thumb {
border: 0 solid rgba(0, 0, 30, 0);
height: 15px;
width: 15px;
border-radius: 15px;
background: #ff0089;
cursor: pointer;
}
.range::-ms-track {
width: 100%;
height: 5px;
cursor: pointer;
background: transparent;
border-color: transparent;
color: transparent;
}
.range::-ms-fill-lower {
background: rgba(0, 0, 0, 0.12);
border: none;
border-radius: 30px;
}
.range::-ms-fill-upper {
background: rgba(0, 0, 0, 0.12);
border: none;
border-radius: 30px;
}
.range::-ms-thumb {
border: 0 solid rgba(0, 0, 30, 0);
height: 15px;
width: 15px;
border-radius: 15px;
background: #ff0089;
cursor: pointer;
}
.range:focus::-ms-fill-lower {
background: rgba(0, 0, 0, 0.12);
}
.range:focus::-ms-fill-upper {
background: rgba(89, 89, 89, 0.12);
}
.input {
width: 100%;
position: relative;
display: inline-block;
margin-top: 1rem;
background-color: transparent;
&-range {
margin-bottom: 20px;
}
}
input:focus + .input:after {
width: 100%;
}
.input input:not([type=range]) {
border: none;
border-bottom: 2px solid #dcdcdc;
position: relative;
width: 100%;
background-color: transparent;
padding: 5px;
color: #fff;
}
.input input:not([type=range]):focus {
outline: none;
}
.input.center {
margin-left: auto;
margin-right: auto;
}
.input.right {
margin-left: 10%;
}
.input-label {
display: none;
}
.floating-label .input-label {
display: block;
position: absolute;
top: 0;
transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
pointer-events: none;
border-bottom: 1px solid transparent;
}
.floating-label input:focus ~ .input-label,
.floating-label input:valid ~ .input-label {
transform: translateY(-0.72rem);
color: $active;
font-size: .7rem;
}
.floating-label input:valid ~ .input-label {
transform: translateY(-0.72rem);
color: $second;
font-size: .7rem;
}
.focus {
content: '';
width: 0;
background-color: $second;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
height: 2px;
transition: 0.4s cubic-bezier(0.8, 0.4, 0.25, 1);
}
input:focus ~ .focus {
width: 100%;
}
* {
box-sizing: border-box;
}
switch {
display: flex;
flex-direction: row;
padding: 5px;
input {
position: absolute;
appearance: none;
opacity: 0;
&:checked + label:after {
transform: translateX(20px);
}
}
span {
margin-left: 10px;
}
label {
display: block;
border-radius: 10px;
width: 40px;
height: 20px;
background-color: #dcdcdc;
position: relative;
cursor: pointer;
padding: 0;
&:after {
content: '';
background-color: $primary;
position: absolute;
top: 2px;
left: 2px;
height: 16px;
width: 16px;
border-radius: 10px;
transition: .5s;
}
}
}
input[type="file"] {
position: fixed;
left: -100000vw;
height: 1px;
width: 1px;
}
input[type="color"] {
opacity: 0;
}
.color-picker {
position: relative;
input {
position: absolute !important;
top: 0;
}
}
.colorBlob {
display: block;
width: 100%;
height: 20px;
margin: 5px 0;
}
.button {
text-align: center;
user-select: none;
border-radius: 5px;
border: 1px solid $primary;
padding: 0.5em 1em;
cursor: pointer;
transition: .5s;
&.spaced {
margin-bottom: 10px;
}
&:hover {
border-color: $second;
border-radius: 7px;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}
}
.input {
.max, .min, .current {
font-size: .8em;
color: $second;
position: absolute;
bottom: -1rem;
}
.current {
display: block;
width: 100%;
text-align: center;
}
.min {
left: 0;
}
.max {
right: 0;
}
}
custom-select {
width: auto;
min-width: 200px;
display: block;
label {
color: #ff0089;
font-size: .7rem;
}
input {
display: none;
}
.label {
padding: 10px 30px 10px 10px;
cursor: pointer;
position: relative;
transition: all .3s;
box-shadow: inset 0 0 3px rgba(94, 94, 94, 1);
&::after {
content: '';
border: solid #dcdcdc;
border-width: 0 3px 3px 0;
display: inline-block;
padding: 3px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transition: all .3s ease-in-out;
position: absolute;
right: 10px;
top: calc(50% - 6px);
}
}
custom-options {
max-height: 0;
overflow: hidden;
transition: all .5s ease;
font-size: .9em;
display: block;
border: 1px solid transparent;
}
custom-option {
display: block;
width: 100%;
padding: 10px 5px;
cursor: pointer;
box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, .08);
&:hover {
background-color: $primary;
color: #fff;
}
}
custom-option.active {
font-weight: bold;
}
}
custom-select.open {
.label {
&::after {
transform: rotate(-135deg);
-webkit-transform: rotate(-135deg);
top: calc(50% - 3px);
}
background-color: rgba(0, 0, 0, .1);
}
custom-options {
max-height: none;
border: 1px solid $nav !important;
}
}