Skip to content

Commit

Permalink
Include parenthesis on mixin calls to support less 4.0.0 (#28465)
Browse files Browse the repository at this point in the history
  • Loading branch information
qlchan24 committed Dec 22, 2020
1 parent 8f1466a commit 263d8ec
Show file tree
Hide file tree
Showing 51 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion components/alert/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@alert-prefix-cls: ~'@{ant-prefix}-alert';

.@{alert-prefix-cls} {
.reset-component;
.reset-component();

position: relative;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion components/anchor/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@anchor-border-width: 2px;

.@{ant-prefix}-anchor {
.reset-component;
.reset-component();

position: relative;
padding-left: @anchor-border-width;
Expand Down
2 changes: 1 addition & 1 deletion components/auto-complete/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@autocomplete-prefix-cls: ~'@{select-prefix-cls}-auto-complete';

.@{autocomplete-prefix-cls} {
.reset-component;
.reset-component();

// https://github.com/ant-design/ant-design/issues/22302
.@{select-prefix-cls}-clear {
Expand Down
2 changes: 1 addition & 1 deletion components/avatar/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@avatar-prefix-cls: ~'@{ant-prefix}-avatar';

.@{avatar-prefix-cls} {
.reset-component;
.reset-component();

position: relative;
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion components/back-top/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@backtop-prefix-cls: ~'@{ant-prefix}-back-top';

.@{backtop-prefix-cls} {
.reset-component;
.reset-component();

position: fixed;
right: 100px;
Expand Down
2 changes: 1 addition & 1 deletion components/badge/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@number-prefix-cls: ~'@{ant-prefix}-scroll-number';

.@{badge-prefix-cls} {
.reset-component;
.reset-component();

position: relative;
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion components/badge/style/ribbon.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.@{ribbon-prefix-cls} {
.reset-component;
.reset-component();

position: absolute;
top: 8px;
Expand Down
2 changes: 1 addition & 1 deletion components/breadcrumb/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@breadcrumb-prefix-cls: ~'@{ant-prefix}-breadcrumb';

.@{breadcrumb-prefix-cls} {
.reset-component;
.reset-component();

color: @breadcrumb-base-color;
font-size: @breadcrumb-font-size;
Expand Down
2 changes: 1 addition & 1 deletion components/breadcrumb/style/rtl.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.@{breadcrumb-prefix-cls} {
&-rtl {
.clearfix;
.clearfix();
direction: rtl;

> span {
Expand Down
24 changes: 12 additions & 12 deletions components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// It is a render problem of chrome, which is only happened in the codesandbox demo
// 0.001px solution works and I don't why
line-height: @btn-line-height;
.btn;
.btn-default;
.btn();
.btn-default();

// Fix loading button animation
// https://github.com/ant-design/ant-design/issues/24323
Expand All @@ -30,7 +30,7 @@
}

&-primary {
.btn-primary;
.btn-primary();

.@{btn-prefix-cls}-group &:not(:first-child):not(:last-child) {
border-right-color: @btn-group-border;
Expand Down Expand Up @@ -62,41 +62,41 @@
}

&-ghost {
.btn-ghost;
.btn-ghost();
}

&-dashed {
.btn-dashed;
.btn-dashed();
}

// type="danger" will deprecated
// use danger instead
&-danger {
.btn-danger;
.btn-danger();
}

&-link {
.btn-link;
.btn-link();
}

&-text {
.btn-text;
.btn-text();
}

&-dangerous {
.btn-danger-default;
.btn-danger-default();
}

&-dangerous&-primary {
.btn-danger;
.btn-danger();
}

&-dangerous&-link {
.btn-danger-link;
.btn-danger-link();
}

&-dangerous&-text {
.btn-danger-text;
.btn-danger-text();
}

&-icon-only {
Expand Down
2 changes: 1 addition & 1 deletion components/calendar/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@calendar-picker-prefix-cls: ~'@{ant-prefix}-picker';

.@{calendar-prefix-cls} {
.reset-component;
.reset-component();
background: @calendar-full-bg;

// ========================= Header =========================
Expand Down
10 changes: 5 additions & 5 deletions components/card/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@gradient-max: fade(@card-skeleton-bg, 40%);

.@{card-prefix-cls} {
.reset-component;
.reset-component();

position: relative;
background: @card-background;
Expand Down Expand Up @@ -43,7 +43,7 @@
background: @card-head-background;
border-bottom: @border-width-base @border-style-base @border-color-split;
border-radius: @card-radius @card-radius 0 0;
.clearfix;
.clearfix();

&-wrapper {
display: flex;
Expand Down Expand Up @@ -96,7 +96,7 @@

&-body {
padding: @card-padding-base;
.clearfix;
.clearfix();
}

&-contain-grid:not(&-loading) &-body {
Expand Down Expand Up @@ -160,7 +160,7 @@
list-style: none;
background: @card-actions-background;
border-top: @border-width-base @border-style-base @border-color-split;
.clearfix;
.clearfix();

& > li {
float: left;
Expand Down Expand Up @@ -230,7 +230,7 @@

&-meta {
margin: -4px 0;
.clearfix;
.clearfix();

&-avatar {
float: left;
Expand Down
2 changes: 1 addition & 1 deletion components/carousel/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@carousel-prefix-cls: ~'@{ant-prefix}-carousel';

.@{carousel-prefix-cls} {
.reset-component;
.reset-component();

.slick-slider {
position: relative;
Expand Down
8 changes: 4 additions & 4 deletions components/cascader/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@cascader-prefix-cls: ~'@{ant-prefix}-cascader';

.@{cascader-prefix-cls} {
.reset-component;
.reset-component();

&-input.@{ant-prefix}-input {
// Keep it static for https://github.com/ant-design/ant-design/issues/16738
Expand All @@ -24,7 +24,7 @@
}

&-picker {
.reset-component;
.reset-component();

position: relative;
display: inline-block;
Expand All @@ -48,7 +48,7 @@
}

&:focus .@{cascader-prefix-cls}-input {
.active;
.active();
}

&-borderless .@{cascader-prefix-cls}-input {
Expand Down Expand Up @@ -116,7 +116,7 @@
// https://github.com/ant-design/ant-design/pull/12407#issuecomment-424657810
&-picker-label:hover + &-input {
&:not(.@{cascader-prefix-cls}-picker-disabled &) {
.hover;
.hover();
}
}

Expand Down
6 changes: 3 additions & 3 deletions components/checkbox/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@checkbox-inner-prefix-cls: ~'@{checkbox-prefix-cls}-inner';
// 一般状态
.@{checkbox-prefix-cls} {
.reset-component;
.reset-component();

position: relative;
top: -0.09em;
Expand Down Expand Up @@ -147,7 +147,7 @@
}

.@{checkbox-prefix-cls}-wrapper {
.reset-component;
.reset-component();

display: inline-block;
line-height: unset;
Expand All @@ -166,7 +166,7 @@
}

.@{checkbox-prefix-cls}-group {
.reset-component;
.reset-component();

display: inline-block;
&-item {
Expand Down
4 changes: 2 additions & 2 deletions components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@collapse-prefix-cls: ~'@{ant-prefix}-collapse';

.@{collapse-prefix-cls} {
.reset-component;
.reset-component();

background-color: @collapse-header-bg;
border: @border-width-base @border-style-base @border-color-base;
Expand All @@ -29,7 +29,7 @@
line-height: @line-height-base;
cursor: pointer;
transition: all 0.3s;
.clearfix;
.clearfix();

.@{collapse-prefix-cls}-arrow {
.iconfont-mixin();
Expand Down
4 changes: 2 additions & 2 deletions components/date-picker/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@input-padding-vertical-sm - 2 * @border-width-base;
@arrow-size: 10px;

.reset-component;
.reset-component();
.picker-padding(@input-height-base, @font-size-base, @input-padding-horizontal-base);
position: relative;
display: inline-flex;
Expand Down Expand Up @@ -217,7 +217,7 @@

// ======================= Dropdown =======================
&-dropdown {
.reset-component;
.reset-component();
position: absolute;
z-index: @zindex-picker;

Expand Down
2 changes: 1 addition & 1 deletion components/divider/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@divider-prefix-cls: ~'@{ant-prefix}-divider';

.@{divider-prefix-cls} {
.reset-component;
.reset-component();

border-top: @border-width-base solid @divider-color;

Expand Down
2 changes: 1 addition & 1 deletion components/dropdown/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@dropdown-prefix-cls: ~'@{ant-prefix}-dropdown';

.@{dropdown-prefix-cls} {
.reset-component;
.reset-component();

position: absolute;
top: -9999px;
Expand Down
6 changes: 3 additions & 3 deletions components/form/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
@form-font-height: ceil(@font-size-base * @line-height-base);

.@{form-prefix-cls} {
.reset-component;
.reset-form;
.reset-component();
.reset-form();

.@{form-prefix-cls}-text {
display: inline-block;
Expand Down Expand Up @@ -57,7 +57,7 @@
// = Item =
// ================================================================
.@{form-item-prefix-cls} {
.reset-component;
.reset-component();

margin-bottom: @form-item-margin-bottom;
vertical-align: top;
Expand Down
10 changes: 5 additions & 5 deletions components/image/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
}

&-placeholder {
.box;
.box();
}

&-preview {
.modal-mask;
.modal-mask();

height: 100%;
text-align: center;

&-body {
.box;
.box();
overflow: hidden;
}

Expand All @@ -45,7 +45,7 @@
user-select: none;
pointer-events: auto;
&-wrapper {
.box;
.box();
transition: transform 0.3s @ease-out 0s;
&::before {
display: inline-block;
Expand All @@ -71,7 +71,7 @@
}

&-operations {
.reset-component;
.reset-component();
position: absolute;
top: 0;
right: 0;
Expand Down
Loading

0 comments on commit 263d8ec

Please sign in to comment.