From 9c009f9bdbe12bc47f6ca29853477654c74c3379 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Wed, 11 Nov 2020 23:44:49 +0800 Subject: [PATCH] style: add @radio-border-width (#27703) --- components/radio/style/index.less | 10 ++++------ components/style/themes/default.less | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/radio/style/index.less b/components/radio/style/index.less index 0d9cc55591..2c30a74788 100644 --- a/components/radio/style/index.less +++ b/components/radio/style/index.less @@ -78,11 +78,9 @@ &-inner { &::after { - @radio-dot-size: @radio-size - 8px; - position: absolute; - top: (@radio-size - @radio-dot-size) / 2 - 1px; - left: (@radio-size - @radio-dot-size) / 2 - 1px; + top: (@radio-size - @radio-dot-size) / 2 - @radio-border-width; + left: (@radio-size - @radio-dot-size) / 2 - @radio-border-width; display: table; width: @radio-dot-size; height: @radio-dot-size; @@ -105,8 +103,8 @@ background-color: @radio-button-bg; border-color: @border-color-base; border-style: solid; - border-width: 1px; - border-radius: 100px; + border-width: @radio-border-width; + border-radius: 50%; transition: all @radio-duration; } diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 8dbe72ef5a..142adde6ff 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -258,6 +258,8 @@ // Radio @radio-size: 16px; @radio-top: 0px; +@radio-border-width: 1px; +@radio-dot-size: @radio-size - 8px; @radio-dot-color: @primary-color; @radio-dot-disabled-color: fade(@black, 20%); @radio-solid-checked-color: @component-background;