From e38156856e58d32e81ae21b689affdc85cd20128 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 11 Jan 2014 21:00:31 +0100 Subject: [PATCH] Closes #1095: Fix print-media stylesheet being included always in the "scrolls" theme. Also fixes wrong additions of stylesheets and scripts in haiku theme (probably copy-paste error from scrolls). --- CHANGES | 3 +++ sphinx/themes/haiku/layout.html | 2 -- sphinx/themes/scrolls/static/print.css | 12 +++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 963c5b2b4..3b56c3aa6 100644 --- a/CHANGES +++ b/CHANGES @@ -56,6 +56,9 @@ Bugs fixed * #1050: Add anonymous labels into ``objects.inv`` to be referenced via intersphinx. +* #1095: Fix print-media stylesheet being included always in the "scrolls" + theme. + Documentation ------------- diff --git a/sphinx/themes/haiku/layout.html b/sphinx/themes/haiku/layout.html index 337d0ca24..0c6b41e7c 100644 --- a/sphinx/themes/haiku/layout.html +++ b/sphinx/themes/haiku/layout.html @@ -8,8 +8,6 @@ :license: BSD, see LICENSE for details. #} {%- extends "basic/layout.html" %} -{% set script_files = script_files + ['_static/theme_extras.js'] %} -{% set css_files = css_files + ['_static/print.css'] %} {# do not display relbars #} {% block relbar1 %}{% endblock %} diff --git a/sphinx/themes/scrolls/static/print.css b/sphinx/themes/scrolls/static/print.css index fb633d879..715d90ab6 100644 --- a/sphinx/themes/scrolls/static/print.css +++ b/sphinx/themes/scrolls/static/print.css @@ -1,5 +1,7 @@ -div.header, div.relnav, #toc { display: none; } -#contentwrapper { padding: 0; margin: 0; border: none; } -body { color: black; background-color: white; } -div.footer { border-top: 1px solid #888; color: #888; margin-top: 1cm; } -div.footer a { text-decoration: none; } +@media print { + div.header, div.relnav, #toc { display: none; } + #contentwrapper { padding: 0; margin: 0; border: none; } + body { color: black; background-color: white; } + div.footer { border-top: 1px solid #888; color: #888; margin-top: 1cm; } + div.footer a { text-decoration: none; } +}