salix/client/core/src/components/textfield/style.scss

133 lines
2.9 KiB
SCSS
Raw Normal View History

2018-06-28 13:54:54 +00:00
@import "colors";
vn-textfield {
2018-06-28 13:54:54 +00:00
margin: 20px 0!important;
2018-07-03 12:33:31 +00:00
display: inline-block;
2018-06-28 13:54:54 +00:00
2018-07-03 12:33:31 +00:00
& > .container {
2018-06-20 06:41:59 +00:00
width: 100%;
2018-06-28 13:54:54 +00:00
position: relative;
padding-bottom: 2px;
2018-07-03 12:33:31 +00:00
display: flex;
& > .textField {
width: 100%;
display: flex;
align-items: center;
position: relative;
padding-top: 4px;
}
2018-06-20 06:41:59 +00:00
}
2018-07-03 12:33:31 +00:00
.leftIcons, .rightIcons, .suffix {
display: flex;
color: $secondary-font-color;
& .material-icons {
font-size: 20px !important
}
2018-06-28 13:54:54 +00:00
}
.infix {
position: relative;
display: block;
flex: auto;
2018-06-20 06:41:59 +00:00
width: 100%;
2018-06-28 13:54:54 +00:00
min-width: 0;
}
2018-07-03 12:33:31 +00:00
i.clear {
2018-06-28 13:54:54 +00:00
visibility: hidden;
2018-07-03 12:33:31 +00:00
cursor: pointer;
&:hover {
color: #222;
}
}
&:hover i.clear {
visibility: visible;
2018-06-28 13:54:54 +00:00
}
i.visible {
visibility: visible;
}
label {
position: absolute;
bottom: 2px;
pointer-events: none;
color: $secondary-font-color;
transition-duration: .2s;
transition-timing-function: cubic-bezier(.4,0,.2,1);
}
input {
outline: none;
border: none;
2018-07-03 12:33:31 +00:00
font-family: "Helvetica", "Arial", sans-serif;
2018-06-28 13:54:54 +00:00
display: block;
font-size: 16px;
width: 100%;
background: 0 0;
color: inherit;
2018-07-03 12:33:31 +00:00
padding: 4px;
box-sizing: border-box;
2018-06-28 13:54:54 +00:00
&[type=number] {
-moz-appearance: textfield;
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button{
-webkit-appearance: none;
margin: 0;
}
2018-06-21 07:12:35 +00:00
}
2018-06-28 13:54:54 +00:00
&:invalid {
2018-07-03 12:33:31 +00:00
box-shadow: none;
2018-06-21 07:12:35 +00:00
}
2018-06-20 06:41:59 +00:00
}
2018-07-03 12:33:31 +00:00
.underline {
2018-06-28 13:54:54 +00:00
position: absolute;
bottom: 0;
height: 1px;
content: ' ';
pointer-events: none;
width: 100%;
background-color: rgba(0,0,0,.12);
}
2018-07-03 12:33:31 +00:00
.selected.underline {
2018-06-28 13:54:54 +00:00
background-color: rgb(255,152,0);
height: 2px;
left: 50%;
2018-07-03 12:33:31 +00:00
width: 0px !important;
2018-06-28 13:54:54 +00:00
transition-duration: 0.2s;
transition-timing-function: cubic-bezier(.4,0,.2,1);
}
&.not-empty {
& label {
bottom: 24px;
color: $main-01;
font-size: 12px;
}
}
2018-07-03 12:33:31 +00:00
div.selected {
2018-06-28 13:54:54 +00:00
&.container{
border-bottom: 0px;
}
& label {
bottom: 24px;
color: $main-01;
font-size: 12px;
}
& .selected.underline{
left: 0;
width: 100%!important;
}
}
2018-07-03 12:33:31 +00:00
& > div.container > div.textField > div.infix.invalid {
2018-06-28 13:54:54 +00:00
@extend div.selected;
2018-07-03 12:33:31 +00:00
& > span.mdl-textfield__error {
2018-06-28 13:54:54 +00:00
visibility: visible;
margin-top: 9px;
}
2018-07-03 12:33:31 +00:00
& > label {
2018-06-28 13:54:54 +00:00
color: #d50000;
}
}
.infix.invalid + .underline {
2018-07-03 12:33:31 +00:00
background-color: #d50000;
2017-12-19 11:29:35 +00:00
}
}