1
0
Fork 0

Add stylelint

merge-requests/305/head
Nikos Roussos 2017-02-10 15:32:33 +02:00
parent 4c51b4e929
commit 90e5b75575
No known key found for this signature in database
GPG Key ID: BADFF1767BA7C8E1
3 changed files with 132 additions and 46 deletions

91
.stylelintrc 100644
View File

@ -0,0 +1,91 @@
{
"rules": {
"color-hex-case": "lower",
"color-no-invalid-hex": true,
"font-family-no-duplicate-names": true,
"font-family-name-quotes": "always-where-recommended",
"function-calc-no-unspaced-operator": true,
"function-comma-space-after": "always",
"function-comma-space-before": "never",
"function-name-case": "lower",
"function-parentheses-space-inside": "never",
"function-whitespace-after": "always",
"function-url-no-scheme-relative": true,
"function-url-quotes": "always",
"number-no-trailing-zeros": true,
"string-no-newline": true,
"string-quotes": "single",
"length-zero-no-unit": true,
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": lower,
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
"property-case": "lower",
"property-no-unknown": true,
"keyframe-declaration-no-important": true,
"declaration-colon-space-after": "always",
"declaration-colon-space-before": "never",
"declaration-no-important": true,
"declaration-block-trailing-semicolon": "always",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-semicolon-space-before": "never",
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-no-duplicate-properties": true,
"block-no-empty": true,
"block-closing-brace-empty-line-before": "never",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-closing-brace-space-before": "always-single-line",
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-space-after": "always-single-line",
"block-opening-brace-space-before": "always",
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-element-no-unknown": true,
"selector-pseudo-class-case": "lower",
"selector-pseudo-element-case": "lower",
"selector-type-case": "lower",
"selector-type-no-unknown": true,
"selector-max-empty-lines": 0,
"rule-empty-line-before": "always-multi-line",
"media-feature-name-case": "lower",
"media-feature-name-no-unknown": true,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-parentheses-space-inside": "never",
"comment-no-empty": true,
"indentation": 4,
"max-nesting-depth": 6,
"no-duplicate-selectors": true,
"no-eol-whitespace": true,
"no-extra-semicolons": true,
"no-unknown-animations": true,
"no-invalid-double-slash-comments": true,
"no-missing-end-of-source-newline": true,
"max-empty-lines": 1
}
}

View File

@ -1,12 +1,14 @@
language: python language: python
dist: trusty
python: python:
- "2.7" - "2.7"
install: install:
- pip install -r requirements/dev.txt - pip install -r requirements/dev.txt
- npm install -g jshint - npm install -g jshint stylelint
script: script:
- flake8 . - flake8 .
- jshint . - jshint .
- pytest - pytest
- stylelint 'network/static/css/*.css'
after_success: after_success:
- coveralls - coveralls

View File

@ -2,61 +2,56 @@
==================== */ ==================== */
@font-face { @font-face {
font-family: 'ClearSans'; font-family: ClearSans;
src: url('../fonts/ClearSans-Regular.eot'); src: url('../fonts/ClearSans-Regular.eot');
src: url('../fonts/ClearSans-Regular.eot?#iefix') format('embedded-opentype'), src: url('../fonts/ClearSans-Regular.eot?#iefix') format('embedded-opentype'),
url('../fonts/ClearSans-Regular.woff') format('woff'), url('../fonts/ClearSans-Regular.woff') format('woff'),
url('../fonts/ClearSans-Regular.ttf') format('truetype'), url('../fonts/ClearSans-Regular.ttf') format('truetype'),
url('../fonts/ClearSans-Regular.svg#open_sans') format('svg'); url('../fonts/ClearSans-Regular.svg#open_sans') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: 'ClearSans'; font-family: ClearSans;
src: url('../fonts/ClearSans-Bold.eot'); src: url('../fonts/ClearSans-Bold.eot');
src: url('../fonts/ClearSans-Bold.eot?#iefix') format('embedded-opentype'), src: url('../fonts/ClearSans-Bold.eot?#iefix') format('embedded-opentype'),
url('../fonts/ClearSans-Bold.woff') format('woff'), url('../fonts/ClearSans-Bold.woff') format('woff'),
url('../fonts/ClearSans-Bold.ttf') format('truetype'), url('../fonts/ClearSans-Bold.ttf') format('truetype'),
url('../fonts/ClearSans-Bold.svg#open_sansbold') format('svg'); url('../fonts/ClearSans-Bold.svg#open_sansbold') format('svg');
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: 'ClearSans'; font-family: ClearSans;
src: url('../fonts/ClearSans-BoldItalic.eot'); src: url('../fonts/ClearSans-BoldItalic.eot');
src: url('../fonts/ClearSans-BoldItalic.eot?#iefix') format('embedded-opentype'), src: url('../fonts/ClearSans-BoldItalic.eot?#iefix') format('embedded-opentype'),
url('../fonts/ClearSans-BoldItalic.woff') format('woff'), url('../fonts/ClearSans-BoldItalic.woff') format('woff'),
url('../fonts/ClearSans-BoldItalic.ttf') format('truetype'), url('../fonts/ClearSans-BoldItalic.ttf') format('truetype'),
url('../fonts/ClearSans-BoldItalic.svg#open_sansbold_italic') format('svg'); url('../fonts/ClearSans-BoldItalic.svg#open_sansbold_italic') format('svg');
font-weight: bold; font-weight: bold;
font-style: italic; font-style: italic;
} }
@font-face { @font-face {
font-family: 'ClearSans'; font-family: ClearSans;
src: url('../fonts/ClearSans-Italic.eot'); src: url('../fonts/ClearSans-Italic.eot');
src: url('../fonts/ClearSans-Italic.eot?#iefix') format('embedded-opentype'), src: url('../fonts/ClearSans-Italic.eot?#iefix') format('embedded-opentype'),
url('../fonts/ClearSans-Italic.woff') format('woff'), url('../fonts/ClearSans-Italic.woff') format('woff'),
url('../fonts/ClearSans-Italic.ttf') format('truetype'), url('../fonts/ClearSans-Italic.ttf') format('truetype'),
url('../fonts/ClearSans-Italic.svg#open_sansitalic') format('svg'); url('../fonts/ClearSans-Italic.svg#open_sansitalic') format('svg');
font-weight: normal; font-weight: normal;
font-style: italic; font-style: italic;
} }
/* Generic /* Generic
==================== */ ==================== */
body { body {
font-size:14px; font-size: 14px;
line-height: 1.3; line-height: 1.3;
font-family:'ClearSans'; font-family: ClearSans;
} }
a:hover { a:hover {
@ -94,9 +89,8 @@ a:hover {
} }
.error { .error {
margin-top: 40px; margin-top: 40px auto 0 auto;
width: 500px; width: 500px;
margin: auto;
text-align: center; text-align: center;
} }
@ -105,8 +99,8 @@ a:hover {
} }
.form-group { .form-group {
margin-left: 0px; margin-left: 0;
margin-right: 0px; margin-right: 0;
} }
.bottom-details { .bottom-details {
@ -127,7 +121,7 @@ a:hover {
} }
.progress { .progress {
margin-bottom: 0px; margin-bottom: 0;
} }
footer { footer {
@ -144,7 +138,7 @@ footer {
#map { #map {
position: absolute; position: absolute;
top: 0px; top: 0;
width: 100%; width: 100%;
height: 450px; height: 450px;
} }
@ -179,9 +173,9 @@ footer {
} }
.coloredDiv { .coloredDiv {
height:20px; height: 20px;
width:20px; width: 20px;
float:left; float: left;
margin-right: 5px; margin-right: 5px;
} }
@ -195,7 +189,7 @@ footer {
} }
.stage-notice { .stage-notice {
background-color: #D74545; background-color: #d74545;
color: white; color: white;
padding: 5px; padding: 5px;
text-align: center; text-align: center;
@ -203,8 +197,8 @@ footer {
z-index: 20; z-index: 20;
width: 100%; width: 100%;
position: fixed; position: fixed;
top: 0px; top: 0;
left: 0px; left: 0;
} }
.stage-notice a { .stage-notice a {
@ -230,7 +224,6 @@ code.log p {
padding: 5px; padding: 5px;
} }
/* Stations /* Stations
==================== */ ==================== */
@ -258,7 +251,6 @@ code.log p {
margin-top: 10px; margin-top: 10px;
} }
/* Observations /* Observations
==================== */ ==================== */
@ -277,17 +269,18 @@ code.log p {
font-family: sans-serif; font-family: sans-serif;
font-size: 10px; font-size: 10px;
} }
.timeline-label { .timeline-label {
font-family: sans-serif; font-family: sans-serif;
font-size: 12px; font-size: 12px;
} }
#timeline2 .axis { #timeline2 .axis {
transform: translate(0px,30px); transform: translate(0, 30px);
-ms-transform: translate(0px,30px); /* IE 9 */ -ms-transform: translate(0, 30px); /* IE 9 */
-webkit-transform: translate(0px,30px); /* Safari and Chrome */ -webkit-transform: translate(0, 30px); /* Safari and Chrome */
-o-transform: translate(0px,30px); /* Opera */ -o-transform: translate(0, 30px); /* Opera */
-moz-transform: translate(0px,30px); /* Firefox */ -moz-transform: translate(0, 30px); /* Firefox */
} }
.playback-time { .playback-time {
@ -316,7 +309,7 @@ code.log p {
} }
#UTCModal .panel-default:last-child { #UTCModal .panel-default:last-child {
margin-bottom: 0px; margin-bottom: 0;
} }
#UTCModal .panel-body { #UTCModal .panel-body {
@ -390,14 +383,14 @@ code.log p {
color: #666; color: #666;
} }
@media screen and (max-width:835px) { @media screen and (max-width: 835px) {
.vetting { .vetting {
float: none; float: none;
margin-top: 5px; margin-top: 5px;
} }
} }
/* Satellites /* Satellites
==================== */ ==================== */