From f6a1eca7e0f58c0f3004d2081b99e3fd308be346 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 12 Jul 2017 14:51:13 +0800 Subject: [PATCH] Tweak switch style --- components/switch/demo/text.md | 2 +- components/switch/style/index.less | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/switch/demo/text.md b/components/switch/demo/text.md index e10efcd267..1ed727daf1 100644 --- a/components/switch/demo/text.md +++ b/components/switch/demo/text.md @@ -17,7 +17,7 @@ With text and icon. import { Switch, Icon } from 'antd'; ReactDOM.render(
- +

diff --git a/components/switch/style/index.less b/components/switch/style/index.less index 1bc8059e4d..8d3bcc552c 100644 --- a/components/switch/style/index.less +++ b/components/switch/style/index.less @@ -2,7 +2,7 @@ @import "../../style/mixins/index"; @switch-prefix-cls: ~"@{ant-prefix}-switch"; -@switch-duration: .3s; +@switch-duration: .36s; .@{switch-prefix-cls} { position: relative; @@ -13,7 +13,7 @@ line-height: 20px; vertical-align: middle; border-radius: 20px; - border: 1px solid #ccc; + border: 1px solid transparent; background-color: @disabled-color; cursor: pointer; transition: all @switch-duration; @@ -38,7 +38,7 @@ background-color: @component-background; content: " "; cursor: pointer; - transition: all @switch-duration, width @switch-duration; + transition: all @switch-duration @ease-in-out-circ; } &:active:after { @@ -93,7 +93,6 @@ } &-checked { - border-color: @primary-color; background-color: @primary-color; .@{switch-prefix-cls}-inner { @@ -114,7 +113,6 @@ &-disabled { cursor: not-allowed; background: #f4f4f4; - border-color: #f4f4f4; &:after { background: #ccc;