Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync ant-design v3.24.1 #4313

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,4 @@ a.@{btn-prefix-cls} {
&-sm {
line-height: @btn-height-sm - 2px;
}
}
}
2 changes: 1 addition & 1 deletion components/button/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -351,4 +351,4 @@
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
}
2 changes: 1 addition & 1 deletion components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

.@{collapse-prefix-cls}-arrow {
right: @padding-md;
left: initial;
left: auto;
}
}
}
Expand Down
13 changes: 12 additions & 1 deletion components/dropdown/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@
> .@{dropdown-prefix-cls}-menu {
transform-origin: 0 0;
}

ul,
li {
list-style: none;
}

ul {
margin-right: 0.3em;
margin-left: 0.3em;
}
}

&-item,
Expand All @@ -87,9 +97,10 @@
cursor: pointer;
transition: all 0.3s;

> .anticon:first-child {
> span > .anticon:first-child {
min-width: 12px;
margin-right: 8px;
font-size: @font-size-sm;
}

> a {
Expand Down
2 changes: 1 addition & 1 deletion components/form/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

position: relative;
top: -0.5px;
margin: 0 8px 0 2px;
margin: 0 @form-item-label-colon-margin-right 0 @form-item-label-colon-margin-left;
}

&.@{form-prefix-cls}-item-no-colon::after {
Expand Down
1 change: 0 additions & 1 deletion components/input/style/search-input.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
border: 0;

.@{search-prefix}-button {
width: 100%;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
Expand Down
20 changes: 12 additions & 8 deletions components/page-header/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@

.@{pageheader-prefix-cls} {
.reset-component;

position: relative;
padding: @page-header-padding;
padding: @page-header-padding-vertical @page-header-padding;
background-color: @component-background;

&-ghost {
background-color: inherit;
}

&.has-breadcrumb {
padding-top: @page-header-padding-breadcrumb;
}

&.has-footer {
padding-bottom: @page-header-padding-vertical;
padding-bottom: 0;
}

&-back {
float: left;
margin: 6px 0;
margin: 8px 0;
margin-right: 16px;
font-size: 20px;
font-size: 16px;
line-height: 1;
&-button {
.operation-unit();
Expand Down Expand Up @@ -50,7 +54,7 @@
padding-right: 12px;
color: @heading-color;
font-weight: 600;
font-size: @heading-3-size;
font-size: @heading-4-size;
line-height: 32px;
}

Expand Down Expand Up @@ -85,7 +89,7 @@
}

&-content {
padding-top: 16px;
padding-top: 12px;
overflow: hidden;
}

Expand All @@ -112,4 +116,4 @@
}
}
}
}
}
1 change: 0 additions & 1 deletion components/slider/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
width: 14px;
height: 14px;
margin-top: -5px;
margin-left: -7px;
background-color: @slider-handle-background-color;
border: solid @slider-handle-border-width @slider-handle-color;
border-radius: 50%;
Expand Down
1 change: 1 addition & 0 deletions components/style/mixins/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
@import 'motion';
@import 'reset';
@import 'operation-unit';
@import 'typography';
49 changes: 49 additions & 0 deletions components/style/mixins/typography.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// =============== Common ===============
.typography-paragraph() {
margin-bottom: 1em;
}

.typography-title(@fontSize; @fontWeight; @lineHeight; @headingColor; @headingMarginBottom;) {
margin-bottom: @headingMarginBottom;
color: @headingColor;
font-weight: @fontWeight;
font-size: @fontSize;
line-height: @lineHeight;
}

.typography-title-1() {
.typography-title(
@heading-1-size,
@typography-title-font-weight,
1.23,
@heading-color,
@typography-title-margin-bottom
);
}
.typography-title-2() {
.typography-title(
@heading-2-size,
@typography-title-font-weight,
1.35,
@heading-color,
@typography-title-margin-bottom
);
}
.typography-title-3() {
.typography-title(
@heading-3-size,
@typography-title-font-weight,
1.35,
@heading-color,
@typography-title-margin-bottom
);
}
.typography-title-4() {
.typography-title(
@heading-4-size,
@typography-title-font-weight,
1.4,
@heading-color,
@typography-title-margin-bottom
);
}
4 changes: 4 additions & 0 deletions components/style/themes/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@
@form-item-trailing-colon: true;
@form-vertical-label-padding: 0 0 8px;
@form-vertical-label-margin: 0;
@form-item-label-colon-margin-right: 8px;
@form-item-label-colon-margin-left: 2px;
@form-error-input-bg: @input-bg;

// Input
Expand Down Expand Up @@ -682,3 +684,5 @@
// Typography
// ---
@typography-title-font-weight: 600;
@typography-title-margin-top: 1.2em;
@typography-title-margin-bottom: 0.5em;
34 changes: 29 additions & 5 deletions components/table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
border-spacing: 0;
}

&-layout-fixed table {
table-layout: fixed;
}

&-thead > tr > th {
color: @table-header-color;
font-weight: 500;
Expand Down Expand Up @@ -169,6 +173,7 @@

.@{table-prefix-cls}-header-column {
display: inline-block;
max-width: 100%;
vertical-align: top;

.@{table-prefix-cls}-column-sorters {
Expand Down Expand Up @@ -328,6 +333,7 @@
&-thead > tr > th,
&-tbody > tr > td {
padding: @table-padding-vertical @table-padding-horizontal;
overflow-wrap: break-word;
}

&-expand-icon-th,
Expand Down Expand Up @@ -471,10 +477,6 @@
overflow: hidden;
}

.@{ant-prefix}-checkbox-wrapper + span {
padding-left: 8px;
}

> .@{ant-prefix}-dropdown-menu > .@{ant-prefix}-dropdown-menu-item:last-child,
> .@{ant-prefix}-dropdown-menu
> .@{ant-prefix}-dropdown-menu-submenu:last-child
Expand Down Expand Up @@ -579,6 +581,22 @@
content: '.';
}
}

&-cell-ellipsis,
&-cell-ellipsis .@{table-prefix-cls}-column-title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

&-cell-ellipsis .@{table-prefix-cls}-column-title {
display: block;
}

&-cell-break-word {
word-wrap: break-word;
word-break: break-word;
}
}

tr&-expanded-row {
Expand All @@ -600,7 +618,6 @@
overflow: auto;
overflow-x: hidden;
table {
width: auto;
min-width: 100%;

// https://github.com/ant-design/ant-design/issues/14545
Expand Down Expand Up @@ -756,6 +773,13 @@
}
}

.@{table-prefix-cls}-filter-dropdown,
.@{table-prefix-cls}-filter-dropdown-submenu {
.@{ant-prefix}-checkbox-wrapper + span {
padding-left: 8px;
}
}

/**
* Another fix of Firefox:
*/
Expand Down
27 changes: 0 additions & 27 deletions components/typography/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,6 @@
@import '../../style/mixins/index';

@typography-prefix-cls: ~'@{ant-prefix}-typography';
@typography-title-margin-top: 1.2em;

// =============== Common ===============
.typography-paragraph() {
margin-bottom: 1em;
}

.typography-title(@fontSize; @lineHeight) {
margin-bottom: 0.5em;
color: @heading-color;
font-weight: @typography-title-font-weight;
font-size: @fontSize;
line-height: @lineHeight;
}

.typography-title-1() {
.typography-title(@heading-1-size, 1.23);
}
.typography-title-2() {
.typography-title(@heading-2-size, 1.35);
}
.typography-title-3() {
.typography-title(@heading-3-size, 1.35);
}
.typography-title-4() {
.typography-title(@heading-4-size, 1.4);
}

// =============== Basic ===============
.@{typography-prefix-cls} {
Expand Down
Loading