mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
💄 Enable some stylelint rules
This commit is contained in:
parent
3fcb8fa0b3
commit
0bbc46da37
12
.stylelintrc
12
.stylelintrc
@ -3,20 +3,8 @@
|
||||
"rules": {
|
||||
"comment-empty-line-before": null,
|
||||
"declaration-empty-line-before": null,
|
||||
"function-comma-newline-after": null,
|
||||
"function-name-case": null,
|
||||
"function-parentheses-newline-inside": null,
|
||||
"function-max-empty-lines": null,
|
||||
"function-whitespace-after": null,
|
||||
"indentation": null,
|
||||
"number-leading-zero": null,
|
||||
"number-no-trailing-zeros": null,
|
||||
"rule-empty-line-before": null,
|
||||
"selector-combinator-space-after": null,
|
||||
"selector-list-comma-newline-after": null,
|
||||
"selector-pseudo-element-colon-notation": null,
|
||||
"unit-no-unknown": null,
|
||||
"value-list-max-empty-lines": null,
|
||||
"no-invalid-double-slash-comments": null,
|
||||
"no-descending-specificity": null
|
||||
}
|
||||
|
@ -1,4 +1,23 @@
|
||||
/* stylelint-disable no-duplicate-selectors */
|
||||
.make-palette(@color, @index: 1) when (@index <= 10) {
|
||||
.palette-@{color}-@{index} {
|
||||
@background: '@{color}-@{index}';
|
||||
background: @@background;
|
||||
}
|
||||
.make-palette(@color, (@index + 1)); // next iteration
|
||||
}
|
||||
|
||||
@grey-1: #fff;
|
||||
@grey-2: #fafafa;
|
||||
@grey-3: #f5f5f5;
|
||||
@grey-4: #e8e8e8;
|
||||
@grey-5: #d9d9d9;
|
||||
@grey-6: #bfbfbf;
|
||||
@grey-7: #8c8c8c;
|
||||
@grey-8: #595959;
|
||||
@grey-9: #262626;
|
||||
@grey-10: #000;
|
||||
@border-color: rgba(229, 231, 235, 100);
|
||||
|
||||
.color-palettes {
|
||||
margin: 0 1%;
|
||||
}
|
||||
@ -31,7 +50,21 @@
|
||||
}
|
||||
|
||||
.main-color {
|
||||
.make-palette(blue);
|
||||
.make-palette(purple);
|
||||
.make-palette(cyan);
|
||||
.make-palette(green);
|
||||
.make-palette(magenta);
|
||||
.make-palette(red);
|
||||
.make-palette(volcano);
|
||||
.make-palette(orange);
|
||||
.make-palette(gold);
|
||||
.make-palette(yellow);
|
||||
.make-palette(lime);
|
||||
.make-palette(geekblue);
|
||||
.make-palette(grey);
|
||||
text-align: left;
|
||||
|
||||
&-item {
|
||||
cursor: pointer;
|
||||
height: 44px;
|
||||
@ -140,40 +173,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.make-palette(@color, @index: 1) when (@index <= 10) {
|
||||
.palette-@{color}-@{index} {
|
||||
@background: '@{color}-@{index}';
|
||||
background: @@background;
|
||||
}
|
||||
.make-palette(@color, (@index + 1)); // next iteration
|
||||
}
|
||||
|
||||
@grey-1: #fff;
|
||||
@grey-2: #fafafa;
|
||||
@grey-3: #f5f5f5;
|
||||
@grey-4: #e8e8e8;
|
||||
@grey-5: #d9d9d9;
|
||||
@grey-6: #bfbfbf;
|
||||
@grey-7: #8c8c8c;
|
||||
@grey-8: #595959;
|
||||
@grey-9: #262626;
|
||||
@grey-10: #000;
|
||||
|
||||
@border-color: rgba(229, 231, 235, 100);
|
||||
|
||||
.main-color {
|
||||
.make-palette(blue);
|
||||
.make-palette(purple);
|
||||
.make-palette(cyan);
|
||||
.make-palette(green);
|
||||
.make-palette(magenta);
|
||||
.make-palette(red);
|
||||
.make-palette(volcano);
|
||||
.make-palette(orange);
|
||||
.make-palette(gold);
|
||||
.make-palette(yellow);
|
||||
.make-palette(lime);
|
||||
.make-palette(geekblue);
|
||||
.make-palette(grey);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user