Skip to content

Commit

Permalink
chore: sync ant-design v3.20.3 (#3793)
Browse files Browse the repository at this point in the history
  • Loading branch information
ng-zorro-bot authored and vthinkxie committed Jul 16, 2019
1 parent feae069 commit a50b550
Show file tree
Hide file tree
Showing 20 changed files with 218 additions and 173 deletions.
1 change: 1 addition & 0 deletions components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
> i,
> span {
display: inline-block;
transition: margin-left 0.3s @ease-in-out;
pointer-events: none;
}

Expand Down
6 changes: 4 additions & 2 deletions components/cascader/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
// Keep it static for https://github.com/ant-design/ant-design/issues/16738
position: static;
width: 100%;
// https://github.com/ant-design/ant-design/issues/17582
padding-right: 24px;
// Add important to fix https://github.com/ant-design/ant-design/issues/5078
// because input.less will compile after cascader.less
background-color: transparent !important;
Expand Down Expand Up @@ -60,7 +62,7 @@
width: 100%;
height: 20px;
margin-top: -10px;
padding: 0 @control-padding-horizontal;
padding: 0 20px 0 @control-padding-horizontal;
overflow: hidden;
line-height: 20px;
white-space: nowrap;
Expand Down Expand Up @@ -211,7 +213,7 @@
}

&-expand &-expand-icon,
&-expand &-loading-icon {
&-loading-icon {
.iconfont-size-under-12px(10px);

position: absolute;
Expand Down
6 changes: 3 additions & 3 deletions components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
background-color: @collapse-header-bg;
border: @border-width-base @border-style-base @border-color-base;
border-bottom: 0;
border-radius: @border-radius-base;
border-radius: @collapse-panel-border-radius;

& > &-item {
border-bottom: @border-width-base @border-style-base @border-color-base;

&:last-child {
&,
& > .@{collapse-prefix-cls}-header {
border-radius: 0 0 @border-radius-base @border-radius-base;
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
}
}

Expand Down Expand Up @@ -97,7 +97,7 @@

&-item:last-child {
> .@{collapse-prefix-cls}-content {
border-radius: 0 0 @border-radius-base @border-radius-base;
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
}
}

Expand Down
81 changes: 65 additions & 16 deletions components/date-picker/style/Calendar.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
.calendarLeftArrow() {
height: 100%;

&::before,
&::after {
position: relative;
top: -1px;
display: inline-block;
width: 8px;
height: 8px;
vertical-align: middle;
border: 0 solid #aaa;
border-width: 1.5px 0 0 1.5px;
border-radius: 1px;
transform: rotate(-45deg) scale(.8);
transition: all .3s;
content: '';
}

&:hover::before,
&:hover::after {
border-color: @text-color;
}

&::after {
display: none;
}
}

.calendarLeftDoubleArrow() {
.calendarLeftArrow;

&::after {
position: relative;
left: -3px;
display: inline-block;
}
}

.calendarRightArrow() {
.calendarLeftArrow;

&::before,
&::after {
transform: rotate(135deg) scale(.8);
}
}

.calendarRightDoubleArrow() {
.calendarRightArrow;

&::before {
position: relative;
left: 3px;
}

&::after {
display: inline-block;
}
}

.calendarPanelHeader(@calendar-prefix-cls) {
height: 40px;
line-height: 40px;
Expand Down Expand Up @@ -49,36 +110,24 @@
.@{calendar-prefix-cls}-prev-decade-btn,
.@{calendar-prefix-cls}-prev-year-btn {
left: 7px;

&::after {
content: '«';
}
.calendarLeftDoubleArrow;
}

.@{calendar-prefix-cls}-next-century-btn,
.@{calendar-prefix-cls}-next-decade-btn,
.@{calendar-prefix-cls}-next-year-btn {
right: 7px;

&::after {
content: '»';
}
.calendarRightDoubleArrow;
}

.@{calendar-prefix-cls}-prev-month-btn {
left: 29px;

&::after {
content: '';
}
.calendarLeftArrow;
}

.@{calendar-prefix-cls}-next-month-btn {
right: 29px;

&::after {
content: '';
}
.calendarRightArrow;
}
}

Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/style/RangePicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@
.@{calendar-prefix-cls}-input,
.@{calendar-timepicker-prefix-cls}-input {
.input;

height: @input-height-sm;
padding-right: 0;
padding-left: 0;
line-height: @input-height-sm;
border: 0;
box-shadow: none;

Expand Down
31 changes: 17 additions & 14 deletions components/date-picker/style/TimePicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
&-select {
position: relative; // Fix chrome weird render bug
float: left;
box-sizing: border-box;
height: 226px;
overflow: hidden;
font-size: @font-size-base;
Expand All @@ -68,7 +67,6 @@
}

ul {
box-sizing: border-box;
width: 100%;
max-height: 206px;
margin: 0;
Expand All @@ -77,30 +75,35 @@
}

li {
box-sizing: content-box;
width: 100%;
height: 24px;
margin: 0;
padding-left: 32px;
line-height: 24px;
text-align: center;
list-style: none;
cursor: pointer;
transition: background 0.3s ease;
transition: all .3s;
user-select: none;
}

li:last-child::after {
display: block;
height: 202px;
content: '';
}
&:last-child::after {
display: block;
height: 202px;
content: '';
}

li:hover {
background: @item-hover-bg;
&:hover {
background: @item-hover-bg;
}

&:focus {
color: @primary-color;
font-weight: 600;
outline: none;
}
}

li&-option-selected {
font-weight: bold;
font-weight: 600;
background: @time-picker-selected-bg;
}

Expand Down
67 changes: 33 additions & 34 deletions components/descriptions/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
}

&-row {
> th,
> td {
padding-bottom: 16px;
}
Expand All @@ -37,9 +38,11 @@

&-item-label {
color: @heading-color;
font-weight: normal;
font-size: @font-size-base;
line-height: @line-height-base;
white-space: nowrap;

&::after {
position: relative;
top: -0.5px;
Expand All @@ -48,6 +51,13 @@
}
}

&-item-no-label {
&::after {
margin: 0;
content: '';
}
}

&-item-content {
display: table-cell;
color: @text-color;
Expand All @@ -60,49 +70,31 @@
> span {
display: inline-block;
}
.@{descriptions-prefix-cls}-item-label {
float: left;
padding: 0 !important;
}
.@{descriptions-prefix-cls}-item-content {
float: left;
padding: 0 !important;
}
}

// padding setting
.@{descriptions-prefix-cls}-item-label,
.@{descriptions-prefix-cls}-item-content {
padding: @descriptions-default-padding;
}

&.bordered.middle {
.@{descriptions-prefix-cls}-item-label,
.@{descriptions-prefix-cls}-item-content {
padding: @descriptions-middle-padding;
}
}
&.bordered.small {
.@{descriptions-prefix-cls}-item-label,
.@{descriptions-prefix-cls}-item-content {
padding: @descriptions-small-padding;
}
}
&.bordered {
&-bordered {
.@{descriptions-prefix-cls}-view {
border: 1px solid @border-color-split;
> table {
table-layout: auto;
}
}

.@{descriptions-prefix-cls}-item-label,
.@{descriptions-prefix-cls}-item-content {
padding: @descriptions-default-padding;
border-right: 1px solid @border-color-split;

&:last-child {
border-right: none;
}
}

.@{descriptions-prefix-cls}-item-label:last-child,
.@{descriptions-prefix-cls}-item-content:last-child {
border-right: none;
.@{descriptions-prefix-cls}-item-label {
background-color: #fafafa;
&::after {
display: none;
}
}

.@{descriptions-prefix-cls}-row {
Expand All @@ -112,10 +104,17 @@
}
}

.@{descriptions-prefix-cls}-item-label {
background-color: #fafafa;
&::after {
display: none;
&.@{descriptions-prefix-cls}-middle {
.@{descriptions-prefix-cls}-item-label,
.@{descriptions-prefix-cls}-item-content {
padding: @descriptions-middle-padding;
}
}

&.@{descriptions-prefix-cls}-small {
.@{descriptions-prefix-cls}-item-label,
.@{descriptions-prefix-cls}-item-content {
padding: @descriptions-small-padding;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions components/dropdown/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@
&-submenu-title {
clear: both;
margin: 0;
padding: 5px @control-padding-horizontal;
padding: @dropdown-vertical-padding @control-padding-horizontal;
color: @text-color;
font-weight: normal;
font-size: @font-size-base;
line-height: 22px;
font-size: @dropdown-font-size;
line-height: @dropdown-line-height;
white-space: nowrap;
cursor: pointer;
transition: all 0.3s;
Expand Down
Loading

0 comments on commit a50b550

Please sign in to comment.