Skip to content

Commit

Permalink
docs RTD theme: code-block with line nos - lines and line numbers don…
Browse files Browse the repository at this point in the history
…'t line up.

In a code-block with line numbers (option :lineno:) there is a
misalignment of the rendered source code lines on the right side and the
line numbers on the left side.

  readthedocs/sphinx_rtd_theme#419

Since this issue is reported to the RTD theme project, it might be fixed
in the future (take this as a interim solution).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
return42 authored and Jonathan Corbet committed Jul 17, 2017
1 parent 916f677 commit 4c04778
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Documentation/sphinx-static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
*
*/

/* Interim: Code-blocks with line nos - lines and line numbers don't line up.
* see: https://github.com/rtfd/sphinx_rtd_theme/issues/419
*/

div[class^="highlight"] pre {
line-height: normal;
}
.rst-content .highlight > pre {
line-height: normal;
}

@media screen {

/* content column
Expand Down

0 comments on commit 4c04778

Please sign in to comment.