docs RTD theme: code-block with line nos - lines and line numbers don't line up.
authorMarkus Heiser <markus.heiser@darmarit.de>
Sat, 17 Jun 2017 08:17:21 +0000 (10:17 +0200)
committerJonathan Corbet <corbet@lwn.net>
Mon, 17 Jul 2017 19:48:45 +0000 (13:48 -0600)
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.

  https://github.com/rtfd/sphinx_rtd_theme/issues/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>
Documentation/sphinx-static/theme_overrides.css

index 1c9a9ab..522b6d4 100644 (file)
@@ -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