Files
vxe-table/styles/input.scss
xuliangzhan 4652c3609c 优化重构
2020-02-24 14:30:11 +08:00

154 lines
2.8 KiB
SCSS

/**Variable**/
/*input*/
.vxe-input,
.vxe-textarea {
font-size: $vxe-font-size;
display: inline-block;
}
.vxe-textarea {
width: 100%;
}
.vxe-input--inner,
.vxe-textarea--inner {
border-radius: 0.25em;
outline: 0;
padding: 0 0.6em;
color: $vxe-font-color;
border: 1px solid $vxe-input-border-color;
background-color: #FFF;
&:focus {
border: 1px solid $vxe-primary-color;
}
&[disabled] {
cursor: not-allowed;
background-color: $vxe-input-disabled-background-color;
}
}
.vxe-input--inner,
.vxe-textarea--inner {
width: 100%;
height: 100%;
&::placeholder {
color: $vxe-input-placeholder-color;
}
}
.vxe-textarea--inner {
display: block;
padding: 0.3em 0.6em;
}
.vxe-input {
position: relative;
&.is--disabled {
.vxe-input--prefix,
.vxe-input--suffix {
cursor: no-drop;
}
}
&:not(.is--disabled) {
.vxe-input--prefix,
.vxe-input--suffix {
cursor: pointer;
}
}
.vxe-input--prefix,
.vxe-input--suffix {
display: flex;
position: absolute;
top: 0;
width: 1.8em;
height: 100%;
align-items: center;
justify-content: center;
color: $vxe-table-column-icon-border-color;
}
.vxe-input--prefix {
left: 0.2em;
}
.vxe-input--suffix {
right: 0.2em;
}
.vxe-input--clear-icon {
display: none;
}
&.is--prefix {
.vxe-input--inner {
padding-left: 2em;
}
}
&.is--suffix {
.vxe-input--inner {
padding-right: 2em;
}
&:hover {
.vxe-input--suffix {
&.is--clear {
.vxe-input--suffix-icon {
display: none;
}
.vxe-input--clear-icon {
display: inline;
}
}
}
}
}
}
.vxe-input {
height: $vxe-input-height-default;
.vxe-input--inner {
&[type="date"]::-webkit-inner-spin-button {
margin-top: 6px;
}
&[type="date"]::-webkit-inner-spin-button,
&[type="number"]::-webkit-inner-spin-button {
height: 24px;
}
}
&.size--medium {
font-size: $vxe-font-size-medium;
height: $vxe-input-height-medium;
.vxe-input--inner {
&[type="date"]::-webkit-inner-spin-button {
margin-top: 4px;
}
}
}
&.size--small {
font-size: $vxe-font-size-small;
height: $vxe-input-height-small;
.vxe-input--inner {
&[type="date"]::-webkit-inner-spin-button {
margin-top: 2px;
}
}
}
&.size--mini {
font-size: $vxe-font-size-mini;
height: $vxe-input-height-mini;
.vxe-input--inner {
&[type="date"]::-webkit-inner-spin-button {
margin-top: 0;
}
}
}
}
.vxe-textarea {
min-height: $vxe-input-height-default;
&.size--medium {
min-height: $vxe-input-height-medium;
}
&.size--small {
min-height: $vxe-input-height-small;
}
&.size--mini {
min-height: $vxe-input-height-mini;
}
}