Skip to content

feat(lint): adjust LESS whitespaces to match prettier format #2612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
'at-rule-no-unknown': null,
'block-closing-brace-newline-before': null, // fix bad formatting with "each()"
'color-function-notation': 'legacy',
'color-hex-case': 'lower',
'declaration-block-trailing-semicolon': null, // fix bad formatting with "each()"
'function-no-unknown': null,
indentation: null, // TODO change to "4" once https://github.com/fomantic/Fomantic-UI/pull/2593#discussion_r1045131096 is fixed
Expand All @@ -24,7 +25,7 @@ module.exports = {
'number-max-precision': 5,
'property-case': null,
'rule-empty-line-before': null,
'string-quotes': null,
'string-quotes': 'double',
'value-keyword-case': null,

// TODO rules to be removed/fixed in v2.10.0 as fixes are not compatible with IE11
Expand Down
2 changes: 1 addition & 1 deletion examples/components/sticky-context.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<style type="text/css">

body {
background-color: #FFFFFF;
background-color: #ffffff;
}
.text.container {
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion examples/fixed.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<style type="text/css">
body {
background-color: #FFFFFF;
background-color: #ffffff;
}
.ui.menu .item img.logo {
margin-right: 1.5em;
Expand Down
6 changes: 3 additions & 3 deletions examples/grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ <h3>Specifying Device Visibility</h3>

/* Some basic formatting */
code {
background-color: #E0E0E0;
background-color: #e0e0e0;
padding: 0.25em 0.3em;
font-family: 'Lato';
font-weight: bold;
Expand Down Expand Up @@ -375,11 +375,11 @@ <h3>Specifying Device Visibility</h3>
position: absolute;
top: 1rem;
left: 1rem;
background-color: #F0F0F0;
background-color: #f0f0f0;
content: '';
width: calc(100% - 2rem);
height: calc(100% - 2rem);
box-shadow: 0px 0px 0px 1px #DDDDDD inset;
box-shadow: 0px 0px 0px 1px #dddddd inset;
}
.ui.divided.grid:before,
.celled.grid:before {
Expand Down
2 changes: 1 addition & 1 deletion examples/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<style type="text/css">
body {
background-color: #DADADA;
background-color: #dadada;
}
body > .grid {
height: 100%;
Expand Down
6 changes: 3 additions & 3 deletions examples/sticky.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<style type="text/css">

body {
background-color: #FFFFFF;
background-color: #ffffff;
}
.main.container {
margin-top: 2em;
Expand Down Expand Up @@ -91,8 +91,8 @@
}

.main.menu.fixed {
background-color: #FFFFFF;
border: 1px solid #DDD;
background-color: #ffffff;
border: 1px solid #ddd;
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
}
.overlay.fixed .menu {
Expand Down
8 changes: 4 additions & 4 deletions src/definitions/collections/breadcrumb.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
Theme
*******************************/

@type: 'collection';
@element: 'breadcrumb';
@type: "collection";
@element: "breadcrumb";

@import (multiple) '../../theme.config';
@import (multiple) "../../theme.config";

/*******************************
Breadcrumb
Expand Down Expand Up @@ -112,7 +112,7 @@
.ui.@{value}.breadcrumb {
font-size: @s;
}
})
});
}

.loadUIOverrides();
18 changes: 9 additions & 9 deletions src/definitions/collections/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
Theme
*******************************/

@type: 'collection';
@element: 'form';
@type: "collection";
@element: "form";

@import (multiple) '../../theme.config';
@import (multiple) "../../theme.config";

/*******************************
Elements
Expand Down Expand Up @@ -281,7 +281,7 @@
}

& when (@variationFormInline) {
/* Inline */
/* Inline */
.ui.form .inline.fields .field:not(.wide) .ui.input,
.ui.form .inline.field:not(.wide) .ui.input {
width: auto;
Expand Down Expand Up @@ -322,7 +322,7 @@
.ui.form .@{state}.message:empty {
display: none;
}
})
});
}

/* Assumptions */
Expand Down Expand Up @@ -740,7 +740,7 @@
color: @lbg;
}
}
})
});
}

& when (@variationFormDisabled) {
Expand Down Expand Up @@ -775,7 +775,7 @@
}
.ui.loading.form::before {
position: absolute;
content: '';
content: "";
top: 0;
left: 0;
background: @loaderDimmerColor;
Expand All @@ -790,7 +790,7 @@

.ui.loading.form::after {
position: absolute;
content: '';
content: "";
top: 50%;
left: 50%;
margin: @loaderMargin;
Expand Down Expand Up @@ -1167,7 +1167,7 @@
.ui.@{value}.form .field .dropdown .menu > .item {
font-size: @s;
}
})
});
}

.loadUIOverrides();
18 changes: 9 additions & 9 deletions src/definitions/collections/grid.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
Theme
*******************************/

@type: 'collection';
@element: 'grid';
@type: "collection";
@element: "grid";

@import (multiple) '../../theme.config';
@import (multiple) "../../theme.config";

/*******************************
Standard
Expand Down Expand Up @@ -141,7 +141,7 @@
margin: (@rowSpacing / 2) (@gutterWidth / 2);
}
.ui.grid .column + .ui.vertical.divider {
height: e(%('calc(50%% - %d)', (@rowSpacing / 2)));
height: e(%("calc(50%% - %d)", (@rowSpacing / 2)));
}

/* Remove Border on Last Horizontal Segment */
Expand Down Expand Up @@ -1092,10 +1092,10 @@
}
.ui[class*="vertically divided"].grid > .row::before {
position: absolute;
content: '';
content: "";
top: 0;
left: 0;
width: e(%('calc(100%% - %d)', @gutterWidth));
width: e(%("calc(100%% - %d)", @gutterWidth));
height: 1px;
margin: 0 (@gutterWidth / 2);
box-shadow: @verticallyDividedBorder;
Expand Down Expand Up @@ -1136,13 +1136,13 @@
.ui.relaxed[class*="vertically divided"].grid > .row::before {
margin-left: (@relaxedGutterWidth / 2);
margin-right: (@relaxedGutterWidth / 2);
width: e(%('calc(100%% - %d)', @relaxedGutterWidth));
width: e(%("calc(100%% - %d)", @relaxedGutterWidth));
}
& when (@variationGridVeryRelaxed) {
.ui[class*="very relaxed"][class*="vertically divided"].grid > .row::before {
margin-left: (@veryRelaxedGutterWidth / 2);
margin-right: (@veryRelaxedGutterWidth / 2);
width: e(%('calc(100%% - %d)', @veryRelaxedGutterWidth));
width: e(%("calc(100%% - %d)", @veryRelaxedGutterWidth));
}
}
}
Expand Down Expand Up @@ -1334,7 +1334,7 @@
background-color: @c;
color: @white;
}
})
});
}

& when (@variationGridEqualWidth) {
Expand Down
30 changes: 15 additions & 15 deletions src/definitions/collections/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
Theme
*******************************/

@type: 'collection';
@element: 'menu';
@type: "collection";
@element: "menu";

@import (multiple) '../../theme.config';
@import (multiple) "../../theme.config";

/*******************************
Standard
Expand All @@ -39,7 +39,7 @@
}

.ui.menu::after {
content: '';
content: "";
display: block;
height: 0;
clear: both;
Expand Down Expand Up @@ -97,7 +97,7 @@
/* Border */
.ui.menu .item::before {
position: absolute;
content: '';
content: "";
top: 0;
right: 0;
height: 100%;
Expand Down Expand Up @@ -207,7 +207,7 @@

/* Menu */
.ui.menu .dropdown.item .menu {
min-width: e('calc(100% - 1px)');
min-width: e("calc(100% - 1px)");
border-radius: 0 0 @dropdownMenuBorderRadius @dropdownMenuBorderRadius;
background: @dropdownBackground;
margin: @dropdownMenuDistance 0 0;
Expand Down Expand Up @@ -281,7 +281,7 @@
/* Vertical */
.ui.vertical.menu .dropdown.item > i.icon {
float: right;
content: '\f0da';
content: "\f0da";
margin-left: 1em;
}
.ui.vertical.menu .dropdown.item .menu {
Expand Down Expand Up @@ -569,7 +569,7 @@ Floated Menu / Item
/* --- Border --- */
.ui.vertical.menu .item::before {
position: absolute;
content: '';
content: "";
top: 0;
left: 0;
width: 100%;
Expand Down Expand Up @@ -1319,7 +1319,7 @@ Floated Menu / Item
}
.ui.stackable.menu .item::before {
position: absolute;
content: '';
content: "";
top: auto;
bottom: 0;
left: 0;
Expand Down Expand Up @@ -1368,7 +1368,7 @@ Floated Menu / Item
color: @c;
}
}
})
});
}

& when (@variationMenuInverted) {
Expand Down Expand Up @@ -1530,8 +1530,8 @@ Floated Menu / Item
}
}
}
})
}
});
}

& when (@variationMenuPointing) {
.ui.ui.ui.inverted.pointing.menu .active.item::after {
Expand Down Expand Up @@ -1756,7 +1756,7 @@ Floated Menu / Item
.ui.pointing.menu .item::after {
visibility: hidden;
position: absolute;
content: '';
content: "";
top: 100%;
left: 50%;
transform: translateX(-50%) translateY(-50%) rotate(45deg);
Expand Down Expand Up @@ -1841,7 +1841,7 @@ Floated Menu / Item
.ui.inverted.pointing.menu .@{color}.active.item::after {
background-color: @c;
}
})
});
}

& when (@variationMenuAttached) {
Expand Down Expand Up @@ -1945,7 +1945,7 @@ Floated Menu / Item
width: @@w;
}
}
})
});
}

/* -------------------
Expand Down
Loading