Skip to content

Commit

Permalink
💄 Fix less code style
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Apr 15, 2019
1 parent 5725131 commit a2a9831
Show file tree
Hide file tree
Showing 57 changed files with 88 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
"plugins": ["stylelint-order", "stylelint-declaration-block-no-ignored-properties"],
"rules": {
"comment-empty-line-before": null,
"declaration-empty-line-before": null,
"function-name-case": ["lower", { "ignoreFunctions": ["/colorPalette/"] }],
"no-invalid-double-slash-comments": null,
"no-descending-specificity": null,
"plugin/declaration-block-no-ignored-properties": true
"no-descending-specificity": null
},
"ignoreFiles": ["components/style/color/{bezierEasing,colorPalette,tinyColor}.less"]
}
1 change: 1 addition & 0 deletions components/alert/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

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

position: relative;
padding: 8px 15px 8px 37px;
border-radius: @border-radius-base;
Expand Down
1 change: 1 addition & 0 deletions components/anchor/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

position: relative;
padding-left: @anchor-border-width;

Expand Down
1 change: 1 addition & 0 deletions components/auto-complete/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
}
&[disabled] {
.disabled;

background-color: transparent;
}
}
Expand Down
1 change: 1 addition & 0 deletions components/avatar/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

position: relative;
display: inline-block;
overflow: hidden;
Expand Down
1 change: 1 addition & 0 deletions components/back-top/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

position: fixed;
right: 100px;
bottom: 50px;
Expand Down
1 change: 1 addition & 0 deletions components/badge/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

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

position: relative;
display: inline-block;
color: unset;
Expand Down
1 change: 1 addition & 0 deletions components/breadcrumb/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

color: @breadcrumb-base-color;
font-size: @breadcrumb-font-size;

Expand Down
6 changes: 6 additions & 0 deletions components/button/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
&:active,
&.active {
.button-color(@btn-disable-color; @btn-disable-bg; @btn-disable-border);

text-shadow: none;
box-shadow: none;
}
Expand All @@ -25,6 +26,7 @@

.button-variant-primary(@color; @background) {
.button-color(@color; @background; @background);

text-shadow: @btn-text-shadow;
box-shadow: @btn-primary-shadow;

Expand Down Expand Up @@ -86,6 +88,7 @@
}
.button-variant-ghost(@color) {
.button-color(@color; transparent; @color);

text-shadow: none;
&:hover,
&:focus {
Expand Down Expand Up @@ -136,11 +139,13 @@
&-lg > .@{btnClassName},
&-lg > span > .@{btnClassName} {
.button-size(@btn-height-lg; @btn-padding-lg; @btn-font-size-lg; 0);

line-height: @btn-height-lg - 2px;
}
&-sm > .@{btnClassName},
&-sm > span > .@{btnClassName} {
.button-size(@btn-height-sm; @btn-padding-sm; @font-size-base; 0);

line-height: @btn-height-sm - 2px;
> .@{iconfont-css-prefix} {
font-size: @font-size-base;
Expand Down Expand Up @@ -214,6 +219,7 @@
// dashed button style
.btn-dashed() {
.button-variant-other(@btn-default-color, @btn-default-bg, @btn-default-border);

border-style: dashed;
}
// danger button style
Expand Down
1 change: 1 addition & 0 deletions components/calendar/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

.@{full-calendar-prefix-cls} {
.reset-component;

border-top: @border-width-base @border-style-base @border-color-base;
outline: none;

Expand Down
1 change: 1 addition & 0 deletions components/card/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

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

position: relative;
background: @component-background;
border-radius: @card-radius;
Expand Down
2 changes: 2 additions & 0 deletions components/cascader/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

&-picker {
.reset-component;

position: relative;
display: inline-block;
background-color: @component-background;
Expand Down Expand Up @@ -206,6 +207,7 @@
&-expand &-expand-icon,
&-expand &-loading-icon {
.iconfont-size-under-12px(10px);

position: absolute;
right: @control-padding-horizontal;
color: @text-color-secondary;
Expand Down
5 changes: 5 additions & 0 deletions components/checkbox/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// 一般状态
.@{checkbox-prefix-cls} {
.reset-component;

position: relative;
top: -0.09em;
display: inline-block;
Expand Down Expand Up @@ -57,6 +58,7 @@
&::after {
@check-width: (@checkbox-size / 14) * 5px;
@check-height: (@checkbox-size / 14) * 8px;

position: absolute;
top: 50%;
left: 21%;
Expand Down Expand Up @@ -139,6 +141,7 @@

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

display: inline-block;
line-height: unset;
cursor: pointer;
Expand All @@ -155,6 +158,7 @@

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

display: inline-block;
&-item {
display: inline-block;
Expand All @@ -177,6 +181,7 @@
.@{checkbox-inner-prefix-cls}::after {
@indeterminate-width: @checkbox-size - 8px;
@indeterminate-height: @checkbox-size - 8px;

top: 50%;
left: 50%;
width: @indeterminate-width;
Expand Down
2 changes: 2 additions & 0 deletions components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

background-color: @collapse-header-bg;
border: @border-width-base @border-style-base @border-color-base;
border-bottom: 0;
Expand All @@ -30,6 +31,7 @@

.@{collapse-prefix-cls}-arrow {
.iconfont-mixin();

position: absolute;
top: 50%;
left: @padding-md;
Expand Down
1 change: 1 addition & 0 deletions components/date-picker/style/Calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
.btn;
.btn-primary;
.button-size(@btn-height-sm; @btn-padding-sm; @font-size-base; @border-radius-base);

line-height: @btn-height-sm - 2px;

.button-disabled();
Expand Down
2 changes: 2 additions & 0 deletions components/date-picker/style/Picker.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

.@{calendar-prefix-cls}-picker-container {
.reset-component;

position: absolute;
z-index: @zindex-picker;
font-family: @font-family;
Expand Down Expand Up @@ -33,6 +34,7 @@

.@{calendar-prefix-cls}-picker {
.reset-component;

position: relative;
display: inline-block;
outline: none;
Expand Down
1 change: 1 addition & 0 deletions components/date-picker/style/RangePicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
.@{calendar-prefix-cls}-input,
.@{calendar-timepicker-prefix-cls}-input {
.input;

height: @input-height-sm;
padding-right: 0;
padding-left: 0;
Expand Down
1 change: 1 addition & 0 deletions components/divider/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

background: @border-color-split;

&, /* for compatiable */
Expand Down
1 change: 1 addition & 0 deletions components/dropdown/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

position: absolute;
top: -9999px;
left: -9999px;
Expand Down
1 change: 1 addition & 0 deletions components/form/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ input[type='checkbox'] {
}

.reset-component;

margin-bottom: @form-item-margin-bottom;
vertical-align: top;

Expand Down
1 change: 1 addition & 0 deletions components/grid/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Grid system
.@{ant-prefix}-row {
.make-row();

display: block;
box-sizing: border-box;
}
Expand Down
3 changes: 3 additions & 0 deletions components/input-number/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.@{input-number-prefix-cls} {
.reset-component;
.input;

display: inline-block;
width: 90px;
margin: 0;
Expand Down Expand Up @@ -37,6 +38,7 @@
&-handler-up-inner,
&-handler-down-inner {
.iconfont-mixin();

position: absolute;
right: 4px;
width: 12px;
Expand Down Expand Up @@ -116,6 +118,7 @@
.@{input-number-prefix-cls}-handler-up-inner,
.@{input-number-prefix-cls}-handler-down-inner {
.iconfont-size-under-12px(7px);

min-width: auto;
margin-right: 0;
}
Expand Down
1 change: 1 addition & 0 deletions components/list/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

position: relative;

* {
Expand Down
3 changes: 3 additions & 0 deletions components/mention/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@

.@{mention-prefix-cls}-wrapper {
.reset-component;

position: relative;
display: inline-block;
width: 100%;
vertical-align: middle;

.@{mention-prefix-cls}-editor {
.input;

display: block;
height: auto; // To override height in .input mixin
min-height: @input-height-base;
Expand Down Expand Up @@ -50,6 +52,7 @@

.@{mention-prefix-cls}-dropdown {
.reset-component;

position: absolute;
top: -9999px;
left: -9999px;
Expand Down
2 changes: 1 addition & 1 deletion components/menu/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// default theme
.@{menu-prefix-cls} {
.reset-component;

margin-bottom: 0;
padding-left: 0; // Override default ul/ol
color: @menu-item-color;
Expand Down Expand Up @@ -225,7 +226,6 @@
background: ~'@{menu-item-color} \9';
background-image: linear-gradient(to right, @menu-item-color, @menu-item-color);
background-image: ~'none \9';

border-radius: 2px;
transition: background 0.3s @ease-in-out, transform 0.3s @ease-in-out,
top 0.3s @ease-in-out;
Expand Down
1 change: 1 addition & 0 deletions components/message/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

position: fixed;
top: 16px;
left: 0;
Expand Down
1 change: 1 addition & 0 deletions components/modal/style/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

position: relative;
top: 100px;
width: auto;
Expand Down
2 changes: 2 additions & 0 deletions components/notification/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,13 @@
&-fade-appear {
opacity: 0;
.notification-fade-effect();

animation-play-state: paused;
}

&-fade-leave {
.notification-fade-effect();

animation-duration: 0.2s;
animation-play-state: paused;
}
Expand Down
1 change: 1 addition & 0 deletions components/page-header/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

position: relative;
padding: @page-header-padding-vertical @page-header-padding-horizontal;
background: @component-background;
Expand Down
Loading

0 comments on commit a2a9831

Please sign in to comment.