Skip to content

Commit fc431e8

Browse files
authored
feat(lint): unify LESS files whitespaces and string quotes
This PR is part of GH-2594 but separated to integrate many whitespace changes (and other non functional changes) separately.
1 parent bbe4e58 commit fc431e8

File tree

160 files changed

+4200
-4174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+4200
-4174
lines changed

.stylelintrc.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,37 @@ module.exports = {
99
],
1010
rules: {
1111
'at-rule-empty-line-before': null,
12+
'at-rule-name-case': null,
13+
'at-rule-no-unknown': null,
1214
'block-closing-brace-newline-before': null, // fix bad formatting with "each()"
15+
'color-function-notation': 'legacy',
1316
'declaration-block-trailing-semicolon': null, // fix bad formatting with "each()"
17+
'function-no-unknown': null,
1418
indentation: null, // TODO change to "4" once https://github.com/fomantic/Fomantic-UI/pull/2593#discussion_r1045131096 is fixed
1519
linebreaks: 'unix',
1620
'max-line-length': null,
1721
'no-descending-specificity': null,
1822
'no-extra-semicolons': null, // fix GH-1832 - workaround for wikimedia/less.php parser
23+
'no-duplicate-selectors': null,
1924
'number-max-precision': 5,
25+
'property-case': null,
2026
'rule-empty-line-before': null,
27+
'string-quotes': null,
28+
'value-keyword-case': null,
2129

2230
// TODO rules to be removed/fixed in v2.10.0 as fixes are not compatible with IE11
2331
'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
2532

2633
// TODO
27-
'string-quotes': null, // 1676 errors
28-
'at-rule-no-unknown': null, // 1081 errors
29-
'property-case': null, // 866 errors
30-
'at-rule-name-case': null, // 764 errors
31-
'no-duplicate-selectors': null, // 224 errors
3234
'selector-not-notation': null, // 169 errors
33-
'no-invalid-position-at-import-rule': null, // 104 errors
34-
'function-no-unknown': null, // 67 errors
35-
'length-zero-no-unit': null, // 64 errors
3635
'import-notation': null, // 56 errors
3736
'keyframes-name-pattern': null, // 50 errors
3837
'property-no-vendor-prefix': null, // 49 errors
3938
'block-no-empty': null, // 25 errors
4039
'selector-no-vendor-prefix': null, // 19 errors
4140
'selector-class-pattern': null, // 19 errors
42-
'font-family-name-quotes': null, // 13 errors
4341
'declaration-block-no-redundant-longhand-properties': null, // 12 errors
44-
'value-keyword-case': null, // 12 errors
4542
'value-no-vendor-prefix': null, // 9 errors
46-
'no-empty-source': null, // 8 errors
4743
'font-family-no-missing-generic-family-keyword': null, // 8 errors
4844
'selector-attribute-quotes': null, // 7 errors
4945
'shorthand-property-no-redundant-values': null, // 5 errors

src/_site/modules/embed.variables

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/*******************************
2+
User Variable Overrides
3+
*******************************/

src/definitions/collections/breadcrumb.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
Theme
1313
*******************************/
1414

15-
@type : 'collection';
16-
@element : 'breadcrumb';
15+
@type: 'collection';
16+
@element: 'breadcrumb';
1717

1818
@import (multiple) '../../theme.config';
1919

src/definitions/collections/form.less

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
Theme
1313
*******************************/
1414

15-
@type : 'collection';
16-
@element : 'form';
15+
@type: 'collection';
16+
@element: 'form';
1717

1818
@import (multiple) '../../theme.config';
1919

@@ -98,8 +98,8 @@
9898
}
9999

100100
/* Set max height on unusual input */
101-
.ui.form ::-webkit-datetime-edit,
102-
.ui.form ::-webkit-inner-spin-button {
101+
.ui.form::-webkit-datetime-edit,
102+
.ui.form::-webkit-inner-spin-button {
103103
height: @inputLineHeight;
104104
}
105105

@@ -383,24 +383,24 @@
383383
--------------------- */
384384

385385
/* browsers require these rules separate */
386-
.ui.form ::-webkit-input-placeholder {
386+
.ui.form::-webkit-input-placeholder {
387387
color: @inputPlaceholderColor;
388388
}
389-
.ui.form :-ms-input-placeholder when (@supportIE) {
389+
.ui.form:-ms-input-placeholder when (@supportIE) {
390390
color: @inputPlaceholderColor !important;
391391
}
392-
.ui.form ::-moz-placeholder {
392+
.ui.form::-moz-placeholder {
393393
color: @inputPlaceholderColor;
394394
opacity: 1;
395395
}
396396

397-
.ui.form :focus::-webkit-input-placeholder {
397+
.ui.form:focus::-webkit-input-placeholder {
398398
color: @inputPlaceholderFocusColor;
399399
}
400-
.ui.form :focus:-ms-input-placeholder when (@supportIE) {
400+
.ui.form:focus:-ms-input-placeholder when (@supportIE) {
401401
color: @inputPlaceholderFocusColor !important;
402402
}
403-
.ui.form :focus::-moz-placeholder {
403+
.ui.form:focus::-moz-placeholder {
404404
color: @inputPlaceholderFocusColor;
405405
}
406406

@@ -750,15 +750,15 @@
750750

751751
.ui.form .disabled.fields .field,
752752
.ui.form .disabled.field,
753-
.ui.form .field :disabled {
753+
.ui.form .field:disabled {
754754
pointer-events: @disabledPointerEvents;
755755
opacity: @disabledOpacity;
756756
}
757757
.ui.form .field.disabled > label,
758758
.ui.form .fields.disabled > label {
759759
opacity: @disabledLabelOpacity;
760760
}
761-
.ui.form .field.disabled :disabled {
761+
.ui.form .field.disabled:disabled {
762762
opacity: 1;
763763
}
764764
}

src/definitions/collections/grid.less

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
Theme
1313
*******************************/
1414

15-
@type : 'collection';
16-
@element : 'grid';
15+
@type: 'collection';
16+
@element: 'grid';
1717

1818
@import (multiple) '../../theme.config';
1919

@@ -141,7 +141,7 @@
141141
margin: (@rowSpacing / 2) (@gutterWidth / 2);
142142
}
143143
.ui.grid .column + .ui.vertical.divider {
144-
height: e(%("calc(50%% - %d)", (@rowSpacing / 2)));
144+
height: e(%('calc(50%% - %d)', (@rowSpacing / 2)));
145145
}
146146

147147
/* Remove Border on Last Horizontal Segment */
@@ -1092,10 +1092,10 @@
10921092
}
10931093
.ui[class*="vertically divided"].grid > .row::before {
10941094
position: absolute;
1095-
content: "";
1095+
content: '';
10961096
top: 0;
10971097
left: 0;
1098-
width: e(%("calc(100%% - %d)", @gutterWidth));
1098+
width: e(%('calc(100%% - %d)', @gutterWidth));
10991099
height: 1px;
11001100
margin: 0 (@gutterWidth / 2);
11011101
box-shadow: @verticallyDividedBorder;
@@ -1136,13 +1136,13 @@
11361136
.ui.relaxed[class*="vertically divided"].grid > .row::before {
11371137
margin-left: (@relaxedGutterWidth / 2);
11381138
margin-right: (@relaxedGutterWidth / 2);
1139-
width: e(%("calc(100%% - %d)", @relaxedGutterWidth));
1139+
width: e(%('calc(100%% - %d)', @relaxedGutterWidth));
11401140
}
11411141
& when (@variationGridVeryRelaxed) {
11421142
.ui[class*="very relaxed"][class*="vertically divided"].grid > .row::before {
11431143
margin-left: (@veryRelaxedGutterWidth / 2);
11441144
margin-right: (@veryRelaxedGutterWidth / 2);
1145-
width: e(%("calc(100%% - %d)", @veryRelaxedGutterWidth));
1145+
width: e(%('calc(100%% - %d)', @veryRelaxedGutterWidth));
11461146
}
11471147
}
11481148
}

src/definitions/collections/menu.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
Theme
1414
*******************************/
1515

16-
@type : 'collection';
17-
@element : 'menu';
16+
@type: 'collection';
17+
@element: 'menu';
1818

1919
@import (multiple) '../../theme.config';
2020

@@ -207,7 +207,7 @@
207207

208208
/* Menu */
209209
.ui.menu .dropdown.item .menu {
210-
min-width: e("calc(100% - 1px)");
210+
min-width: e('calc(100% - 1px)');
211211
border-radius: 0 0 @dropdownMenuBorderRadius @dropdownMenuBorderRadius;
212212
background: @dropdownBackground;
213213
margin: @dropdownMenuDistance 0 0;
@@ -281,7 +281,7 @@
281281
/* Vertical */
282282
.ui.vertical.menu .dropdown.item > i.icon {
283283
float: right;
284-
content: "\f0da";
284+
content: '\f0da';
285285
margin-left: 1em;
286286
}
287287
.ui.vertical.menu .dropdown.item .menu {

src/definitions/collections/message.less

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
Theme
1313
*******************************/
1414

15-
@type : 'collection';
16-
@element : 'message';
15+
@type: 'collection';
16+
@element: 'message';
1717

1818
@import (multiple) '../../theme.config';
1919

@@ -289,52 +289,52 @@
289289

290290
@consequences: {
291291
@positive: {
292-
background : @positiveBackgroundColor;
293-
header : @positiveHeaderColor;
294-
boxShadow : @positiveBoxShadow;
295-
boxFloatShadow : @positiveBoxFloatingShadow;
296-
text : @positiveTextColor;
297-
invertedText : @positiveBorderColor;
292+
background: @positiveBackgroundColor;
293+
header: @positiveHeaderColor;
294+
boxShadow: @positiveBoxShadow;
295+
boxFloatShadow: @positiveBoxFloatingShadow;
296+
text: @positiveTextColor;
297+
invertedText: @positiveBorderColor;
298298
};
299299
@negative: {
300-
background : @negativeBackgroundColor;
301-
header : @negativeHeaderColor;
302-
boxShadow : @negativeBoxShadow;
303-
boxFloatShadow : @negativeBoxFloatingShadow;
304-
text : @negativeTextColor;
305-
invertedText : @negativeBorderColor;
300+
background: @negativeBackgroundColor;
301+
header: @negativeHeaderColor;
302+
boxShadow: @negativeBoxShadow;
303+
boxFloatShadow: @negativeBoxFloatingShadow;
304+
text: @negativeTextColor;
305+
invertedText: @negativeBorderColor;
306306
};
307307
@info: {
308-
background : @infoBackgroundColor;
309-
header : @infoHeaderColor;
310-
boxShadow : @infoBoxShadow;
311-
boxFloatShadow : @infoBoxFloatingShadow;
312-
text : @infoTextColor;
313-
invertedText : @formInfoLabelBackground;
308+
background: @infoBackgroundColor;
309+
header: @infoHeaderColor;
310+
boxShadow: @infoBoxShadow;
311+
boxFloatShadow: @infoBoxFloatingShadow;
312+
text: @infoTextColor;
313+
invertedText: @formInfoLabelBackground;
314314
};
315315
@warning: {
316-
background : @warningBackgroundColor;
317-
header : @warningHeaderColor;
318-
boxShadow : @warningBoxShadow;
319-
boxFloatShadow : @warningBoxFloatingShadow;
320-
text : @warningTextColor;
321-
invertedText : @formWarningLabelBackground;
316+
background: @warningBackgroundColor;
317+
header: @warningHeaderColor;
318+
boxShadow: @warningBoxShadow;
319+
boxFloatShadow: @warningBoxFloatingShadow;
320+
text: @warningTextColor;
321+
invertedText: @formWarningLabelBackground;
322322
};
323323
@error: {
324-
background : @errorBackgroundColor;
325-
header : @errorHeaderColor;
326-
boxShadow : @errorBoxShadow;
327-
boxFloatShadow : @errorBoxFloatingShadow;
328-
text : @errorTextColor;
329-
invertedText : @formErrorLabelBackground;
324+
background: @errorBackgroundColor;
325+
header: @errorHeaderColor;
326+
boxShadow: @errorBoxShadow;
327+
boxFloatShadow: @errorBoxFloatingShadow;
328+
text: @errorTextColor;
329+
invertedText: @formErrorLabelBackground;
330330
};
331331
@success: {
332-
background : @successBackgroundColor;
333-
header : @successHeaderColor;
334-
boxShadow : @successBoxShadow;
335-
boxFloatShadow : @successBoxFloatingShadow;
336-
text : @successTextColor;
337-
invertedText : @formSuccessLabelBackground;
332+
background: @successBackgroundColor;
333+
header: @successHeaderColor;
334+
boxShadow: @successBoxShadow;
335+
boxFloatShadow: @successBoxFloatingShadow;
336+
text: @successTextColor;
337+
invertedText: @formSuccessLabelBackground;
338338
};
339339
}
340340

src/definitions/collections/table.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
Theme
1313
*******************************/
1414

15-
@type : 'collection';
16-
@element : 'table';
15+
@type: 'collection';
16+
@element: 'table';
1717

1818
@import (multiple) '../../theme.config';
1919

@@ -485,7 +485,7 @@
485485
scrollbar-arrow-color: @trackInvertedBackgroundHex;
486486
}
487487

488-
/* firefox : first color thumb, second track */
488+
/* firefox: first color thumb, second track */
489489
scrollbar-color: @thumbInvertedBackground @trackInvertedBackground;
490490
}
491491
}

src/definitions/elements/button.less

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
Theme
1313
*******************************/
1414

15-
@type : 'element';
16-
@element : 'button';
15+
@type: 'element';
16+
@element: 'button';
1717

1818
@import (multiple) '../../theme.config';
1919

@@ -259,7 +259,7 @@
259259
transition: top @animationDuration @animationEasing, transform @animationDuration @animationEasing;
260260
}
261261
.ui.vertical.animated.button .visible.content {
262-
transform: translateY(0%);
262+
transform: translateY(0);
263263
right: auto;
264264
}
265265
.ui.vertical.animated.button .hidden.content {
@@ -1725,13 +1725,13 @@
17251725
each(@variationButtonConsequences, {
17261726
@consequence: @value;
17271727

1728-
@_backgroundColor: "@{consequence}Color";
1729-
@_backgroundColorHover: "@{consequence}ColorHover";
1730-
@_backgroundColorFocus: "@{consequence}ColorFocus";
1731-
@_backgroundColorDown: "@{consequence}ColorDown";
1732-
@_backgroundColorActive: "@{consequence}ColorActive";
1733-
@_textColor: "@{consequence}TextColor";
1734-
@_textShadow: "@{consequence}TextShadow";
1728+
@_backgroundColor: '@{consequence}Color';
1729+
@_backgroundColorHover: '@{consequence}ColorHover';
1730+
@_backgroundColorFocus: '@{consequence}ColorFocus';
1731+
@_backgroundColorDown: '@{consequence}ColorDown';
1732+
@_backgroundColorActive: '@{consequence}ColorActive';
1733+
@_textColor: '@{consequence}TextColor';
1734+
@_textShadow: '@{consequence}TextShadow';
17351735

17361736
/* Standard */
17371737
.ui.@{consequence}.buttons .button,
@@ -1827,7 +1827,7 @@
18271827

18281828
/* Clearfix */
18291829
.ui.buttons::after {
1830-
content: ".";
1830+
content: '.';
18311831
display: block;
18321832
height: 0;
18331833
clear: both;
@@ -1975,7 +1975,7 @@
19751975
}
19761976
& when (@variationButtonInverted) {
19771977
.ui.spaced.basic.inverted.buttons .basic.button {
1978-
margin-bottom: e(%("calc(%d + %d)", @spacedMargin, @basicColoredBorderSize));
1978+
margin-bottom: e(%('calc(%d + %d)', @spacedMargin, @basicColoredBorderSize));
19791979
margin-top: @basicColoredBorderSize;
19801980
}
19811981
}

0 commit comments

Comments
 (0)