Commits

Kirill Simonov committed 586d57e

sphinxcontrib.htsqldoc: wrap htsql input and output into a container.

Comments (0)

Files changed (2)

src/sphinxcontrib/htsqldoc/__init__.py

                 return [doc.reporter.error("failed to load: %s" % uri,
                                            line=self.lineno)]
             env.htsql_uris[uri] = result
+        htsql_container = nodes.container(classes=['htsql-io'])
         query_container = nodes.container('', query_node,
                                           classes=['htsql-input'])
+        htsql_container += query_container
         if 'hide' in self.options:
-            return [query_container]
+            return [htsql_container]
         content_type, content = env.htsql_uris[uri]
         if 'plain' in self.options:
             content_type = 'text/plain'
                                    self.options.get('cut'))
         result_container = nodes.container('', result_node,
                                            classes=['htsql-output'])
-        return [query_container, result_container]
+        htsql_container += result_container
+        return [htsql_container]
 
 
 class VSplitDirective(Directive):

src/sphinxcontrib/htsqldoc/static/htsqldoc.css

   clear: both;
 }
 
-div.htsql-input {
-  font-size: 95%;
+div.htsql-input a.htsql-link {
+  color: inherit;
+  background-color: inherit;
+  text-decoration: none;
+}
+
+div.htsql-input a.htsql-arrow-link {
+  float: right;
+  font-size: 105%;
+  text-decoration: none;
 }
 
 div.htsql-output {
   border-bottom: 0;
 }
 
-div.htsql-output div.highlight pre {
-  margin-top: 0;
-}
-
-a.htsql-link {
-  color: inherit;
-  background-color: inherit;
-  text-decoration: none;
-}
-
-a.htsql-link:hover {
-  color: inherit;
-  background-color: inherit;
-  text-decoration: none;
-  opacity: 0.7;
-}
-
-a.htsql-arrow-link {
-  float: right;
-  font-size: 105%;
-  opacity: 0.9;
-}
-
-a.htsql-arrow-link:hover {
-  text-decoration: none;
-  opacity: 0.6;
-}
-