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

153 lines
3.2 KiB
SCSS
Raw Normal View History

2019-02-06 10:24:29 +00:00
@import "variables";
2019-02-08 16:49:51 +00:00
vn-textfield {
2019-04-05 13:20:12 +00:00
margin: 20px 0;
2018-07-03 12:33:31 +00:00
display: inline-block;
width: 100%;
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;
2019-02-08 16:49:51 +00:00
color: $color-font-secondary;
2019-04-12 12:33:08 +00:00
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;
2019-02-08 16:49:51 +00:00
color: $color-font-secondary;
2018-06-28 13:54:54 +00:00
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;
2019-02-08 16:49:51 +00:00
color: $color-main;
2018-07-04 14:36:37 +00:00
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%;
2019-02-08 16:49:51 +00:00
background-color: $color-input-underline;
}
2018-07-03 12:33:31 +00:00
.selected.underline {
2019-02-08 16:49:51 +00:00
background-color: $color-main;
2018-06-28 13:54:54 +00:00
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;
2019-02-08 16:49:51 +00:00
color: $color-main;
2018-06-28 13:54:54 +00:00
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
}
2019-04-05 13:20:12 +00:00
}
vn-table {
vn-textfield {
margin: 0;
}
}