Skip to content
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

[CSS Stylelint] Disallow empty blocks, comments and sources #20933

Merged
merged 6 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
7 changes: 6 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
],
"ignoreFiles": ["node_modules/**/*", "vendor/**/*", "tests/**/*", "tmp/**/*", "misc/**/*", "plugins/*/vue/dist/*"],
"rules": {
"color-no-invalid-hex": true
"color-no-invalid-hex": true,
"no-irregular-whitespace": true,
"length-zero-no-unit": true,
"block-no-empty": true,
"comment-no-empty": true,
"no-empty-source": true
}
}
8 changes: 4 additions & 4 deletions plugins/API/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
border-color:#00CC3A;
border-style: solid;
border-width: 1px;
margin: 0pt 0pt 16px 8px;
margin: 0 0 16px 8px;
padding: 12px;
line-height:4em;
}
Expand All @@ -12,14 +12,14 @@
}

.page_api{
padding:0px 15px 0 15px;
padding:0 15px 0 15px;
font-size:13px;
}

.page_api h2 {
border-bottom:1px solid #DADADA;
margin:10px -15px 15px 0px;
padding:0pt 0px 5px 0pt;
margin:10px -15px 15px 0;
padding:0 0 5px 0;
font-size:24px;
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/Annotations/stylesheets/annotations.less
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ span.annotation {
.annotation-controls {
display: inline-block;
margin:0;
padding: 50px 0px 10px 10px;
padding: 50px 0 10px 10px;
color: transparent;
}

Expand Down
6 changes: 3 additions & 3 deletions plugins/CoreHome/stylesheets/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ nav {

&>.top_controls {
.icon-arrowup:before, .icon-arrowdown:before {
padding: 17px 0 0 0px;
padding: 17px 0 0 0;
display: inline-block;
cursor: pointer;

Expand Down Expand Up @@ -229,7 +229,7 @@ nav {
opacity: 0.2;
position: absolute;
right: 21px;
top: 0px;
top: 0;
line-height: 13px;
padding-left: 16px;
padding-right: 16px;
Expand Down Expand Up @@ -517,7 +517,7 @@ nav {

#root{
#secondNavBar + .pageWrap {
margin-left: 0px;
margin-left: 0;
}

.top_controls{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@
position: absolute;
right: 25px;
top: 32px;
margin: 0px;
margin: 0;
left: initial;
color: @theme-color-text-lighter;
}
.reset {
position: absolute;
top: 34px;
cursor: pointer;
margin: 0px;
margin: 0;
right: 21px;
left: initial;
font-size: 12px;
color: @theme-color-text-lighter;
}

input {
margin: 0px;
margin: 0;
width: 100%;

&::-ms-clear {
Expand Down Expand Up @@ -78,9 +78,9 @@
}

&.separator {
padding: 0px !important;
border-bottom: 0px;
margin: 0px;
padding: 0 !important;
border-bottom: 0;
margin: 0;
}

&.separator,
Expand Down
14 changes: 7 additions & 7 deletions plugins/Feedback/stylesheets/feedback.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@
}

.piwik-donate-call {
border: 0px;
padding-left: 0px;
padding-top: 0px;
border: 0;
padding-left: 0;
padding-top: 0;
}

.donate-form-instructions {
margin: 0 1.25em 0 0em;
margin: 0 1.25em 0 0;
color: #5E5E5C;
}

.piwik-donate-slider {
margin: 1em 0 1em 0em;
margin: 1em 0 1em 0;
}

#piwik-worth {
margin: 0 1em 0 0em;
margin: 0 1em 0 0;
font-size: 1em;
font-style: normal;
}
Expand Down Expand Up @@ -96,7 +96,7 @@
margin-top: 45px;
background-color: @color-silver-l90;
height: 1px;
border: 0px;
border: 0;
}
}

Expand Down
Empty file.
8 changes: 4 additions & 4 deletions plugins/SegmentEditor/stylesheets/segmentation.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
}

.searchFound {
border: 0px solid red;
border: 0 solid red;
}

.others {
border: 0px solid green;
border: 0 solid green;
}

.clear {
Expand All @@ -29,7 +29,7 @@
.hovered {
border-radius: 4px;
border: 2px dashed #000 !important;
padding: 0px;
padding: 0;
}

.metricListBlock {
Expand Down Expand Up @@ -547,7 +547,7 @@ a.metric_category {

.segment-element .segment-top a.dropdown:after {
content: " \25BC";
font-size: 0px;
font-size: 0;
color: @theme-color-brand;
border-left: 4px solid rgba(0, 0, 0, 0);
border-right: 4px solid rgba(0, 0, 0, 0);
Expand Down
6 changes: 3 additions & 3 deletions plugins/Transitions/stylesheets/transitions.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
background: #f7f7f7;
border: 1px solid #a9a399;
border-radius: 10px;
-webkit-box-shadow: 0px 0px 9px 0px #999;
-moz-box-shadow: 0px 0px 9px 0px #999;
box-shadow: 0px 0px 9px 0px #999;
-webkit-box-shadow: 0 0 9px 0 #999;
-moz-box-shadow: 0 0 9px 0 #999;
box-shadow: 0 0 9px 0 #999;
z-index: 1507;
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/UsersManager/stylesheets/usersManager.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
.modal-title {
font-size: 20px;
line-height: 20px;
padding-top: 0px;
padding-top: 0;
font-weight: 600;
}
p {
Expand Down