Skip to content

Commit

Permalink
feat(less): 开启less lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanaMaid committed Aug 23, 2018
1 parent 195c055 commit d230ced
Show file tree
Hide file tree
Showing 84 changed files with 238 additions and 224 deletions.
9 changes: 8 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"extends": [
"stylelint-config-standard"
],
"rules": {
}
"block-no-empty": null,
"no-duplicate-selectors": null,
"unit-blacklist": ["rem"],
"unit-whitelist": ["px", "em", "deg", "%", "s"],
},
}
16 changes: 10 additions & 6 deletions components/Alert/style/index.less
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
@import './var.less';

@alert-prefix-cls: ~"@{css-prefix}-alert";

.@{alert-prefix-cls} {
position: relative;
padding: 8px 48px 8px 38px;
border-radius: 4px;
color: @font-color-base;
font-size: 12px;
line-height: @line-height-base;
margin-bottom: 10px;
font-size: @font-size-default;
transition: @transition-slow;
transform: scaleY(1.0);
transform: scaleY(1);
transform-origin: 50% 0%;

p {
margin: 0px;
margin: 0;
}

&-success {
border: 1px solid #cfefdf;
background-color: #ebf8f2;

.@{css-prefix}-icon {
color: @color-success;
}
Expand All @@ -29,6 +30,7 @@
&-info {
border: 1px solid #d2eafb;
background-color: #ecf6fd;

.@{css-prefix}-icon {
color: @color-info;
}
Expand All @@ -37,6 +39,7 @@
&-warning {
border: 1px solid #fff3cf;
background-color: #fffaeb;

.@{css-prefix}-icon {
color: @color-warning;
}
Expand All @@ -45,6 +48,7 @@
&-error {
border: 1px solid #fcdbd9;
background-color: #fef0ef;

.@{css-prefix}-icon {
color: @color-error;
}
Expand All @@ -53,6 +57,7 @@
&-normal {
border: 1px solid @primary-color-hover;
background-color: @primary-color-choosed;

.@{css-prefix}-icon {
color: @primary-color;
}
Expand Down Expand Up @@ -94,14 +99,13 @@
}

&-message {
color: rgba(0,0,0,.85);
color: rgba(0, 0, 0, 0.85);
font-size: @font-size-large;
}

&-description {
font-size: @font-size-default;
padding-top: 5px;

}

&-close {
Expand Down
4 changes: 2 additions & 2 deletions components/Alert/style/var.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@import '../../styles/var.less';
@import '../../styles/var.less';
@import '../../styles/common/reset.less';
@import '../../Icon/style/index.less';
@import '../../Icon/style/index.less';
7 changes: 4 additions & 3 deletions components/AutoComplete/style/index.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import './var.less';

@auto-complete-prefix-cls: ~"@{css-prefix}-auto-complete";

.@{auto-complete-prefix-cls} {
position: relative;

Expand All @@ -18,7 +19,7 @@
font-size: @font-size-default;
transform-origin: 50% 0;
z-index: @z-index-pop;

.@{auto-complete-prefix-cls}-item {
&:first-child {
border-radius: @border-radius-large @border-radius-large 0 0;
Expand Down Expand Up @@ -53,12 +54,12 @@

&-done-enter {
display: block;
transform: scaleY(1);
transform: scaleY(1);
}

&-exit {
display: block;
transform: scaleY(1);
transform: scaleY(1);
}

&-active-exit {
Expand Down
2 changes: 1 addition & 1 deletion components/AutoComplete/style/var.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@import '../../styles/var.less';
@import '../../styles/var.less';
@import '../../styles/common/reset.less';
@import '../../Input/style/index.less';
10 changes: 6 additions & 4 deletions components/Avatar/style/index.less
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
@import './var.less';

@avatar-prefix-cls: ~"@{css-prefix}-avatar";

.@{avatar-prefix-cls} {
display: inline-block;
text-align: center;
background-color: @avatar-bgColor-default;
color: white;

&-circle {
border-radius: 50%;
overflow: hidden;
}

&-square {
border-radius: @avatar-square-radius;

img {
border-radius: @avatar-square-radius;
}
Expand All @@ -40,7 +42,7 @@
width: @avatar-size-small;
height: @avatar-size-small;
line-height: @avatar-size-small;

img {
width: @avatar-size-small;
height: @avatar-size-small;
Expand All @@ -56,7 +58,7 @@
width: @avatar-size-large;
height: @avatar-size-large;
line-height: @avatar-size-large;

img {
width: @avatar-size-large;
height: @avatar-size-large;
Expand All @@ -66,4 +68,4 @@
font-size: @avatar-fontSize-large;
line-height: @avatar-size-large;
}
}
}
4 changes: 2 additions & 2 deletions components/Avatar/style/var.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/var.less';
@import '../../styles/var.less';
@import '../../styles/common/reset.less';

// avatar
Expand All @@ -9,4 +9,4 @@
@avatar-fontSize-small: 14px;
@avatar-fontSize-default: 18px;
@avatar-fontSize-large: 24px;
@avatar-square-radius: 5px;
@avatar-square-radius: 5px;
7 changes: 4 additions & 3 deletions components/BackTop/style/index.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import './var.less';

@backtop-prefix-cls: ~"@{css-prefix}-backtop";

.@{backtop-prefix-cls} {
position: fixed;
cursor: pointer;
Expand All @@ -10,8 +11,8 @@
&-default {
background-color: @primary-color;
border-radius: @border-radius-base;
box-shadow: 0 1px 3px rgba(0,0,0,.2);
transition: all .2s ease-in-out;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
transition: all 0.2s ease-in-out;
display: block;

:hover {
Expand All @@ -24,4 +25,4 @@
font-size: 24px;
padding: 8px 12px;
}
}
}
3 changes: 2 additions & 1 deletion components/BackTop/style/var.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import '../../styles/var.less';
@import '../../styles/var.less';
@import '../../styles/common/reset.less';
@import '../../Icon/style/index.less';

6 changes: 3 additions & 3 deletions components/Badge/style/index.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import './var.less';

@badge-prefix-cls: ~"@{css-prefix}-badge";

.@{badge-prefix-cls} {
display: inline-block;
position: relative;
Expand All @@ -12,22 +13,21 @@
border: 1px solid white;
font-size: @font-size-small;
color: white;

}

&-position {
position: absolute;
right: 0;
top: 0;
transform: translateX(50%) translateY(-40%);
transform: translateX(50%) translateY(-40%);
}

&-dot {
width: @badge-dot-size;
height: @badge-dot-size;
}

&-count{
&-count {
padding: 0 6px;
height: 20px;
line-height: 20px;
Expand Down
2 changes: 1 addition & 1 deletion components/Badge/style/var.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../styles/var.less';
@import '../../styles/var.less';
@import '../../styles/common/reset.less';

// badge
Expand Down
4 changes: 2 additions & 2 deletions components/Breadcrumb/style/index.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import './var.less';

@breadcrumb-prefix-cls: ~"@{css-prefix}-breadcrumb";

.@{breadcrumb-prefix-cls} {
&-separator {
margin: 0 8px;
Expand All @@ -14,5 +15,4 @@
}

.@{breadcrumb-prefix-cls}-item {

}
}
4 changes: 2 additions & 2 deletions components/Breadcrumb/style/var.less
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import '../../styles/var.less';
@import '../../styles/common/reset.less';
@import '../../styles/var.less';
@import '../../styles/common/reset.less';
26 changes: 16 additions & 10 deletions components/Button/style/index.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import './var.less';

@button-prefix-cls: ~"@{css-prefix}-button";

.@{button-prefix-cls} {
display: inline-block;
border: @button-border;
Expand All @@ -20,13 +21,16 @@
background-color: @button-disabled-bgColor;
cursor: not-allowed;
color: @button-border-color;
&:hover, &:focus {

&:hover,
&:focus {
border-color: @button-border-color;
color: @button-border-color;
}
}

&:hover, &:focus {
&:hover,
&:focus {
border-color: @button-primary-bgColor;
color: @button-primary-bgColor;
}
Expand All @@ -40,7 +44,8 @@
background-color: @button-primary-bgColor;
border-color: @button-primary-bgColor;

&:hover, &:focus {
&:hover,
&:focus {
background-color: @button-primary-hover-bgColor;
color: white;
}
Expand All @@ -52,15 +57,15 @@

&-dashed {
color: @button-primary-bgColor;
border-style: dashed;

border-style: dashed;
}

&-danger {
background-color: @button-disabled-bgColor;
color: @button-danger-color;

&:hover, &:focus {
&:hover,
&:focus {
background-color: @button-danger-color;
border-color: @button-danger-color;
color: white;
Expand All @@ -81,23 +86,24 @@

&-size-large {
padding: 0 15px;
height: 32px;
font-size: @font-size-default;
height: @button-height-size-large;
}

&-ghost {
background-color: transparent;
color: white;
&:hover, &:focus {

&:hover,
&:focus {
background-color: transparent;
}

&.@{button-prefix-cls} {
&-primary {
color: @button-primary-bgColor;
}

&-danger {
color: @button-danger-color;
border-color: @button-danger-color;
Expand All @@ -123,4 +129,4 @@
&-load {
animation: rotate 1s infinite linear;
}
}
}
Loading

0 comments on commit d230ced

Please sign in to comment.