update some styles

update some styles
This commit is contained in:
梁灏 2017-01-04 17:37:16 +08:00
parent 4a260ed5e4
commit e93f1e9a76
8 changed files with 115 additions and 4 deletions

View file

@ -85,3 +85,11 @@
}
}
}
.@{form-item-prefix-cls}-error{
.@{cascader-prefix-cls} {
&-arrow{
color: @error-color;
}
}
}

View file

@ -39,6 +39,15 @@
font-size: @font-size-small;
}
&-error-tip{
position: absolute;
top: 100%;
left: 0;
line-height: 1;
padding-top: 6px;
color: @error-color;
}
&-required {
.@{form-item-prefix-cls}-label:before {
content: '*';

View file

@ -184,3 +184,12 @@
}
}
}
.@{form-item-prefix-cls}-error {
.@{input-number-prefix-cls}{
.input-error;
&-focused {
.active-error;
}
}
}

View file

@ -42,4 +42,16 @@
.@{input-prefix-cls}-group{
.input-group(~"@{input-prefix-cls}");
}
.@{form-item-prefix-cls}-error{
.@{input-prefix-cls}{
.input-error;
&-icon{
color: @error-color;
}
}
.@{input-prefix-cls}-group{
.input-group-error;
}
}

View file

@ -217,3 +217,17 @@
line-height: 30px;
}
}
.@{form-item-prefix-cls}-error{
.@{select-prefix-cls}{
&-selection{
border: 1px solid @error-color;
}
&-arrow{
color: @error-color;
}
&-visible .@{select-prefix-cls}-selection{
.active-error;
}
}
}

View file

@ -1,12 +1,20 @@
.hover(@color: @input-hover-border-color) {
border-color: tint(@color, 20%);
}
.hover-error() {
border-color: @error-color;
}
.active(@color: @input-hover-border-color) {
border-color: tint(@color, 20%);
outline: 0;
box-shadow: 0 0 0 2px fade(@color, 20%);
}
.active-error() {
border-color: @error-color;
outline: 0;
box-shadow: 0 0 0 2px fade(@error-color, 20%);
}
.disabled() {
background-color: @input-disabled-bg;
@ -78,6 +86,16 @@
}
}
.input-error() {
border: 1px solid @error-color;
&:hover {
.hover-error;
}
&:focus {
.active-error;
}
}
.input-group(@inputClass) {
display: table;
width: 100%;
@ -214,3 +232,24 @@
.input-small();
}
}
.input-group-error{
&-prepend,
&-append
{
background-color: #fff;
border: 1px solid @error-color;
.@{css-prefix}select {
&-selection {
background-color: inherit;
border: 1px solid transparent;
}
}
}
&-prepend {
border-right: 0;
}
&-append {
border-left: 0;
}
}