Skip to content

Commit

Permalink
style: add @divider-orientation-margin less (#24877)
Browse files Browse the repository at this point in the history
* style: add `@divider-text-left-width` less

* fix: name
  • Loading branch information
xrkffgg committed Jun 10, 2020
1 parent 6619c14 commit d380a8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
9 changes: 4 additions & 5 deletions components/divider/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@import '../../style/mixins/index';

@divider-prefix-cls: ~'@{ant-prefix}-divider';
@divider-text-padding: 1em;

.@{divider-prefix-cls} {
.reset-component;
Expand Down Expand Up @@ -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;
}
}

Expand Down
8 changes: 4 additions & 4 deletions components/divider/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@
&-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;
}
}
}

&-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;
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions components/style/themes/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d380a8d

Please sign in to comment.