lint: Ban 2-space indentation in our CSS.

Probably most properly we should check for any number of spaces that
isn't 4, but that's a bit more work to do with our linter framework,
and in practice basically every CSS whitespace error we see is 2-space.
This commit is contained in:
Tim Abbott 2016-09-27 18:06:44 -07:00
parent 855c306c01
commit aaa221233a
4 changed files with 12 additions and 7 deletions

View File

@ -85,8 +85,8 @@
} }
#overlay .image-description { #overlay .image-description {
/* approx width of screen minus action buttons on the side. */ /* approx width of screen minus action buttons on the side. */
width: calc(100% - 290px); width: calc(100% - 290px);
} }
#overlay .image-description .title { #overlay .image-description .title {
@ -108,7 +108,7 @@
} }
.image-actions a.button { .image-actions a.button {
text-decoration: none; text-decoration: none;
} }
.button .download { .button .download {

View File

@ -945,7 +945,7 @@ a.bottom-signup-button {
} }
.center-block .submit-button-box .controls { .center-block .submit-button-box .controls {
margin: 0px; margin: 0px;
} }
.center-block { .center-block {
@ -975,7 +975,7 @@ a.bottom-signup-button {
} }
.center-block #send_confirm input[type=text] { .center-block #send_confirm input[type=text] {
margin-top: 20px; margin-top: 20px;
} }
.center-block .button { .center-block .button {

View File

@ -8,7 +8,7 @@ label {
} }
.display-none { .display-none {
display: none; display: none;
} }
.inline-block { .inline-block {
@ -171,7 +171,7 @@ input[type=checkbox].inline-block {
} }
.remove-alert-word { .remove-alert-word {
margin-top: 1px; margin-top: 1px;
} }
@media (max-width: 480px) { @media (max-width: 480px) {

View File

@ -311,6 +311,11 @@ def build_custom_checkers(by_lang):
'description': "Missing whitespace after : in CSS"}, 'description': "Missing whitespace after : in CSS"},
{'pattern': '[a-z]{', {'pattern': '[a-z]{',
'description': "Missing whitespace before '{' in CSS."}, 'description': "Missing whitespace before '{' in CSS."},
{'pattern': '^[ ][ ][a-zA-Z0-9]',
'description': "Incorrect 2-space indentation in CSS",
'exclude': set(['static/styles/thirdparty-fonts.css']),
'strip': '\n',
},
{'pattern': '{\w', {'pattern': '{\w',
'description': "Missing whitespace after '{' in CSS (should be newline)."}, 'description': "Missing whitespace after '{' in CSS (should be newline)."},
] + whitespace_rules # type: RuleList ] + whitespace_rules # type: RuleList