Merge pull request #43 from xPaw/stylelint

Add stylelint
This commit is contained in:
Alistair McKinlay 2016-02-21 15:33:56 +00:00
commit ac4db3abf6
7 changed files with 607 additions and 272 deletions

73
.stylelintrc Normal file
View File

@ -0,0 +1,73 @@
{
"ignoreFiles": [
"client/css/bootstrap.css"
],
"rules": {
"at-rule-empty-line-before": ["always", {
"except": ["blockless-group", "first-nested"],
"ignore": ["after-comment"]
}],
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-closing-brace-space-before": "always-single-line",
"block-no-empty": true,
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-space-after": "always-single-line",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-hex-length": "short",
"color-no-invalid-hex": true,
"comment-empty-line-before": ["always", {
"except": ["first-nested"],
"ignore": ["stylelint-commands"]
}],
"comment-whitespace-inside": "always",
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "always-multi-line",
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-whitespace-after": "always",
"function-url-quotes": "double",
"indentation": "tab",
"max-empty-lines": 1,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"media-query-parentheses-space-inside": "never",
"no-eol-whitespace": true,
"no-missing-eof-newline": true,
"number-leading-zero": "never",
"number-no-trailing-zeros": true,
"number-zero-length-no-unit": true,
"rule-no-duplicate-properties": true,
"rule-no-shorthand-property-overrides": true,
"rule-non-nested-empty-line-before": ["always-multi-line", {
"ignore": ["after-comment"]
}],
"rule-trailing-semicolon": "always",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-list-comma-newline-after": "always",
"selector-list-comma-space-before": "never",
"selector-pseudo-element-colon-notation": "single",
"string-quotes": "double",
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -9,75 +9,79 @@ GitHub: https://github.com/aynik
*/
@font-face {
font-family: Inconsolata-g;
src: url("fonts/inconsolatag.woff") format("woff"), url("fonts/inconsolatag.ttf") format("ttf");
font-family: Inconsolata-g;
src: url("fonts/inconsolatag.woff") format("woff"), url("fonts/inconsolatag.ttf") format("ttf");
}
body {
background: #000;
font: 16px Inconsolata-g, monospace;
background: #000;
font: 16px Inconsolata-g, monospace;
}
a, #chat a {
color: #00FF0E;
a,
#chat a {
color: #00ff0e;
}
a:hover, #chat a:hover {
color: #3EFF48;
a:hover,
#chat a:hover {
color: #3eff48;
}
#windows .window h2 {
color: #666;
font: regular 14px Leto, sans-serif;
border-bottom: none;
color: #666;
font: regular 14px Leto, sans-serif;
border-bottom: none;
}
#main {
right: 0px;
bottom: 0px;
top: 0px;
border-radius: 0px;
right: 0;
bottom: 0;
top: 0;
border-radius: 0;
}
.container {
margin: 40px auto;
margin: 40px auto;
}
#sign-in label {
font: 14px Lato, sans-serif;
color: #666;
font: 14px Lato, sans-serif;
color: #666;
}
#sign-in label input {
margin-top: 10px !important;
font: 14px Inconsolata-g, monospace;
margin-top: 10px !important;
font: 14px Inconsolata-g, monospace;
}
.btn {
border-color: #00FF0E;
color: #00FF0E;
border-color: #00ff0e;
color: #00ff0e;
}
.btn:disabled, .btn:hover {
background: #00FF0E;
.btn:disabled,
.btn:hover {
background: #00ff0e;
}
#windows .window:before, #windows .chan:before {
content: none;
#windows .window:before,
#windows .chan:before {
content: none;
}
#settings .opt {
line-height: 20px;
font-size: 12px;
line-height: 20px;
font-size: 12px;
}
#sign-in .remember {
font: 12px Inconsolata-g, monospace;
line-height: 30px;
font: 12px Inconsolata-g, monospace;
line-height: 30px;
}
#sidebar .chan:first-child {
color: #00FF0E;
color: #00ff0e;
}
#sidebar button,
@ -86,39 +90,40 @@ a:hover, #chat a:hover {
#chat .time,
#chat .count:before,
#sidebar .empty {
color: #666;
color: #666;
}
#sidebar .active {
color: #fff;
color: #fff;
}
#chat,
#windows .header {
font: 12px Inconsolata-g, monospace;
line-height: 1.8;
font: 12px Inconsolata-g, monospace;
line-height: 1.8;
}
#chat .chat,
#chat .sidebar {
top: 48px;
top: 48px;
}
#chat.no-colors .from button, #chat.no-colors .sidebar button {
color: #000 !important;
font-weight: bold
#chat.no-colors .from button,
#chat.no-colors .sidebar button {
color: #000 !important;
font-weight: bold;
}
#form .input {
font: 12px Inconsolata-g, monospace;
font: 12px Inconsolata-g, monospace;
}
#footer .icon {
color: #666;
color: #666;
}
@media (max-width: 768px) {
#main {
left: 0px;
}
#main {
left: 0;
}
}

View File

@ -3,4 +3,5 @@
*/
body {
margin: 0;
}

View File

@ -22,7 +22,7 @@ QUIT #d0907d
#chat .sidebar,
#windows .chan,
#windows .window {
background: #333c4a;
background: #333c4a;
}
#main #chat,
@ -30,168 +30,174 @@ QUIT #d0907d
#form .input,
#chat,
#windows .header {
font-family: 'Open Sans', sans-serif !important;
font-size: 13px;
font-family: "Open Sans", sans-serif !important;
font-size: 13px;
}
#settings, #sign-in, #connect {
color: #cccccc;
#settings,
#sign-in,
#connect {
color: #ccc;
}
#chat .count {
background-color: #2e3642;
background-color: #2e3642;
}
#chat .search {
color: #cccccc;
padding: 15px 16px;
color: #ccc;
padding: 15px 16px;
}
#chat .search::-webkit-input-placeholder {
color: #99a2b4;
opacity: 0.5;
color: #99a2b4;
opacity: .5;
}
/* Borders */
#chat .from, #windows .header,
#chat .from,
#windows .header,
#chat .user-mode:before,
#chat .sidebar {
border-color: #2a323d;
border-color: #2a323d;
}
/* Attach chat to window borders */
#windows .window:before, #windows .chan:before {
display: none;
#windows .window:before,
#windows .chan:before {
display: none;
}
#footer {
left: 0;
bottom: 0;
width: 220px;
left: 0;
bottom: 0;
width: 220px;
}
#main {
top: 0;
bottom: 0;
right: 0;
border-radius: 0;
top: 0;
bottom: 0;
right: 0;
border-radius: 0;
}
#chat .chat, #chat .sidebar {
top: 48px;
#chat .chat,
#chat .sidebar {
top: 48px;
}
/* User list */
#chat .user-mode {
color: #fefefe;
color: #fefefe;
}
/* Nicknames */
#chat.no-colors .from button,
#chat.no-colors .sidebar button {
color: #b0bacf !important;
color: #b0bacf !important;
}
#chat.no-colors .from button:hover,
#chat.no-colors .sidebar button:hover {
color: #fefefe !important;
color: #fefefe !important;
}
#chat a {
color: #428bca;
color: #428bca;
}
#chat button:hover {
opacity: 1;
opacity: 1;
}
/* Message form */
#form {
background: #2a323d;
border-color: #242a33;
background: #2a323d;
border-color: #242a33;
}
#form #input {
background-color: #2e3642;
border-color: #242a33;
color: #cccccc;
background-color: #2e3642;
border-color: #242a33;
color: #ccc;
}
#form #nick {
background: #242a33;
color: #CCC;
background: #242a33;
color: #ccc;
}
/* Buttons */
#chat .show-more-button,
#form #submit,
#windows .header .button {
background: #2e3642;
border-color: #242a33;
color: #CCC;
background: #2e3642;
border-color: #242a33;
color: #ccc;
}
#chat .show-more-button:hover,
#form #submit:hover,
#windows .header .button:hover {
color: #FFF;
color: #fff;
}
#chat .header {
color: #99a2b4;
color: #99a2b4;
}
/* Setup text colors */
#chat .msg {
color: #f3f3f3;
color: #f3f3f3;
}
#chat .message {
color: #fefefe;
color: #fefefe;
}
#chat .self .text {
color: #99a2b4;
color: #99a2b4;
}
#chat .error,
#chat .error .from,
#chat .highlight,
#chat .highlight .from {
color: #f92772;
color: #f92772;
}
#chat .highlight:not(.self) {
font-size: 1.2em;
font-size: 1.2em;
}
#chat .msg.quit .time,
#chat .msg.quit .from button {
color: #d0907d !important;
color: #d0907d !important;
}
#chat .msg.topic {
color: #fefefe;
color: #fefefe;
}
#chat .msg.join .time,
#chat .msg.join .from button {
color: #84ce88 !important;
color: #84ce88 !important;
}
/* Embeds */
#chat .toggle-content,
#chat .toggle-button {
background: #242a33;
color: #f3f3f3;
background: #242a33;
color: #f3f3f3;
}
#chat .toggle-content img {
float: left;
margin-right: 0.5em;
float: left;
margin-right: .5em;
}
#chat .toggle-content .body {
color: #99a2b4;
color: #99a2b4;
}
@media (max-width: 768px) {

View File

@ -26,7 +26,7 @@ body {
#chat .sidebar,
#windows .chan,
#windows .window {
background: #3f3f3f;
background: #3f3f3f;
}
#main #chat,
@ -34,181 +34,192 @@ body {
#form .input,
#chat,
#windows .header {
font-family: 'Open Sans', sans-serif !important;
font-size: 13px;
font-family: "Open Sans", sans-serif !important;
font-size: 13px;
}
#settings, #sign-in, #connect {
color: #dcdccc;
#settings,
#sign-in,
#connect {
color: #dcdccc;
}
#settings, #sign-in, #connect .title {
color: #88b090;
#settings,
#sign-in,
#connect .title {
color: #88b090;
}
#settings, #sign-in, #connect .opt {
color: #dcdccc;
#settings,
#sign-in,
#connect .opt {
color: #dcdccc;
}
#sidebar {
background: #2b2b2b;
bottom: 48px;
background: #2b2b2b;
bottom: 48px;
}
#footer {
background: #33332f;
border-top: 1px solid #000;
background: #33332f;
border-top: 1px solid #000;
}
#chat .count {
background-color: #434443;
background-color: #434443;
}
#chat .search {
color: #88b090;
padding: 15px 16px;
color: #88b090;
padding: 15px 16px;
}
#chat .search::-webkit-input-placeholder {
color: #d2d39b;
opacity: 0.5;
color: #d2d39b;
opacity: .5;
}
/* Borders */
#chat .from, #windows .header,
#chat .from,
#windows .header,
#chat .user-mode:before,
#chat .sidebar {
border-color: #333333;
border-color: #333;
}
/* Attach chat to window borders */
#windows .window:before, #windows .chan:before {
display: none;
#windows .window:before,
#windows .chan:before {
display: none;
}
#footer {
left: 0;
bottom: 0;
width: 220px;
left: 0;
bottom: 0;
width: 220px;
}
#main {
top: 0;
bottom: 0;
right: 0;
border-radius: 0;
top: 0;
bottom: 0;
right: 0;
border-radius: 0;
}
#chat .chat, #chat .sidebar {
top: 48px;
#chat .chat,
#chat .sidebar {
top: 48px;
}
/* User list */
#chat .user-mode {
color: #dcdccc;
color: #dcdccc;
}
/* Nicknames */
#chat.no-colors .from button,
#chat.no-colors .sidebar button {
color: #bc8cbc !important;
color: #bc8cbc !important;
}
#chat.no-colors .from button:hover,
#chat.no-colors .sidebar button:hover {
color: #dcdccc !important;
color: #dcdccc !important;
}
#chat a {
color: #8c8cbc;
color: #8c8cbc;
}
#chat button:hover {
opacity: 1;
opacity: 1;
}
/* Message form */
#form {
background: #333333;
border-color: #101010;
background: #333;
border-color: #101010;
}
#form #input {
background-color: #434443;
border-color: #101010;
color: #dcdccc;
background-color: #434443;
border-color: #101010;
color: #dcdccc;
}
#form #nick {
background: #101010;
color: #dcdccc;
background: #101010;
color: #dcdccc;
}
/* Buttons */
#chat .show-more-button,
#form #submit,
#windows .header .button {
background: #434443;
border-color: #101010;
color: #dcdccc;
background: #434443;
border-color: #101010;
color: #dcdccc;
}
#chat .show-more-button:hover,
#form #submit:hover,
#windows .header .button:hover {
color: #FFF;
color: #fff;
}
#chat .header {
color: #d2d39b;
color: #d2d39b;
}
/* Setup text colors */
#chat .msg {
color: #ffcfaf;
color: #ffcfaf;
}
#chat .message {
color: #dcdccc;
color: #dcdccc;
}
#chat .self .text {
color: #d2d39b;
color: #d2d39b;
}
#chat .error,
#chat .error .from,
#chat .highlight,
#chat .highlight .from {
color: #bc6c4c;
color: #bc6c4c;
}
#chat .msg.quit .time,
#chat .msg.quit .from button {
color: #bc6c9c !important;
color: #bc6c9c !important;
}
#chat .msg.topic {
color: #dcdccc;
color: #dcdccc;
}
#chat .msg.join .time,
#chat .msg.join .from button {
color: #8cd0d3 !important;
color: #8cd0d3 !important;
}
/* Embeds */
#chat .toggle-content,
#chat .toggle-button {
background: #93b3a3;
color: #dcdccc;
background: #93b3a3;
color: #dcdccc;
}
#chat .toggle-content img {
float: left;
margin-right: 0.5em;
float: left;
margin-right: .5em;
}
#chat .toggle-content .body {
color: #d2d39b;
color: #d2d39b;
}
@media (max-width: 768px) {

View File

@ -14,7 +14,7 @@
"start": "node index",
"build": "grunt",
"test": "HOME=test/fixtures mocha test/**/*.js && npm run lint",
"lint": "eslint .",
"lint": "eslint . && stylelint \"**/*.css\"",
"prepublish": "npm run build"
},
"keywords": [
@ -41,6 +41,7 @@
"socket.io": "~1.0.6"
},
"devDependencies": {
"stylelint": "4.3.3",
"eslint": "^1.5.1",
"grunt": "~0.4.5",
"grunt-cli": "^0.1.13",