Skip to content

Commit

Permalink
chore: sync ant-design v4.2.3 (ant-design-blazor#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderJames authored May 16, 2020
1 parent 6f45149 commit 76cf6ab
Show file tree
Hide file tree
Showing 18 changed files with 162 additions and 139 deletions.
7 changes: 0 additions & 7 deletions components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
line-height: @line-height-base;
.btn;
.btn-default;
// Make sure that the target of Button's click event always be `button`
// Ref: https://github.com/ant-design/ant-design/issues/7034
> i,
> span {
display: inline-block;
pointer-events: none;
}

&-primary {
.btn-primary;
Expand Down
1 change: 0 additions & 1 deletion components/button/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@
.button-size(
@btn-height-sm; @btn-padding-horizontal-sm; @btn-font-size-sm; @btn-border-radius-sm
);
line-height: @btn-height-sm - 2px;
}
}
// primary button style
Expand Down
2 changes: 1 addition & 1 deletion components/card/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
// https://stackoverflow.com/a/22429853/3040605
margin-left: auto;
padding: @card-head-padding 0;
color: @text-color;
color: @card-head-extra-color;
font-weight: normal;
font-size: @font-size-base;

Expand Down
10 changes: 9 additions & 1 deletion components/date-picker/style/panel.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
@picker-panel-width: @picker-panel-cell-width * 7 + @padding-sm * 2 + 4;

&-panel {
display: inline-block;
display: inline-flex;
flex-direction: column;
text-align: center;
background: @calendar-bg;
border: @border-width-base @border-style-base @picker-border-color;
Expand Down Expand Up @@ -400,6 +401,8 @@

// ======================== Footer ========================
&-footer {
width: min-content;
min-width: 100%;
line-height: @picker-text-height - 2 * @border-width-base;
text-align: center;
border-bottom: @border-width-base @border-style-base transparent;
Expand Down Expand Up @@ -433,6 +436,11 @@
&:active {
color: @link-active-color;
}

&&-disabled {
color: @disabled-color;
cursor: not-allowed;
}
}

// ========================================================
Expand Down
17 changes: 3 additions & 14 deletions components/drawer/style/drawer.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@

&-content-wrapper {
position: absolute;
width: 100%;
height: 100%;
}

.@{drawer-prefix-cls}-content {
width: 100%;
height: 100%;
Expand All @@ -37,13 +40,6 @@
width: 100%;
transition: transform @animation-duration-slow @ease-base-out;
}
&.@{drawer-prefix-cls}-open.no-mask {
height: 0%;

.@{drawer-prefix-cls}-content-wrapper {
height: 100vh;
}
}
}

&-left {
Expand Down Expand Up @@ -95,13 +91,6 @@
height: 100%;
transition: transform @animation-duration-slow @ease-base-out;
}
&.@{drawer-prefix-cls}-open.no-mask {
width: 0%;

.@{drawer-prefix-cls}-content-wrapper {
width: 100vw;
}
}
}

&-top {
Expand Down
13 changes: 9 additions & 4 deletions components/menu/style/dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@

&-dark &-item,
&-dark &-item-group-title,
&-dark &-item > a {
&-dark &-item > a,
&-dark &-item > span > a {
color: @menu-dark-color;
}

Expand Down Expand Up @@ -76,7 +77,8 @@
&-dark &-submenu-title:hover {
color: @menu-dark-highlight-color;
background-color: transparent;
> a {
> a,
> span > a {
color: @menu-dark-highlight-color;
}
> .@{menu-prefix-cls}-submenu-title,
Expand Down Expand Up @@ -105,7 +107,9 @@
border-right: 0;
}
> a,
> a:hover {
> span > a,
> a:hover,
> span > a:hover {
color: @menu-dark-highlight-color;
}
.@{iconfont-css-prefix} {
Expand All @@ -125,7 +129,8 @@
&-dark &-item-disabled,
&-dark &-submenu-disabled {
&,
> a {
> a,
> span > a {
color: @disabled-color-dark !important;
opacity: 0.8;
}
Expand Down
12 changes: 6 additions & 6 deletions components/menu/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@
}
}

&-dark {
.@{menu-prefix-cls}-inline,
.@{menu-prefix-cls}-vertical {
.@{menu-prefix-cls}-rtl& {
border-left: none;
}

&-dark&-inline,
&-dark&-vertical {
.@{menu-prefix-cls}-rtl& {
border-left: none;
}
}

Expand Down Expand Up @@ -152,6 +151,7 @@
}

&-sub&-inline {
border: 0;
& .@{menu-prefix-cls}-item-group-title {
.@{menu-prefix-cls}-rtl& {
padding-right: 32px;
Expand Down
1 change: 1 addition & 0 deletions components/pagination/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
vertical-align: top;
.@{pagination-prefix-cls}-item-link {
height: @pagination-item-size-sm;
background-color: transparent;
border: 0;
&::after {
height: @pagination-item-size-sm;
Expand Down
6 changes: 6 additions & 0 deletions components/pagination/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
}
}

&-slash {
.@{pagination-prefix-cls}-rtl & {
margin: 0 5px 0 10px;
}
}

&-options {
.@{pagination-prefix-cls}-rtl & {
margin-right: 16px;
Expand Down
1 change: 1 addition & 0 deletions components/select/style/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
.@{select-prefix-cls}-rtl& {
margin-right: 0;
margin-left: @input-padding-vertical-base;
padding: 0 @padding-xs 0 (@padding-xs / 2);
text-align: right;
}
// It's ok not to do this, but 24px makes bottom narrow in view should adjust
Expand Down
10 changes: 9 additions & 1 deletion components/select/style/single.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
padding: 0;
line-height: @select-height-without-border;
transition: all 0.3s;
pointer-events: none;

// Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
@supports (-moz-appearance: meterbar) {
Expand All @@ -34,6 +33,15 @@
}
}

.@{select-prefix-cls}-selection-item {
position: relative;
user-select: none;
}

.@{select-prefix-cls}-selection-placeholder {
pointer-events: none;
}

// For common baseline align
&::after,
// For '' value baseline align
Expand Down
4 changes: 2 additions & 2 deletions components/style/themes/compact.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
@btn-padding-horizontal-base: @default-padding-sm - 1px;
@btn-padding-horizontal-lg: @btn-padding-horizontal-base;
@btn-padding-horizontal-sm: @default-padding-xs - 1px;
@btn-square-only-icon-size: 14px;
@btn-square-only-icon-size-sm: 14px;
@btn-square-only-icon-size-lg: 16px;
@btn-square-only-icon-size: 14px;
@btn-square-only-icon-size-sm: 12px;

// Breadcrumb
// ---
Expand Down
1 change: 1 addition & 0 deletions components/style/themes/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@
0 5px 12px 4px rgba(0, 0, 0, 0.09);
@card-radius: @border-radius-base;
@card-head-tabs-margin-bottom: -17px;
@card-head-extra-color: @text-color;

// Comment
// ---
Expand Down
16 changes: 12 additions & 4 deletions components/switch/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
height: @switch-sm-height - 4px;
}

&:active::before,
&:active::after {
&:not(.@{switch-prefix-cls}-loading):active::before,
&:not(.@{switch-prefix-cls}-loading):active::after {
width: 16px;
}
}
Expand All @@ -119,6 +119,12 @@
margin-right: 18px;
margin-left: 3px;
}
&::after {
left: @switch-sm-min-width - (@switch-sm-height - 2px);
}
&:not(.@{switch-prefix-cls}-disabled):active::after {
left: 2px;
}
}

&-small&-checked &-loading-icon {
Expand All @@ -141,9 +147,11 @@
}

&::after {
left: 100%;
left: @switch-min-width - (@switch-height - 2px);
margin-left: -1px;
transform: translateX(-100%);
}
&:not(.@{switch-prefix-cls}-disabled):active::after {
left: @switch-min-width - (@switch-height + 4px);
}
}

Expand Down
Loading

0 comments on commit 76cf6ab

Please sign in to comment.