From 89601b5b8cda7d89009a53b0c5b470cef0e02b9f Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Mon, 26 Aug 2019 21:11:46 +0800 Subject: [PATCH] update style --- components/button/style/mixin.less | 16 +++-------- components/drawer/style/index.js | 3 +++ components/input/style/index.less | 22 --------------- components/modal/style/confirm.less | 4 +++ components/select/style/index.less | 2 +- components/statistic/style/index.less | 39 ++++++++++++++++++--------- components/style/themes/default.less | 6 ++--- components/tree/style/index.less | 7 ++--- 8 files changed, 43 insertions(+), 56 deletions(-) diff --git a/components/button/style/mixin.less b/components/button/style/mixin.less index c21ed0755..b8e0adb68 100644 --- a/components/button/style/mixin.less +++ b/components/button/style/mixin.less @@ -16,7 +16,7 @@ &:focus, &:active, &.active { - .button-color(@color; @background; @border); + .button-color(@btn-disable-color; @btn-disable-bg; @btn-disable-border); text-shadow: none; box-shadow: none; } @@ -89,21 +89,11 @@ text-shadow: none; &:hover, &:focus { - & when (@border = transparent) { - .button-color(~`colorPalette('@{color}', 5) `; transparent; transparent); - } - & when not(@border = transparent) { - .button-color(~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) `); - } + .button-color(~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) `); } &:active, &.active { - & when (@border = transparent) { - .button-color(~`colorPalette('@{color}', 7) `; transparent; transparent); - } - & when not(@border = transparent) { - .button-color(~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) `); - } + .button-color(~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) `); } .button-disabled(); } diff --git a/components/drawer/style/index.js b/components/drawer/style/index.js index 3a3ab0de5..416ec0177 100644 --- a/components/drawer/style/index.js +++ b/components/drawer/style/index.js @@ -1,2 +1,5 @@ import '../../style/index.less'; import './index.less'; + +// style dependencies +import '../../button/style'; diff --git a/components/input/style/index.less b/components/input/style/index.less index faca6124e..390a7e39f 100644 --- a/components/input/style/index.less +++ b/components/input/style/index.less @@ -32,33 +32,11 @@ } .@{ant-prefix}-input-password-icon { - color: @text-color-secondary; cursor: pointer; transition: all 0.3s; - &:hover { color: #333; } } -.@{ant-prefix}-input-clear-icon { - color: @disabled-color; - font-size: @font-size-sm; - vertical-align: top; - cursor: pointer; - transition: color 0.3s; - - &:hover { - color: @text-color-secondary; - } - - &:active { - color: @text-color; - } - - + i { - margin-left: 6px; - } -} - @import './search-input'; diff --git a/components/modal/style/confirm.less b/components/modal/style/confirm.less index c156fd1a7..9126c9d0a 100644 --- a/components/modal/style/confirm.less +++ b/components/modal/style/confirm.less @@ -7,6 +7,10 @@ display: none; } + .@{ant-prefix}-modal-close { + display: none; + } + .@{ant-prefix}-modal-body { padding: 32px 32px 24px; } diff --git a/components/select/style/index.less b/components/select/style/index.less index 8af34857f..8b7ff1b37 100644 --- a/components/select/style/index.less +++ b/components/select/style/index.less @@ -556,7 +556,7 @@ font-size: 12px; text-shadow: 0 0.1px 0, 0.1px 0 0, 0 -0.1px 0, -0.1px 0; transform: translateY(-50%); - transition: all 0.2s; + transition: all .2s; } &:hover .@{select-prefix-cls}-selected-icon { diff --git a/components/statistic/style/index.less b/components/statistic/style/index.less index 240535822..340385068 100644 --- a/components/statistic/style/index.less +++ b/components/statistic/style/index.less @@ -5,19 +5,34 @@ .@{statistic-prefix-cls} { .reset-component; - display: inline-block; - white-space: nowrap; - overflow: hidden; - vertical-align: middle; - &-content-value, - &-content-prefix { - font-size: 1.7em; + &-title { + margin-bottom: 4px; + font-size: @statistic-title-font-size; } - &-content-value-decimal { - font-size: 0.7em; - } - &-content-suffix { - font-size: 1.1em; + + &-content { + font-size: @statistic-content-font-size; + font-family: @statistic-font-family; + + &-value { + &-decimal { + font-size: @statistic-unit-font-size; + } + } + + &-prefix, + &-suffix { + display: inline-block; + } + + &-prefix { + margin-right: 4px; + } + + &-suffix { + margin-left: 4px; + font-size: @statistic-unit-font-size; + } } } diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 07d809d16..d80425490 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -38,9 +38,9 @@ @body-background: #fff; // Base background color for most components @component-background: #fff; -@font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', - 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', - 'Segoe UI Emoji', 'Segoe UI Symbol'; +@font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', + 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; @code-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; @heading-color: fade(@black, 85%); @text-color: fade(@black, 65%); diff --git a/components/tree/style/index.less b/components/tree/style/index.less index 60a8fe78a..2f63f55c6 100644 --- a/components/tree/style/index.less +++ b/components/tree/style/index.less @@ -164,11 +164,7 @@ } } } - ul > li { - &:first-child { - padding-top: 4px; - } - } + > li { &:first-child { padding-top: 7px; @@ -182,6 +178,7 @@ &-open { display: block; } + // https://github.com/ant-design/ant-design/issues/14958 > li { // Provide additional padding between top child node and parent node