diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-01-04 06:17:53 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-01-04 06:49:58 -0500 |
commit | 0694ee9cd33a75e28862234eca1ac3005f54882b (patch) | |
tree | e00a7722760939115931f7534153eeb174192251 | |
parent | 073dd8624fe4151705cc64985092767049aa501b (diff) | |
download | python-coveragepy-git-0694ee9cd33a75e28862234eca1ac3005f54882b.tar.gz |
Make line numbers immune to minimum font size settings. #748
-rw-r--r-- | CHANGES.rst | 4 | ||||
-rw-r--r-- | coverage/htmlfiles/style.css | 6 | ||||
-rw-r--r-- | tests/gold/html/styled/style.css | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index ab49f22a..73fef237 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -23,7 +23,11 @@ Unreleased that missing branches are reported near the other lines they affect. The values used to show all missing lines, and then all missing branches. +- Line numbers in the HTML report now align properly with source lines, even + when Chrome's minimum font size is set, fixing `issue 748`_. Thanks Wen Ye. + .. _issue 746: https://github.com/nedbat/coveragepy/issues/746 +.. _issue 748: https://github.com/nedbat/coveragepy/issues/748 .. _changes_50a4: diff --git a/coverage/htmlfiles/style.css b/coverage/htmlfiles/style.css index 14592865..41bcf2be 100644 --- a/coverage/htmlfiles/style.css +++ b/coverage/htmlfiles/style.css @@ -205,15 +205,15 @@ h2.stats { padding: 0 .5em; color: #999999; font-family: verdana, sans-serif; - font-size: .625em; /* 10/16 */ - line-height: 1.6em; /* 16/10 */ - } +} .linenos p.highlight { background: #ffdd00; } .linenos p a { text-decoration: none; color: #999999; + font-size: .8333em; /* 10/12 */ + line-height: 1em; } .linenos p a:hover { text-decoration: underline; diff --git a/tests/gold/html/styled/style.css b/tests/gold/html/styled/style.css index 14592865..41bcf2be 100644 --- a/tests/gold/html/styled/style.css +++ b/tests/gold/html/styled/style.css @@ -205,15 +205,15 @@ h2.stats { padding: 0 .5em; color: #999999; font-family: verdana, sans-serif; - font-size: .625em; /* 10/16 */ - line-height: 1.6em; /* 16/10 */ - } +} .linenos p.highlight { background: #ffdd00; } .linenos p a { text-decoration: none; color: #999999; + font-size: .8333em; /* 10/12 */ + line-height: 1em; } .linenos p a:hover { text-decoration: underline; |