jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/359798 )
Change subject: Add stylelint configuration
......................................................................
Add stylelint configuration
A few rules are disabled because adhering to them would require too many
changes; the rest of the violations are fixed in style.css by indenting
with tabs, adding spaces, slightly rearranging and merging styles, etc.
Change-Id: If45adf70f63ab7a13f5ea5b685ff69120d6a59a7
---
A .stylelintrc
M Gruntfile.js
M package.json
M style.css
4 files changed, 197 insertions(+), 169 deletions(-)
Approvals:
Jonas Kress (WMDE): Looks good to me, approved
jenkins-bot: Verified
diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 0000000..f475e7f
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,9 @@
+{
+ "extends": "stylelint-config-wikimedia",
+ "rules": {
+ "color-named": null,
+ "declaration-no-important": null,
+ "declaration-property-value-blacklist": null,
+ "selector-no-id": null
+ }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index cccdf80..5e96a3e 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -28,6 +28,11 @@
'wikibase/tests/*.html'
]
},
+ stylelint: {
+ all: [
+ 'style.css'
+ ]
+ },
banana: {
all: 'i18n/',
options: {
@@ -216,7 +221,7 @@
} );
grunt.registerTask( 'test', [
- 'jshint', 'jscs', 'jsonlint', 'banana', 'qunit'
+ 'jshint', 'jscs', 'jsonlint', 'banana', 'stylelint',
'qunit'
] );
grunt.registerTask( 'build', [
'clean', 'auto_install', 'test', 'create_build'
diff --git a/package.json b/package.json
index 996c26b..605992a 100644
--- a/package.json
+++ b/package.json
@@ -56,10 +56,12 @@
"grunt-jsonlint": "1.0.4",
"grunt-merge-i18n": "0.0.0",
"grunt-shell": "^1.3.0",
+ "grunt-stylelint": "0.6.0",
"grunt-usemin": "^3.1.1",
"karma-qunit": "0.1.9",
"load-grunt-tasks": "^3.5.0",
"qunitjs": "1.23.1",
- "sinon": "~1.17.3"
+ "sinon": "~1.17.3",
+ "stylelint-config-wikimedia": "0.4.1"
}
}
diff --git a/style.css b/style.css
index 1c785ed..ea5e817 100644
--- a/style.css
+++ b/style.css
@@ -18,15 +18,16 @@
display: none;
}
-#query-error, #query-error-short {
+#query-error,
+#query-error-short {
display: none;
}
.graph-iframe {
- width: 100%;
- height: 90vh;
- border: none;
- margin: 0;
+ width: 100%;
+ height: 90vh;
+ border: none;
+ margin: 0;
}
.error-line {
@@ -42,18 +43,20 @@
font-family: serif;
border: none;
background-color: inherit;
+ width: 900px;
+ margin: 10px 30px;
+ tab-size: 21;
+ font-size: 12px;
+ overflow: auto;
}
+
#query-result {
width: 100%;
-}
-#query-box .navbar-left,
-#query-box .navbar-right {
- margin-right: 0;
}
#result-browser-menu .glyphicon,
#result-browser-menu .fa {
- padding: 0 .5em 0 0;
+ padding: 0 0.5em 0 0;
}
.cm-s-default .cm-bracket {
@@ -70,15 +73,17 @@
}
.CodeMirror-hint {
- max-width: 19em;
+ max-width: 19em;
}
.queryEditor {
min-height: 273px;
+ visibility: hidden;
+ padding: 0;
}
pre.CodeMirror-placeholder {
- color: #777777;
+ color: #777;
}
.exampleQueries {
@@ -86,18 +91,13 @@
}
.exampleIcons {
- width: 0;
+ width: 0;
}
iframe.shortUrl {
border: none;
width: 250px;
height: 40px;
-}
-
-.queryEditor {
- visibility: hidden;
- padding: 0;
}
#query-box {
@@ -111,7 +111,7 @@
color: #777;
margin-bottom: 5px;
}
-.dataUpdated > span:nth-child(1) {
+.dataUpdated > span:nth-child( 1 ) {
padding: 5px;
}
@@ -124,13 +124,14 @@
top: 10px;
right: 10px;
font-size: 25px;
- background: rgba(255,255,255,0.5);
+ background: rgba( 255, 255, 255, 0.5 );
}
/**
Bootstrap Styles
**/
-.navbar, .alert {
+.navbar,
+.alert {
margin-bottom: 0;
}
@@ -172,38 +173,38 @@
}
/* change navbar breakpoint */
-@media (max-width: 900px) {
- .navbar-header {
- float: none;
- }
- .navbar-toggle {
- display: block;
- }
- .navbar-collapse {
- border-top: 1px solid transparent;
- box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
- }
- .navbar-collapse.collapse {
- display: none!important;
- }
- .navbar-nav {
- float: none!important;
- margin: 7.5px -15px;
- }
- .navbar-nav>li>a {
- padding-top: 10px;
- padding-bottom: 10px;
- }
- .navbar-text {
- float: left;
- margin: 15px 0;
- }
- .navbar-collapse.collapse.in {
- display: block!important;
- }
- .collapsing {
- overflow: hidden!important;
- }
+@media ( max-width: 900px ) {
+ .navbar-header {
+ float: none;
+ }
+ .navbar-toggle {
+ display: block;
+ }
+ .navbar-collapse {
+ border-top: 1px solid transparent;
+ box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.1 );
+ }
+ .navbar-collapse.collapse {
+ display: none !important;
+ }
+ .navbar-nav {
+ float: none !important;
+ margin: 7.5px -15px;
+ }
+ .navbar-nav > li > a {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ }
+ .navbar-text {
+ float: left;
+ margin: 15px 0;
+ }
+ .navbar-collapse.collapse.in {
+ display: block !important;
+ }
+ .collapsing {
+ overflow: hidden !important;
+ }
}
/*
@@ -233,7 +234,7 @@
}
.QueryExamples .tagFilter {
- padding-bottom: 5px!important;
+ padding-bottom: 5px !important;
}
.QueryExamples .exampleTable {
@@ -243,17 +244,11 @@
border: 1px solid #ccc;
}
-iframe.shortUrl {
- border: none;
- width: 250px;
- height: 40px;
-}
-
.explorer-panel {
position: fixed;
right: 0;
bottom: 0;
- background-color: rgba(255,255,255,0.8);
+ background-color: rgba( 255, 255, 255, 0.8 );
z-index: 100;
display: none;
overflow: auto;
@@ -266,85 +261,109 @@
/* colors */
-div.jqcloud { color: #337ab7; }
-div.jqcloud a { color: inherit; }
-div.jqcloud a:hover { color: #337ab7; }
-div.jqcloud a:hover { color: #337ab7; }
-div.jqcloud span.w10 { color: rgba(51,122,183,1); }
-div.jqcloud span.w9 { color: rgba(51,122,183,0.9); }
-div.jqcloud span.w8 { color: rgba(51,122,183,0.8); }
-div.jqcloud span.w7 { color: rgba(51,122,183,0.75); }
-div.jqcloud span.w6 { color: rgba(51,122,183,0.6); }
-div.jqcloud span.w5 { color: rgba(51,122,183,0.65); }
-div.jqcloud span.w4 { color: rgba(51,122,183,0.5); }
-div.jqcloud span.w3 { color: rgba(51,122,183,0.55); }
-div.jqcloud span.w2 { color: rgba(51,122,183,0.4); }
-div.jqcloud span.w1 { color: rgba(51,122,183,0.45); }
-
+div.jqcloud {
+ color: #337ab7;
+}
+div.jqcloud a {
+ color: inherit;
+}
+div.jqcloud a:hover {
+ color: #337ab7;
+}
+div.jqcloud span.w10 {
+ color: rgba( 51, 122, 183, 1 );
+}
+div.jqcloud span.w9 {
+ color: rgba( 51, 122, 183, 0.9 );
+}
+div.jqcloud span.w8 {
+ color: rgba( 51, 122, 183, 0.8 );
+}
+div.jqcloud span.w7 {
+ color: rgba( 51, 122, 183, 0.75 );
+}
+div.jqcloud span.w6 {
+ color: rgba( 51, 122, 183, 0.6 );
+}
+div.jqcloud span.w5 {
+ color: rgba( 51, 122, 183, 0.65 );
+}
+div.jqcloud span.w4 {
+ color: rgba( 51, 122, 183, 0.5 );
+}
+div.jqcloud span.w3 {
+ color: rgba( 51, 122, 183, 0.55 );
+}
+div.jqcloud span.w2 {
+ color: rgba( 51, 122, 183, 0.4 );
+}
+div.jqcloud span.w1 {
+ color: rgba( 51, 122, 183, 0.45 );
+}
/* masonry */
.masonry {
- width: 95%;
- margin: 3em auto;
- margin: 1.5em 0;
- padding: 0;
- -moz-column-gap: 1.5em;
- -webkit-column-gap: 1.5em;
- column-gap: 1.5em;
- font-size: .85em;
+ width: 95%;
+ margin: 3em auto;
+ margin: 1.5em 0;
+ padding: 0;
+ -moz-column-gap: 1.5em;
+ -webkit-column-gap: 1.5em;
+ column-gap: 1.5em;
+ font-size: 0.85em;
}
.item > a > img {
width: 100%;
- display: inline-block;;
+ display: inline-block;
}
.item {
- display: inline-block;
- background: #fff;
- padding: 1em;
- margin: 0 0 1.5em;
- width: 100%;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-shadow: 2px 2px 4px 0 #ccc;
+ display: inline-block;
+ background: #fff;
+ padding: 1em;
+ margin: 0 0 1.5em;
+ width: 100%;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-shadow: 2px 2px 4px 0 #ccc;
}
-@media only screen and (min-width: 400px) {
- .masonry {
- -moz-column-count: 2;
- -webkit-column-count: 2;
- column-count: 2;
- }
+@media only screen and ( min-width: 400px ) {
+ .masonry {
+ -moz-column-count: 2;
+ -webkit-column-count: 2;
+ column-count: 2;
+ }
}
-@media only screen and (min-width: 700px) {
- .masonry {
- -moz-column-count: 3;
- -webkit-column-count: 3;
- column-count: 3;
- }
+@media only screen and ( min-width: 700px ) {
+ .masonry {
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+ column-count: 3;
+ }
}
-@media only screen and (min-width: 900px) {
- .masonry {
- -moz-column-count: 4;
- -webkit-column-count: 4;
- column-count: 4;
- }
+@media only screen and ( min-width: 900px ) {
+ .masonry {
+ -moz-column-count: 4;
+ -webkit-column-count: 4;
+ column-count: 4;
+ }
}
-@media only screen and (min-width: 1100px) {
- .masonry {
- -moz-column-count: 5;
- -webkit-column-count: 5;
- column-count: 5;
- }
+@media only screen and ( min-width: 1100px ) {
+ .masonry {
+ -moz-column-count: 5;
+ -webkit-column-count: 5;
+ column-count: 5;
+ }
}
-@media only screen and (min-width: 1280px) {
- .wrapper {
- width: 1260px;
- }
+@media only screen and ( min-width: 1280px ) {
+ .wrapper {
+ width: 1260px;
+ }
}
/*
@@ -352,19 +371,19 @@
*/
.action-bar .progress {
- height: 30px;
- font-size: 30px;
+ height: 30px;
+ font-size: 30px;
}
.action-bar .progress-bar {
- font-size: 16px;
- line-height: 30px;
- font-weight: bold;
+ font-size: 16px;
+ line-height: 30px;
+ font-weight: bold;
}
.action-bar .label {
display: block;
- font-size: 16px;
- line-height: 20px;
+ font-size: 16px;
+ line-height: 20px;
}
.action-bar {
@@ -385,30 +404,30 @@
*/
.visual-editor-trigger {
display: none;
- z-index: 100;
- position: absolute;
- top: 10px;
- right: 45px;
- font-size: 25px;
+ z-index: 100;
+ position: absolute;
+ top: 10px;
+ right: 45px;
+ font-size: 25px;
}
.visual-editor {
display: none;
min-width: 300px;
max-width: 500px;
- z-index: 100;
- position: absolute;
- top: 5px;
- right: 45px;
- font-size: 15px;
- padding-left: 35px;
+ z-index: 100;
+ position: absolute;
+ top: 5px;
+ right: 45px;
+ font-size: 15px;
+ padding-left: 35px;
}
.visual-editor .panel-info {
- background: rgba(255,255,255,0.9);
+ background: rgba( 255, 255, 255, 0.9 );
}
.visual-editor .panel-heading {
- background: rgba(255, 255, 255, 0.9);
+ background: rgba( 255, 255, 255, 0.9 );
padding: 8px 10px;
}
@@ -443,7 +462,7 @@
*/
.vis-item {
padding: 15px;
- box-shadow: 5px 5px 20px rgba(0,0,0,0.2);
+ box-shadow: 5px 5px 20px rgba( 0, 0, 0, 0.2 );
}
.vis-item.vis-selected {
@@ -451,7 +470,8 @@
border-color: #888a85;
}
-.vis-item, .vis-item.vis-line {
+.vis-item,
+.vis-item.vis-line {
background-color: white;
border-color: #888a85;
}
@@ -472,37 +492,29 @@
*/
#query-result .foreground path {
- fill: none;
- stroke: #222;
- stroke-opacity: 0.4;
- pointer-events: none;
- stroke-width: 3px;
+ fill: none;
+ stroke: #222;
+ stroke-opacity: 0.4;
+ pointer-events: none;
+ stroke-width: 3px;
}
#query-result .axis .title {
- font-size: 8px;
- font-weight: bold;
- text-transform: uppercase;
- transform: rotate(-12deg) translate(-5px,-6px);
+ font-size: 8px;
+ font-weight: bold;
+ text-transform: uppercase;
+ transform: rotate( -12deg ) translate( -5px, -6px );
}
#query-result .axis line,
#query-result .axis path {
- fill: none;
- stroke: #000;
- stroke-width: 1px;
+ fill: none;
+ stroke: #000;
+ stroke-width: 1px;
}
#query-result .brush .extent {
- fill-opacity: .3;
- stroke: #fff;
- stroke-width: 1px;
-}
-
-#query-result pre {
- width: 900px;
- margin: 10px 30px;
- tab-size: 21;
- font-size: 12px;
- overflow: auto;
+ fill-opacity: 0.3;
+ stroke: #fff;
+ stroke-width: 1px;
}
--
To view, visit https://gerrit.wikimedia.org/r/359798
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If45adf70f63ab7a13f5ea5b685ff69120d6a59a7
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits