diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2020-06-29 19:47:33 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2020-06-29 20:13:07 -0400 |
commit | 2c6c421dbee26b138a4b84738057001d646cb7dc (patch) | |
tree | c85c335f8e5b9eb944702bfb395635c01a2e513a | |
parent | 87a4e67401217490daa06a597a5b26e7548d4044 (diff) | |
download | python-coveragepy-git-2c6c421dbee26b138a4b84738057001d646cb7dc.tar.gz |
More HTML tweaks
- Let the left and right cells have padding so the hover bar looks good.
- Adjust the table left margin so the contents still line up with the
header.
- Fix the up/down arrows to be correct for the sorting order they
indicate.
-rw-r--r-- | coverage/htmlfiles/style.css | 7 | ||||
-rw-r--r-- | coverage/htmlfiles/style.scss | 13 | ||||
-rw-r--r-- | tests/gold/html/styled/style.css | 7 |
3 files changed, 11 insertions, 16 deletions
diff --git a/coverage/htmlfiles/style.css b/coverage/htmlfiles/style.css index 5a79a2e7..0b5b7549 100644 --- a/coverage/htmlfiles/style.css +++ b/coverage/htmlfiles/style.css @@ -146,10 +146,9 @@ h2.stats { margin-top: .5em; font-size: 1em; } #source p .ctxs span { display: block; text-align: right; } #index { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 0.875em; } +#index table.index { margin-left: -.5em; } #index td, #index th { text-align: right; width: 5em; padding: .25em .5em; border-bottom: 1px solid #eee; } @media (prefers-color-scheme: dark) { #index td, #index th { border-color: #333; } } -#index td.left, #index th.left { padding-left: 0; } -#index td.right, #index th.right { padding-right: 0; } #index td.name, #index th.name { text-align: left; width: auto; } #index th { font-style: italic; color: #333; cursor: pointer; } @media (prefers-color-scheme: dark) { #index th { color: #ddd; } } @@ -157,8 +156,8 @@ h2.stats { margin-top: .5em; font-size: 1em; } @media (prefers-color-scheme: dark) { #index th:hover { background: #333; } } #index th.headerSortDown, #index th.headerSortUp { white-space: nowrap; background: #eee; } @media (prefers-color-scheme: dark) { #index th.headerSortDown, #index th.headerSortUp { background: #333; } } -#index th.headerSortDown:after { content: " ↓"; } -#index th.headerSortUp:after { content: " ↑"; } +#index th.headerSortDown:after { content: " ↑"; } +#index th.headerSortUp:after { content: " ↓"; } #index td.name a { text-decoration: none; color: inherit; } #index tr.total td, #index tr.total_dynamic td { font-weight: bold; border-top: 1px solid #ccc; border-bottom: none; } #index tr.file:hover { background: #eee; } diff --git a/coverage/htmlfiles/style.scss b/coverage/htmlfiles/style.scss index b3c63e75..1681663d 100644 --- a/coverage/htmlfiles/style.scss +++ b/coverage/htmlfiles/style.scss @@ -576,18 +576,15 @@ $context-panel-color: #aaeeff; font-family: $font-normal; font-size: 0.875em; + table.index { + margin-left: -.5em; + } td, th { text-align: right; width: 5em; padding: .25em .5em; border-bottom: 1px solid $light-gray2; @include border-color-dark($dark-gray2); - &.left { - padding-left: 0; - } - &.right { - padding-right: 0; - } &.name { text-align: left; width: auto; @@ -608,10 +605,10 @@ $context-panel-color: #aaeeff; @include background-dark($dark-gray2); } &.headerSortDown:after { - content: " ↓"; + content: " ↑"; } &.headerSortUp:after { - content: " ↑"; + content: " ↓"; } } td.name a { diff --git a/tests/gold/html/styled/style.css b/tests/gold/html/styled/style.css index 5a79a2e7..0b5b7549 100644 --- a/tests/gold/html/styled/style.css +++ b/tests/gold/html/styled/style.css @@ -146,10 +146,9 @@ h2.stats { margin-top: .5em; font-size: 1em; } #source p .ctxs span { display: block; text-align: right; } #index { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 0.875em; } +#index table.index { margin-left: -.5em; } #index td, #index th { text-align: right; width: 5em; padding: .25em .5em; border-bottom: 1px solid #eee; } @media (prefers-color-scheme: dark) { #index td, #index th { border-color: #333; } } -#index td.left, #index th.left { padding-left: 0; } -#index td.right, #index th.right { padding-right: 0; } #index td.name, #index th.name { text-align: left; width: auto; } #index th { font-style: italic; color: #333; cursor: pointer; } @media (prefers-color-scheme: dark) { #index th { color: #ddd; } } @@ -157,8 +156,8 @@ h2.stats { margin-top: .5em; font-size: 1em; } @media (prefers-color-scheme: dark) { #index th:hover { background: #333; } } #index th.headerSortDown, #index th.headerSortUp { white-space: nowrap; background: #eee; } @media (prefers-color-scheme: dark) { #index th.headerSortDown, #index th.headerSortUp { background: #333; } } -#index th.headerSortDown:after { content: " ↓"; } -#index th.headerSortUp:after { content: " ↑"; } +#index th.headerSortDown:after { content: " ↑"; } +#index th.headerSortUp:after { content: " ↓"; } #index td.name a { text-decoration: none; color: inherit; } #index tr.total td, #index tr.total_dynamic td { font-weight: bold; border-top: 1px solid #ccc; border-bottom: none; } #index tr.file:hover { background: #eee; } |