diff options
| author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-11-13 21:03:57 +0000 |
|---|---|---|
| committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-11-13 21:03:57 +0000 |
| commit | 02284ed0dd99167d6674ec76ca99bbf7cb455aea (patch) | |
| tree | d997ea45699ac85a1a15d495b6ade28f95353a9d | |
| parent | e8675eacea089dba056fad177367546667ffff77 (diff) | |
| download | docutils-02284ed0dd99167d6674ec76ca99bbf7cb455aea.tar.gz | |
add classes "first" and "last" to sidebar children
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@2856 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
| -rw-r--r-- | docutils/docutils/writers/html4css1.py | 3 | ||||
| -rw-r--r-- | docutils/test/functional/expected/standalone_rst_html4css1.html | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/docutils/docutils/writers/html4css1.py b/docutils/docutils/writers/html4css1.py index 5a2ab266a..b3a0ebd2e 100644 --- a/docutils/docutils/writers/html4css1.py +++ b/docutils/docutils/writers/html4css1.py @@ -1084,6 +1084,7 @@ class HTMLTranslator(nodes.NodeVisitor): def visit_sidebar(self, node): self.body.append(self.starttag(node, 'div', CLASS='sidebar')) + self.set_first_last(node) self.in_sidebar = 1 def depart_sidebar(self, node): @@ -1250,7 +1251,7 @@ class HTMLTranslator(nodes.NodeVisitor): check_id = 1 elif isinstance(node.parent, nodes.sidebar): self.body.append( - self.starttag(node, 'p', '', CLASS='sidebar-title first')) + self.starttag(node, 'p', '', CLASS='sidebar-title')) check_id = 1 elif isinstance(node.parent, nodes.Admonition): self.body.append( diff --git a/docutils/test/functional/expected/standalone_rst_html4css1.html b/docutils/test/functional/expected/standalone_rst_html4css1.html index 9cf3d3e84..f8c74775b 100644 --- a/docutils/test/functional/expected/standalone_rst_html4css1.html +++ b/docutils/test/functional/expected/standalone_rst_html4css1.html @@ -612,12 +612,12 @@ Reader discretion is strongly advised.</p> <div class="section" id="topics-sidebars-and-rubrics"> <h3><a class="toc-backref" href="#id62" name="topics-sidebars-and-rubrics">2.14.4 Topics, Sidebars, and Rubrics</a></h3> <div class="sidebar"> -<p class="sidebar-title first">Sidebar Title</p> +<p class="first sidebar-title">Sidebar Title</p> <p class="sidebar-subtitle">Optional Subtitle</p> <p>This is a sidebar. It is for text outside the flow of the main text.</p> <p class="rubric">This is a rubric inside a sidebar</p> -<p>Sidebars often appears beside the main text with a border and +<p class="last">Sidebars often appears beside the main text with a border and background color.</p> </div> <div class="topic"> |
