diff --git a/sphinx_rtd_theme/sass/_nav.sass b/sphinx_rtd_theme/sass/_nav.sass index b1c67e30..75891a5c 100644 --- a/sphinx_rtd_theme/sass/_nav.sass +++ b/sphinx_rtd_theme/sass/_nav.sass @@ -246,4 +246,9 @@ .wy-nav-content margin: 0 +@media print + .wy-nav-side + display: none + .wy-nav-content-wrap + margin-left: 0 diff --git a/sphinx_rtd_theme/static/theme.css b/sphinx_rtd_theme/static/theme.css index fdbaa650..d5bd1d62 100644 --- a/sphinx_rtd_theme/static/theme.css +++ b/sphinx_rtd_theme/static/theme.css @@ -315,7 +315,6 @@ big, small { } pre, blockquote { - border: 1px solid #999999; page-break-inside: avoid; } @@ -3707,6 +3706,11 @@ pre.literal-block:after { padding: 6px 0; } +@media print { + .codeblock, div[class^='highlight'], div[class^='highlight'] pre { + white-space: pre-wrap; + } +} .hll { background-color: #f8f8f8; border: 1px solid #cccccc; @@ -4317,3 +4321,12 @@ pre.literal-block:after { margin: 0; } } +@media print { + .wy-nav-side { + display: none; + } + + .wy-nav-content-wrap { + margin-left: 0; + } +}