Skip to content

Commit d783c4e

Browse files
committed
style: update style
1 parent efffdcb commit d783c4e

26 files changed

+1217
-161
lines changed

components/descriptions/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const DescriptionsItem = defineComponent({
5454
});
5555

5656
const DEFAULT_COLUMN_MAP: Partial<Record<Breakpoint, number>> = {
57+
xxxl: 3,
5758
xxl: 3,
5859
xl: 3,
5960
lg: 3,

components/list/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { responsiveArray } from '../_util/responsiveObserve';
2121
export { ListItemProps } from './Item';
2222
export type { ListItemMetaProps } from './ItemMeta';
2323

24-
export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
24+
export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl';
2525

2626
export type ColumnCount = number;
2727
export interface ListGridType {

components/style/compact.less

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@root-entry-name: default;
2+
3+
@import './themes/compact.less';
4+
@import './core/index';

components/style/core/base.less

-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,4 @@
77
input::-ms-reveal {
88
display: none;
99
}
10-
11-
&,
12-
*,
13-
*::before,
14-
*::after {
15-
box-sizing: border-box; // 1
16-
}
1710
}

components/style/core/global.less

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* stylelint-disable at-rule-no-unknown */
1+
/* stylelint-disable property-no-vendor-prefix, at-rule-no-vendor-prefix */
22

33
// Reboot
44
//
@@ -199,6 +199,7 @@ sup {
199199
sub {
200200
bottom: -0.25em;
201201
}
202+
202203
sup {
203204
top: -0.5em;
204205
}
@@ -280,10 +281,6 @@ img {
280281
border-style: none; // remove the border on images inside links in IE 10-.
281282
}
282283

283-
svg:not(:root) {
284-
overflow: hidden; // Hide the overflow in IE
285-
}
286-
287284
// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
288285
//
289286
// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11
@@ -322,12 +319,6 @@ caption {
322319
caption-side: bottom;
323320
}
324321

325-
th {
326-
// Matches default `<td>` alignment by inheriting from the `<body>`, or the
327-
// closest parent with a set `text-align`.
328-
text-align: inherit;
329-
}
330-
331322
//
332323
// Forms
333324
//

components/style/core/motion.less

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../mixins/motion';
1+
// @import '../mixins/motion'; This has moved to theme/xxx inside.
22
@import 'motion/fade';
33
@import 'motion/move';
44
@import 'motion/other';
@@ -8,6 +8,7 @@
88
// For common/openAnimation
99
.ant-motion-collapse-legacy {
1010
overflow: hidden;
11+
1112
&-active {
1213
transition: height @animation-duration-base @ease-in-out,
1314
opacity @animation-duration-base @ease-in-out !important;

components/style/core/motion/fade.less

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
0% {
2828
opacity: 0;
2929
}
30+
3031
100% {
3132
opacity: 1;
3233
}
@@ -36,6 +37,7 @@
3637
0% {
3738
opacity: 1;
3839
}
40+
3941
100% {
4042
opacity: 0;
4143
}

components/style/core/motion/move.less

+8
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
transform-origin: 0 0;
3333
opacity: 0;
3434
}
35+
3536
100% {
3637
transform: translateY(0%);
3738
transform-origin: 0 0;
@@ -45,6 +46,7 @@
4546
transform-origin: 0 0;
4647
opacity: 1;
4748
}
49+
4850
100% {
4951
transform: translateY(100%);
5052
transform-origin: 0 0;
@@ -58,6 +60,7 @@
5860
transform-origin: 0 0;
5961
opacity: 0;
6062
}
63+
6164
100% {
6265
transform: translateX(0%);
6366
transform-origin: 0 0;
@@ -71,6 +74,7 @@
7174
transform-origin: 0 0;
7275
opacity: 1;
7376
}
77+
7478
100% {
7579
transform: translateX(-100%);
7680
transform-origin: 0 0;
@@ -84,6 +88,7 @@
8488
transform-origin: 0 0;
8589
opacity: 0;
8690
}
91+
8792
100% {
8893
transform: translateX(0%);
8994
transform-origin: 0 0;
@@ -97,6 +102,7 @@
97102
transform-origin: 0 0;
98103
opacity: 1;
99104
}
105+
100106
100% {
101107
transform: translateX(100%);
102108
transform-origin: 0 0;
@@ -110,6 +116,7 @@
110116
transform-origin: 0 0;
111117
opacity: 0;
112118
}
119+
113120
100% {
114121
transform: translateY(0%);
115122
transform-origin: 0 0;
@@ -123,6 +130,7 @@
123130
transform-origin: 0 0;
124131
opacity: 1;
125132
}
133+
126134
100% {
127135
transform: translateY(-100%);
128136
transform-origin: 0 0;

components/style/dark.less

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
@root-entry-name: default;
2+
13
@import './themes/dark.less';
24
@import './core/index';

components/style/default.less

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// This is same as `index.less` but given `root-entry-name` for `dist/antd.less` usage
2+
@root-entry-name: default;
3+
4+
@import './index';

components/style/mixins/clearfix.less

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
// mixins for clearfix
22
// ------------------------
33
.clearfix() {
4-
&::before,
5-
&::after {
4+
// https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
5+
&::before {
66
display: table;
77
content: '';
88
}
9+
910
&::after {
11+
// https://github.com/ant-design/ant-design/issues/21864
12+
display: table;
1013
clear: both;
14+
content: '';
1115
}
1216
}

components/style/mixins/compatibility.less

+4-7
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
// Placeholder text
44
.placeholder(@color: @input-placeholder-color) {
55
// Firefox
6+
/* stylelint-disable-next-line selector-no-vendor-prefix */
67
&::-moz-placeholder {
7-
color: @color;
88
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
99
}
10-
// Internet Explorer 10+
11-
&:-ms-input-placeholder {
12-
color: @color;
13-
}
14-
// Safari and Chrome
15-
&::-webkit-input-placeholder {
10+
11+
&::placeholder {
1612
color: @color;
13+
user-select: none; // https://github.com/ant-design/ant-design/pull/32639
1714
}
1815

1916
&:placeholder-shown {

components/style/mixins/customize.less

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
.@{table-prefix-cls}-row-expand-icon {
6565
border: @popover-border;
6666
}
67+
6768
tfoot {
6869
> tr {
6970
> th,
@@ -72,6 +73,7 @@
7273
}
7374
}
7475
}
76+
7577
thead {
7678
> tr {
7779
> th {
@@ -80,6 +82,7 @@
8082
}
8183
}
8284
}
85+
8386
tbody {
8487
> tr {
8588
> td {

components/style/mixins/iconfont.less

-15
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,3 @@
2626
display: block;
2727
}
2828
}
29-
30-
// for iconfont font size
31-
// fix chrome 12px bug, support ie
32-
.iconfont-size-under-12px(@size, @rotate: 0deg) {
33-
display: inline-block;
34-
@font-scale: unit((@size / 12px));
35-
36-
font-size: 12px;
37-
// IE9
38-
font-size: ~'@{size} \9';
39-
transform: scale(@font-scale) rotate(@rotate);
40-
:root & {
41-
font-size: @font-size-sm; // reset IE9 and above
42-
}
43-
}

components/style/mixins/index.less

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
@import 'compatibility';
55
@import 'clearfix';
66
@import 'iconfont';
7-
@import 'motion';
8-
@import 'reset';
9-
@import 'operation-unit';
107
@import 'typography';
118
@import 'customize';
129
@import 'box';
1310
@import 'modal-mask';
11+
@import 'motion';
12+
@import 'reset';
13+
@import 'operation-unit';

components/style/mixins/modal-mask.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
.modal-mask() {
44
pointer-events: none;
55

6-
&.zoom-enter,
7-
&.zoom-appear {
6+
&.@{ant-prefix}-zoom-enter,
7+
&.@{ant-prefix}zoom-appear {
88
transform: none; // reset scale avoid mousePosition bug
99
opacity: 0;
1010
animation-duration: @animation-duration-slow;

components/style/mixins/operation-unit.less

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import '../../style/themes/default';
2-
31
.operation-unit() {
42
color: @link-color;
53
text-decoration: none;

components/style/mixins/reset.less

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import '../themes/index';
2-
31
.reset-component() {
42
box-sizing: border-box;
53
margin: 0;

components/style/themes/compact.less

+4-8
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
// Radio
8585
// ---
8686
@radio-size: 14px;
87-
@radio-top: -2px;
8887
@radio-wrapper-margin-right: 6px;
8988

9089
// Switch
@@ -105,7 +104,7 @@
105104
// ---
106105
@input-padding-vertical-base: round(
107106
max(
108-
round((@input-height-base - @font-size-base * @line-height-base) / 2 * 10) / 10 -
107+
(round(((@input-height-base - @font-size-base * @line-height-base) / 2) * 10) / 10) -
109108
@border-width-base,
110109
2px
111110
)
@@ -182,6 +181,7 @@
182181
// ---
183182
@drawer-header-padding: 11px @padding-lg;
184183
@drawer-footer-padding-vertical: @padding-sm;
184+
@drawer-footer-padding-horizontal: @padding-sm;
185185
@drawer-header-close-size: 44px;
186186

187187
// Modal
@@ -221,7 +221,7 @@
221221
@table-padding-horizontal-md: 8px;
222222
@table-padding-vertical-sm: 4px;
223223
@table-padding-horizontal-sm: 4px;
224-
@table-selection-column-width: 54px;
224+
@table-selection-column-width: 32px;
225225

226226
// Statistic
227227
// ---
@@ -231,12 +231,8 @@
231231
// ---
232232
@alert-with-description-no-icon-padding-vertical: 7px;
233233
@alert-with-description-padding-vertical: 11px;
234-
@alert-with-description-padding: @alert-with-description-padding-vertical 15px
235-
@alert-with-description-no-icon-padding-vertical @alert-with-description-icon-size * 2 +
236-
@alert-with-description-padding-vertical;
237-
@alert-icon-top: 7px + @font-size-base * @line-height-base / 2 - @font-size-base / 2;
234+
@alert-icon-top: 7px + @font-size-base * (@line-height-base / 2) - (@font-size-base / 2);
238235
@alert-with-description-icon-size: 20px;
239-
@alert-with-description-icon-top: @alert-with-description-padding-vertical;
240236

241237
// Skeleton
242238
// ---

components/style/themes/dark.less

+1
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@
314314
@table-header-sort-bg: #262626;
315315
@table-header-filter-active-bg: #434343;
316316
@table-header-sort-active-bg: #303030;
317+
@table-fixed-header-sort-active-bg: #222;
317318
@table-filter-btns-bg: @popover-background;
318319
@table-expanded-row-bg: @table-header-bg;
319320
@table-filter-dropdown-bg: @popover-background;

0 commit comments

Comments
 (0)