Skip to content

Commit b672789

Browse files
mvoriseklubber-de
andauthored
feat(lint): unify number format in LESS
Co-authored-by: Marco 'Lubber' Wienkoop <[email protected]>
1 parent d277c48 commit b672789

File tree

25 files changed

+78
-80
lines changed

25 files changed

+78
-80
lines changed

.stylelintrc.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ module.exports = {
1616
'max-line-length': null,
1717
'no-descending-specificity': null,
1818
'no-extra-semicolons': null, // fix GH-1832 - workaround for wikimedia/less.php parser
19+
'number-max-precision': 5,
1920
'rule-empty-line-before': null,
2021

22+
// TODO rules to be removed/fixed in v2.10.0 as fixes are not compatible with IE11
23+
'alpha-value-notation': 'number', // https://caniuse.com/mdn-css_properties_opacity_percentages
24+
'color-function-notation': 'legacy', // https://caniuse.com/mdn-css_types_color_rgba_space_separated_parameters
25+
2126
// TODO
2227
'string-quotes': null, // 1676 errors
2328
'at-rule-no-unknown': null, // 1081 errors
@@ -31,22 +36,15 @@ module.exports = {
3136
'import-notation': null, // 56 errors
3237
'keyframes-name-pattern': null, // 50 errors
3338
'property-no-vendor-prefix': null, // 49 errors
34-
'number-leading-zero': null, // 49 errors
35-
'color-function-notation': null, // 32 errors
36-
'alpha-value-notation': null, // 32 errors
37-
'color-hex-case': null, // 32 errors
3839
'block-no-empty': null, // 25 errors
3940
'selector-no-vendor-prefix': null, // 19 errors
4041
'selector-class-pattern': null, // 19 errors
41-
'number-no-trailing-zeros': null, // 16 errors
4242
'font-family-name-quotes': null, // 13 errors
4343
'declaration-block-no-redundant-longhand-properties': null, // 12 errors
4444
'value-keyword-case': null, // 12 errors
4545
'value-no-vendor-prefix': null, // 9 errors
46-
'color-hex-length': null, // 9 errors
4746
'no-empty-source': null, // 8 errors
4847
'font-family-no-missing-generic-family-keyword': null, // 8 errors
49-
'number-max-precision': null, // 7 errors
5048
'selector-attribute-quotes': null, // 7 errors
5149
'shorthand-property-no-redundant-values': null, // 5 errors
5250
'function-url-quotes': null, // 5 errors

src/definitions/collections/menu.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,13 +1665,13 @@ Floated Menu / Item
16651665
width: 14.285%;
16661666
}
16671667
.ui.menu.eight.item .item {
1668-
width: 12.500%;
1668+
width: 12.5%;
16691669
}
16701670
.ui.menu.nine.item .item {
16711671
width: 11.11%;
16721672
}
16731673
.ui.menu.ten.item .item {
1674-
width: 10.0%;
1674+
width: 10%;
16751675
}
16761676
.ui.menu.eleven.item .item {
16771677
width: 9.09%;

src/definitions/elements/button.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@
13431343
}
13441344

13451345
.ui.eight.buttons > .button {
1346-
width: 12.500%;
1346+
width: 12.5%;
13471347
}
13481348

13491349
.ui.nine.buttons {
@@ -1416,7 +1416,7 @@
14161416
}
14171417

14181418
.ui.eight.vertical.buttons > .button {
1419-
height: 12.500%;
1419+
height: 12.5%;
14201420
}
14211421

14221422
.ui.nine.vertical.buttons > .button {

src/definitions/elements/loader.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,15 @@
320320
.ui.elastic.loading.loading .input > i.icon::after,
321321
.ui.elastic.loading.loading > i.icon::after,
322322
.ui.elastic.loader.loader::after {
323-
animation: loader 1s infinite cubic-bezier(.27, 1.05, .92, .61);
323+
animation: loader 1s infinite cubic-bezier(0.27, 1.05, 0.92, 0.61);
324324
animation-delay: 0.3s;
325325
}
326326
.ui.elastic.loading.loading.loading:not(.form):not(.segment):not(.segments):not(.card)::before,
327327
.ui.elastic.loading.loading.loading .input > i.icon::before,
328328
.ui.elastic.loading.loading.loading > i.icon::before,
329329
.ui.elastic.loader.loader::before {
330-
animation: elastic-loader 1s infinite cubic-bezier(.27, 1.05, .92, .61);
331-
-moz-animation: currentcolor-elastic-loader 1s infinite cubic-bezier(.27, 1.05, .92, .61);
330+
animation: elastic-loader 1s infinite cubic-bezier(0.27, 1.05, 0.92, 0.61);
331+
-moz-animation: currentcolor-elastic-loader 1s infinite cubic-bezier(0.27, 1.05, 0.92, 0.61);
332332
border-right-color: transparent;
333333
}
334334
& when (@variationLoaderInline) {
@@ -355,7 +355,7 @@
355355
.ui.fast.elastic.loading.loading > i.icon::after,
356356
.ui.fast.elastic.loader.loader::after {
357357
animation-duration: 0.66s;
358-
animation-delay: 0.20s;
358+
animation-delay: 0.2s;
359359
}
360360
.ui.fast.elastic.loading.loading.loading:not(.form):not(.segment):not(.segments):not(.card)::before,
361361
.ui.fast.elastic.loading.loading.loading .input > i.icon::before,

src/definitions/elements/step.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@
532532
width: 14.285%;
533533
}
534534
.ui.eight.steps > .step {
535-
width: 12.500%;
535+
width: 12.5%;
536536
}
537537
}
538538

src/definitions/modules/calendar.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@
114114
}
115115

116116
.ui.calendar .ui.table tr .prev.link {
117-
width: 14.28571429%;
117+
width: 14.28571%;
118118
position: absolute;
119119
left: 0;
120120
}
121121

122122
.ui.calendar .ui.table tr .next.link {
123-
width: 14.28571429%;
123+
width: 14.28571%;
124124
position: absolute;
125125
right: 0;
126126
}

src/definitions/modules/dimmer.less

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ body.dimmable > .dimmer {
302302
.ui[class*="center dimmer"] {
303303
top: 50%;
304304
transform: translateY(-50%);
305-
-webkit-transform: translateY(calc(-50% - .5px));
305+
-webkit-transform: translateY(calc(-50% - 0.5px));
306306
}
307307

308308
.ui.segment > .ui.ui[class*="top dimmer"] {
@@ -336,48 +336,48 @@ body.dimmable > .dimmer {
336336
0% {
337337
opacity: 0;
338338
transform: translateY(-40%);
339-
-webkit-transform: translateY(calc(-40% - .5px));
339+
-webkit-transform: translateY(calc(-40% - 0.5px));
340340
}
341341
100% {
342342
opacity: 1;
343343
transform: translateY(-50%);
344-
-webkit-transform: translateY(calc(-50% - .5px));
344+
-webkit-transform: translateY(calc(-50% - 0.5px));
345345
}
346346
}
347347
@keyframes fadeInDownCenter {
348348
0% {
349349
opacity: 0;
350350
transform: translateY(-60%);
351-
-webkit-transform: translateY(calc(-60% - .5px));
351+
-webkit-transform: translateY(calc(-60% - 0.5px));
352352
}
353353
100% {
354354
opacity: 1;
355355
transform: translateY(-50%);
356-
-webkit-transform: translateY(calc(-50% - .5px));
356+
-webkit-transform: translateY(calc(-50% - 0.5px));
357357
}
358358
}
359359
@keyframes fadeOutUpCenter {
360360
0% {
361361
opacity: 1;
362362
transform: translateY(-50%);
363-
-webkit-transform: translateY(calc(-50% - .5px));
363+
-webkit-transform: translateY(calc(-50% - 0.5px));
364364
}
365365
100% {
366366
opacity: 0;
367367
transform: translateY(-45%);
368-
-webkit-transform: translateY(calc(-45% - .5px));
368+
-webkit-transform: translateY(calc(-45% - 0.5px));
369369
}
370370
}
371371
@keyframes fadeOutDownCenter {
372372
0% {
373373
opacity: 1;
374374
transform: translateY(-50%);
375-
-webkit-transform: translateY(calc(-50% - .5px));
375+
-webkit-transform: translateY(calc(-50% - 0.5px));
376376
}
377377
100% {
378378
opacity: 0;
379379
transform: translateY(-55%);
380-
-webkit-transform: translateY(calc(-55% - .5px));
380+
-webkit-transform: translateY(calc(-55% - 0.5px));
381381
}
382382
}
383383
@keyframes bounceCenter {
@@ -387,7 +387,7 @@ body.dimmable > .dimmer {
387387
80%,
388388
100% {
389389
transform: translateY(-50%);
390-
-webkit-transform: translateY(calc(-50% - .5px));
390+
-webkit-transform: translateY(calc(-50% - 0.5px));
391391
}
392392
40% {
393393
transform: translateY(calc(-50% - 30px));

src/definitions/modules/flyout.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
margin: 0;
4040
overflow-y: hidden;
4141
z-index: @topLayer;
42-
background: #FFFFFF;
42+
background: #fff;
4343
}
4444

4545
/* GPU Layers for Child Elements */

src/themes/amazon/elements/button.overrides

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
.ui.button {
2-
background-image: linear-gradient(center top, #F7F8FA, #E7E9EC) repeat scroll 0 0 rgba(0, 0, 0, 0);
2+
background-image: linear-gradient(center top, #f7f8fa, #e7e9ec) repeat scroll 0 0 rgba(0, 0, 0, 0);
33
}
44

55
.ui.primary.button {
6-
color: #111111;
6+
color: #111;
77
border: 1px solid;
8-
border-color: #C59F43 #AA8326 #957321;
8+
border-color: #c59f43 #aa8326 #957321;
99
}
1010
.ui.primary.button:hover {
11-
border-color: #C59F43 #AA8326 #957321;
12-
color: #111111;
11+
border-color: #c59f43 #aa8326 #957321;
12+
color: #111;
1313
}
1414

1515
.ui.secondary.button {
1616
border: 1px solid;
17-
border-color: #3D444C #2F353B #2C3137;
17+
border-color: #3d444c #2f353b #2c3137;
1818
}
1919
.ui.secondary.button:hover {
20-
border-color: #32373E #24282D #212429;
20+
border-color: #32373e #24282d #212429;
2121
}
2222

2323
.ui.labeled.icon.buttons .button > .icon,

src/themes/default/collections/form.variables

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
@inlineLabelTextTransform: @labelTextTransform;
165165
@inlineCalendarWidth: 13.11em;
166166

167-
@groupedInlineLabelMargin: 0.035714em 1em 0 0;
167+
@groupedInlineLabelMargin: 0.03571em 1em 0 0;
168168
@groupedInlineCheckboxBottomMargin: 0.4em;
169169

170170
/* -------------------

0 commit comments

Comments
 (0)