From 9a30baffbfec896b98c4278ecc0e80f0f6230224 Mon Sep 17 00:00:00 2001 From: milde Date: Fri, 19 Mar 2021 00:23:19 +0000 Subject: HTML5 stylesheet update and cleanup. Class value for documents with ToC. * Improve the page layout for responsive design, especially for documents without ToC. * Cleanup, small fixes, and re-organisation. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8635 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- .../docutils/writers/html5_polyglot/__init__.py | 14 ++ .../docutils/writers/html5_polyglot/minimal.css | 170 ++++++++++----------- docutils/docutils/writers/html5_polyglot/plain.css | 89 +++-------- .../docutils/writers/html5_polyglot/responsive.css | 157 ++++++++++--------- .../docutils/writers/html5_polyglot/tuftig.css | 17 +-- .../functional/expected/standalone_rst_html5.html | 2 +- 6 files changed, 207 insertions(+), 242 deletions(-) (limited to 'docutils') diff --git a/docutils/docutils/writers/html5_polyglot/__init__.py b/docutils/docutils/writers/html5_polyglot/__init__.py index 4e052d929..42c411b43 100644 --- a/docutils/docutils/writers/html5_polyglot/__init__.py +++ b/docutils/docutils/writers/html5_polyglot/__init__.py @@ -408,3 +408,17 @@ class HTMLTranslator(writers._html_base.HTMLTranslator): def depart_sidebar(self, node): self.body.append('\n') self.in_sidebar = False + + # Add class value to , if there is a ToC in the document + # (see responsive.css how this is used for sidebar navigation). + # TODO: use the new HTML5 element