Rework editorconfig

* Most file types prefer 2-space indents, so now default
  to that and list the exceptions
* Add max_line_length=120 for .py files (Django convention)
* Bat files require CRLF
This commit is contained in:
medmunds
2019-02-08 12:05:57 -08:00
parent 8464d3a231
commit bd55d8c298
2 changed files with 35 additions and 34 deletions

View File

@@ -1,24 +1,25 @@
# http://editorconfig.org # https://editorconfig.org
root = true root = true
# Follow Django conventions for most files
[*] [*]
charset = utf-8 charset = utf-8
end_of_line = lf end_of_line = lf
indent_size = 4 indent_size = 2
indent_style = space indent_style = space
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
# Use 2 spaces for js and text(-like) files [*.py]
[*.{html,js,json,md,rst,txt,yml}] indent_size = 4
indent_size = 2 max_line_length = 120
# Makefiles always use tabs for indentation [*.{ini,lock}]
[Makefile] indent_size = 4
[{Makefile,*.bat}]
indent_style = tab indent_style = tab
indent_size = 4
# Batch files use tabs for indentation
[*.bat] [*.bat]
indent_style = tab end_of_line = crlf

View File

@@ -4,41 +4,41 @@
/* Regression: https://github.com/rtfd/sphinx_rtd_theme/issues/705 */ /* Regression: https://github.com/rtfd/sphinx_rtd_theme/issues/705 */
.rst-content .section ol li p:last-child, .rst-content .section ol li p:last-child,
.rst-content .section ul li p:last-child { .rst-content .section ul li p:last-child {
margin-bottom: 24px; margin-bottom: 24px;
} }
/* Pygments shell/console prompt: */ /* Pygments shell/console prompt: */
.highlight .gp { .highlight .gp {
/* The RTD theme shows prompts the same color as other code. /* The RTD theme shows prompts the same color as other code.
We want to distinguish them (like most Pygments themes do). */ We want to distinguish them (like most Pygments themes do). */
color: #d14; color: #d14;
/* Exclude prompt characters when copying from highlighted code. */ /* Exclude prompt characters when copying from highlighted code. */
user-select: none; user-select: none;
-moz-user-select: none; -moz-user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
-ms-user-select: none; -ms-user-select: none;
} }
/* Sticky table first column (used for ESP feature matrix) */ /* Sticky table first column (used for ESP feature matrix) */
table.sticky-left td:first-of-type, table.sticky-left td:first-of-type,
table.sticky-left th:first-of-type { table.sticky-left th:first-of-type {
position: -webkit-sticky; /* Safari */ position: -webkit-sticky; /* Safari */
position: sticky; position: sticky;
left: 0; left: 0;
background-color: #fcfcfc; /* override transparent from .wy-table td */ background-color: #fcfcfc; /* override transparent from .wy-table td */
} }
table.sticky-left td:first-of-type[colspan] > p, table.sticky-left td:first-of-type[colspan] > p,
table.sticky-left th:first-of-type[colspan] > p { table.sticky-left th:first-of-type[colspan] > p {
/* Hack: the full-width <td colspan=N> section headers can't stick left; /* Hack: the full-width <td colspan=N> section headers can't stick left;
since those always wrap a rubric <p> (in the specific table that uses this), since those always wrap a rubric <p> (in the specific table that uses this),
just make the <p> sticky within the <td>. */ just make the <p> sticky within the <td>. */
display: inline-block; display: inline-block;
position: -webkit-sticky; /* Safari */ position: -webkit-sticky; /* Safari */
position: sticky; position: sticky;
left: 17px; /* (.wy-table $table-padding-size) + (docutils border="1" in html) */ left: 17px; /* (.wy-table $table-padding-size) + (docutils border="1" in html) */
} }
@@ -57,12 +57,12 @@ table.sticky-left th:first-of-type[colspan] > p {
https://github.com/rtfd/sphinx_rtd_theme/issues/92 https://github.com/rtfd/sphinx_rtd_theme/issues/92
*/ */
.rst-content a code.xref { .rst-content a code.xref {
color: #2980B9; color: #2980B9;
font-weight: inherit; font-weight: inherit;
} }
.rst-content a:hover code.xref { .rst-content a:hover code.xref {
color: #3091d1; color: #3091d1;
} }
.rst-content a:visited code.xref { .rst-content a:visited code.xref {
color: #9B59B6; color: #9B59B6;
} }