salix/front/core/components/textfield/style.scss

145 lines
3.1 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-09-24 09:10:03 +00:00
2018-07-03 12:33:31 +00:00
.leftIcons, .rightIcons, .suffix {
display: flex;
color: $secondary-font-color;
2018-07-04 14:36:37 +00:00
.material-icons {
2018-07-03 12:33:31 +00:00
font-size: 20px !important
}
2018-06-28 13:54:54 +00:00
}
2018-09-24 09:10:03 +00:00
t-left-icons {
padding-right: 0.5em
}
t-right-icons {
padding-left: 0.5em
}
2018-06-28 13:54:54 +00:00
.infix {
2018-09-24 09:10:03 +00:00
position: relative;
2018-06-28 13:54:54 +00:00
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;
2018-07-04 14:36:37 +00:00
bottom: 0;
2018-09-19 13:05:07 +00:00
left: 0;
padding: 4px 0!important;
2018-06-28 13:54:54 +00:00
pointer-events: none;
color: $secondary-font-color;
transition-duration: .2s;
transition-timing-function: cubic-bezier(.4,0,.2,1);
}
2018-07-04 14:36:37 +00:00
&.not-empty label{
bottom: 24px;
color: $main-01;
padding: 0;
font-size: 12px;
}
2018-06-28 13:54:54 +00:00
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;
border-bottom: 0!important;
2018-06-28 13:54:54 +00:00
&[type=number] {
-moz-appearance: textfield;
&::-webkit-outer-spin-button,
2018-07-04 14:36:37 +00:00
&::-webkit-inner-spin-button {
2018-06-28 13:54:54 +00:00
-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);
}
2018-07-04 14:36:37 +00:00
2018-07-03 12:33:31 +00:00
div.selected {
2018-06-28 13:54:54 +00:00
&.container{
border-bottom: 0px;
}
2018-07-04 14:36:37 +00:00
label {
2018-06-28 13:54:54 +00:00
bottom: 24px;
color: $main-01;
font-size: 12px;
}
2018-07-04 14:36:37 +00:00
.selected.underline{
2018-06-28 13:54:54 +00:00
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;
}
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
}
}