aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html/Classic.theme/xhaddock.css31
-rw-r--r--html/Snappy.theme/snappy.css42
-rw-r--r--src/Haddock/Backends/Xhtml.hs4
-rw-r--r--src/Haddock/Backends/Xhtml/Themes.hs8
4 files changed, 52 insertions, 33 deletions
diff --git a/html/Classic.theme/xhaddock.css b/html/Classic.theme/xhaddock.css
index 35f4b469..77d1f8f9 100644
--- a/html/Classic.theme/xhaddock.css
+++ b/html/Classic.theme/xhaddock.css
@@ -83,10 +83,9 @@ pre {
ul.links {
list-style: none;
text-align: left;
- position: absolute;
- right: 5px;
- top: 5px;
+ float: right;
display: inline-table;
+ padding: 0;
}
ul.links li {
@@ -159,13 +158,11 @@ div#style-menu-holder {
#module-header {
background-color: #0077dd;
padding: 5px;
- position: relative;
}
#module-header .caption {
font-size: 200%;
- height: 1.5em;
- padding-top: .25em;
+ padding: .25em 0;
font-weight: normal;
font-style: normal;
}
@@ -173,9 +170,8 @@ div#style-menu-holder {
dl.info {
color: #ffffff;
display: block;
- position: absolute;
- top: 3px;
- right: 5px;
+ float: right;
+ width: 50%;
}
dl.info dt {
@@ -266,7 +262,9 @@ div.top h5 {
border-left-style: solid;
white-space: nowrap;
font-size: small;
- padding: 0 4px 2px 5px;
+ padding: 0 8px 2px 5px;
+ margin-right: -3px;
+ background-color: #f0f0f0;
}
div.subs {
@@ -284,16 +282,13 @@ div.subs {
padding-top: 4px;
}
-.subs dt {
- float: left;
- margin-right: 1em;
- clear: left;
-}
-
.subs dd
{
- margin-bottom: 2px;
- margin-top: 2px;
+ margin: 2px 0 9px 2em;
+}
+
+.subs dd.empty {
+ display: none;
}
.subs table {
diff --git a/html/Snappy.theme/snappy.css b/html/Snappy.theme/snappy.css
index d3d5bf84..6cbe6633 100644
--- a/html/Snappy.theme/snappy.css
+++ b/html/Snappy.theme/snappy.css
@@ -128,11 +128,10 @@ ul ul {
}
ul.links {
- list-style: none;
- position: absolute;
- right: 1px;
- top: 0;
- margin: 0;
+ list-style: none;
+ float: right;
+ margin: 0 0 0 0.5em;
+ font-size: 80%;
}
ul.links li {
@@ -319,7 +318,19 @@ div#style-menu-holder {
}
#module-header .info {
- display: none;
+ float: right;
+ margin: 0;
+ font-size: 80%;
+}
+
+#module-header .info dt {
+ float: left;
+ width: 6em;
+ font-weight: bold;
+}
+
+#module-header .info dd {
+ margin-left: 6em;
}
#table-of-contents,
@@ -362,14 +373,28 @@ div#style-menu-holder {
padding: 4px;
}
-#interface p + div {
- margin-top: -15px
+.src a.link {
+ float: right;
+ border-left-width: 1px;
+ border-left-color: #000099;
+ border-left-style: solid;
+ white-space: nowrap;
+ padding: 0 4px;;
}
+#interface p + div {
+ margin-top: -8px}
.subs p {
margin: 0;
}
+dd.empty {
+ display: none;
+}
+
+.subs .subs {
+ margin-left: 2em;
+}
#interface .subs .src {
padding: 2px 12px;
border: none;
@@ -380,7 +405,6 @@ div#style-menu-holder {
font-size: 80%;
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
}
-
#interface .methods .src {
margin-top: 15px;
}
diff --git a/src/Haddock/Backends/Xhtml.hs b/src/Haddock/Backends/Xhtml.hs
index 6fc0ffeb..eb06e499 100644
--- a/src/Haddock/Backends/Xhtml.hs
+++ b/src/Haddock/Backends/Xhtml.hs
@@ -171,8 +171,8 @@ bodyHtml doctitle iface themes
srcButton maybe_source_url iface,
wikiButton maybe_wiki_url (ifaceMod `fmap` iface),
contentsButton maybe_contents_url,
- indexButton maybe_index_url
- ] ++ [styleMenu themes]) ! [theclass "links"],
+ indexButton maybe_index_url,
+ styleMenu themes]) ! [theclass "links"],
nonEmpty sectionName << doctitle
],
divContent << pageContent,
diff --git a/src/Haddock/Backends/Xhtml/Themes.hs b/src/Haddock/Backends/Xhtml/Themes.hs
index 414feec0..512b597c 100644
--- a/src/Haddock/Backends/Xhtml/Themes.hs
+++ b/src/Haddock/Backends/Xhtml/Themes.hs
@@ -196,10 +196,10 @@ stylePickers ts = map mkPicker ts
anchor ! [href "#", onclick js] << themeName t
-styleMenu :: Themes -> Html
-styleMenu [] = noHtml
-styleMenu [_] = noHtml
-styleMenu ts = thediv ! [identifier "style-menu-holder"] << [
+styleMenu :: Themes -> Maybe Html
+styleMenu [] = Nothing
+styleMenu [_] = Nothing
+styleMenu ts = Just $ thediv ! [identifier "style-menu-holder"] << [
anchor ! [ href "#", onclick js ] << "Style \9662",
unordList (stylePickers ts) ! [ identifier "style-menu", theclass "hide" ]
]