From 8fd09ac1b2ff5aff8239e783a6871ed0ae45d4bf Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 19 Apr 2016 15:09:17 +0800 Subject: [PATCH] control focus shadow should be transparent --- style/components/form.less | 8 ++++---- style/components/slider.less | 3 +-- style/components/switch.less | 2 +- style/mixins/form.less | 4 ++-- style/mixins/input.less | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/style/components/form.less b/style/components/form.less index 80705bffdb..ae4073547d 100644 --- a/style/components/form.less +++ b/style/components/form.less @@ -350,7 +350,7 @@ form { .@{select-prefix-cls} { &-selection { border-color: @warning-color; - box-shadow: 0 0 0 2px tint(@warning-color, 80%); + box-shadow: 0 0 0 2px fade(@warning-color, 20%); } &-arrow { color: @warning-color; @@ -370,7 +370,7 @@ form { // ant-input-number .@{input-number-prefix-cls} { border-color: @warning-color; - box-shadow: 0 0 0 2px tint(@warning-color, 80%); + box-shadow: 0 0 0 2px fade(@warning-color, 20%); &:not([disabled]):hover { border-color: @warning-color; } @@ -389,7 +389,7 @@ form { .@{select-prefix-cls} { &-selection { border-color: @error-color; - box-shadow: 0 0 0 2px tint(@error-color, 80%); + box-shadow: 0 0 0 2px fade(@error-color, 20%); } &-arrow { @@ -414,7 +414,7 @@ form { // ant-input-number .@{input-number-prefix-cls} { border-color: @error-color; - box-shadow: 0 0 0 2px tint(@error-color, 80%); + box-shadow: 0 0 0 2px fade(@error-color, 20%); &:not([disabled]):hover { border-color: @error-color; } diff --git a/style/components/slider.less b/style/components/slider.less index f6f0de2640..c3e33ca014 100644 --- a/style/components/slider.less +++ b/style/components/slider.less @@ -60,9 +60,8 @@ &-active { &:active { - @color-rgba: rgba(red(@primary-color), green(@primary-color), blue(@primary-color), .2); border-color: tint(@primary-color, 20%); - box-shadow: 0 0 0 2px @color-rgba; + box-shadow: 0 0 0 2px fade(@primary-color, 80%); } } } diff --git a/style/components/switch.less b/style/components/switch.less index 066f513146..3bae032932 100644 --- a/style/components/switch.less +++ b/style/components/switch.less @@ -38,7 +38,7 @@ } &:focus { - box-shadow: 0 0 0 2px tint(@primary-color, 80%); + box-shadow: 0 0 0 2px fade(@primary-color, 20%); outline: 0; } diff --git a/style/mixins/form.less b/style/mixins/form.less index 41e5ccfb00..79cec3bf66 100644 --- a/style/mixins/form.less +++ b/style/mixins/form.less @@ -6,7 +6,7 @@ // 输入框的不同校验状态 .@{css-prefix}input { border-color: @border-color; - box-shadow: 0 0 0 2px tint(@border-color, 80%); + box-shadow: 0 0 0 2px fade(@border-color, 20%); &:not([disabled]):hover { border-color: @border-color; @@ -14,7 +14,7 @@ } .@{calendar-prefix-cls}-picker-open .@{calendar-prefix-cls}-picker-input { - box-shadow: 0 0 0 2px tint(@border-color, 80%); + box-shadow: 0 0 0 2px fade(@border-color, 20%); } .@{css-prefix}input-group-addon { diff --git a/style/mixins/input.less b/style/mixins/input.less index 745be74d54..115f8ceeb8 100644 --- a/style/mixins/input.less +++ b/style/mixins/input.less @@ -15,7 +15,7 @@ .active(@color: @input-hover-border-color) { border-color: tint(@color, 20%); outline: 0; - box-shadow: 0 0 0 2px tint(@color, 80%); + box-shadow: 0 0 0 2px fade(@color, 20%); } // == when hoverd