aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorƁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-07-21 19:22:30 +0200
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2015-08-21 18:22:31 +0100
commitf0edea1969cdc06d0299c606debf533d7ece77f0 (patch)
tree14d66cd1a858d63db421988469147cc34dfd7cc0
parent2d9b75f5f656aecbc30410350a6e9059a78b1516 (diff)
Improve placement of instance methods expander button.
-rw-r--r--haddock-api/resources/html/Ocean.std-theme/ocean.css14
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Layout.hs6
2 files changed, 13 insertions, 7 deletions
diff --git a/haddock-api/resources/html/Ocean.std-theme/ocean.css b/haddock-api/resources/html/Ocean.std-theme/ocean.css
index 9ad9f9d2..428040bc 100644
--- a/haddock-api/resources/html/Ocean.std-theme/ocean.css
+++ b/haddock-api/resources/html/Ocean.std-theme/ocean.css
@@ -146,15 +146,21 @@ ul.links li a {
background-image: url(plus.gif);
background-repeat: no-repeat;
}
-p.caption.collapser,
-p.caption.expander {
- background-position: 0 0.4em;
-}
.collapser, .expander {
padding-left: 14px;
margin-left: -14px;
cursor: pointer;
}
+p.caption.collapser,
+p.caption.expander {
+ background-position: 0 0.4em;
+}
+
+.instance.collapser, .instance.expander {
+ margin-left: 0px;
+ background-position: left center;
+}
+
pre {
padding: 0.25em;
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
index d971b0e5..460cc6d7 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
@@ -207,11 +207,11 @@ subClsInstance :: String -- ^ Section unique id
-> [Html] -- ^ Method contents (pretty-printed signatures)
-> Html
subClsInstance sid hdr mets =
- hdrDiv <+> methodDiv
+ (hdrDiv << hdr) <+> (methodDiv << subBlock mets)
where
anchorId = makeAnchorId $ "i:" ++ sid
- hdrDiv = thediv ! collapseControl anchorId False "instance" << hdr
- methodDiv = thediv ! collapseSection anchorId False [] << subBlock mets
+ hdrDiv = thediv ! collapseControl anchorId False "instance"
+ methodDiv = thediv ! collapseSection anchorId False "methods"
subMethods :: [Html] -> Html