You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

143 lines
3.0 KiB

$color--white : #ffffff;
$color--black : #000000;
$color--light-grey : #E6E6E6;
$color--grey : #CCCCCC;
$color--dark-grey : #7B7B7B;
$color--primary : #2AA1C0;
$color--secondary : #0E647D;
$text-color : $color--black;
$line-color : $color--light-grey;
$line-color-after : $color--primary;
$label-color : $color--dark-grey;
$label-color-after : $color--primary;
.input {
position: relative;
z-index: 1;
margin : 1em 0;
display: inline-block;
width : 100%;
max-width: 100%;
vertical-align: top;
}
.input_field {
position: relative;
display: block;
float: right;
padding: 0.8em;
width: 60%;
border: none;
border-radius: 0;
background: transparent;
color: $label-color-after;
font-weight: 400;
-webkit-appearance: none; /* for box shadows to show on iOS */
}
.input_field:focus {
outline: none;
}
.input_label {
display: inline-block;
float: right;
padding: 0 1em;
width: 40%;
color: $label-color;
font-weight: 400;
font-size: 60.25%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.input_label_content {
position: relative;
display: block;
padding: 1.2em 0;
width: 100%;
}
/* Individual styles */
/* Ruri */
.input_field_mui {
width: 100%;
background: transparent;
padding: 0.5em 0;
font-size: 100%;
margin-bottom: 0em;
color: $text-color;
}
.input_label_mui {
width: 100%;
position: absolute;
opacity: 0.6;
text-align: left;
font-size: 1em;
padding: 10px 0 10px 0;
pointer-events: none;
}
.input_label_mui::before {
content: '';
position: absolute;
width: 100%;
height: 1px;
background: $line-color;
left: 0%;
top: 85%;
}
.input_label_mui::after {
content: '';
position: absolute;
width: 0%;
height: 2px;
background: $line-color;
left: 45%;
top: 85%;
-webkit-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
transition: all 300ms ease-in-out;
// -webkit-transform-origin: 50% 100%;
// transform-origin: 50% 100%;
// -webkit-transition: -webkit-transform 0.3s, background-color 0.3s;
// transition: transform 0.3s, background-color 0.3s;
}
.input_label_content_mui {
padding: 0;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transition: -webkit-transform 0.3s, color 0.3s;
transition: transform 0.3s, color 0.3s;
}
.input_field_mui:focus + .input_label_mui::after,
.input_filled .input_label_mui::after {
left: 0;
width: 100%;
background: $line-color-after;
// -webkit-transform: scale3d(1, 0.25, 1);
// transform: scale3d(1, 0.25, 1);
}
.input_field_mui:focus + .input_label_mui .input_label-content_mui,
.input_filled .input_label_mui .input_label_content_mui {
width: 100%;
font-weight: bold;
color: $label-color-after;
-webkit-transform: translate3d(0, -1.5em, 0) scale3d(0.680, 0.680, 1);
transform: translate3d(0, -1.5em, 0) scale3d(0.680, 0.680, 1);
}