diff --git a/components/divider/style/index.less b/components/divider/style/index.less index 8c76b92ebb..86b4056fcb 100644 --- a/components/divider/style/index.less +++ b/components/divider/style/index.less @@ -2,7 +2,6 @@ @import '../../style/mixins/index'; @divider-prefix-cls: ~'@{ant-prefix}-divider'; -@divider-text-padding: 1em; .@{divider-prefix-cls} { .reset-component; @@ -51,22 +50,22 @@ &-horizontal&-with-text-left { &::before { top: 50%; - width: 5%; + width: @divider-orientation-margin; } &::after { top: 50%; - width: 95%; + width: 100% - @divider-orientation-margin; } } &-horizontal&-with-text-right { &::before { top: 50%; - width: 95%; + width: 100% - @divider-orientation-margin; } &::after { top: 50%; - width: 5%; + width: @divider-orientation-margin; } } diff --git a/components/divider/style/rtl.less b/components/divider/style/rtl.less index 12bc057105..3b3bcf9f08 100644 --- a/components/divider/style/rtl.less +++ b/components/divider/style/rtl.less @@ -11,12 +11,12 @@ &-horizontal&-with-text-left { &::before { .@{divider-prefix-cls}-rtl& { - width: 95%; + width: 100% - @divider-orientation-margin; } } &::after { .@{divider-prefix-cls}-rtl& { - width: 5%; + width: @divider-orientation-margin; } } } @@ -24,12 +24,12 @@ &-horizontal&-with-text-right { &::before { .@{divider-prefix-cls}-rtl& { - width: 5%; + width: @divider-orientation-margin; } } &::after { .@{divider-prefix-cls}-rtl& { - width: 95%; + width: 100% - @divider-orientation-margin; } } } diff --git a/components/style/themes/default.less b/components/style/themes/default.less index a4e17fc661..136b72e0ae 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -241,6 +241,10 @@ @descriptions-item-label-colon-margin-right: 8px; @descriptions-item-label-colon-margin-left: 2px; +// Divider +@divider-text-padding: 1em; +@divider-orientation-margin: 5%; + // Dropdown @dropdown-selected-color: @primary-color; @dropdown-menu-submenu-disabled-bg: @component-background;