aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lentczner <markl@glyphic.com>2010-08-29 15:14:54 +0000
committerMark Lentczner <markl@glyphic.com>2010-08-29 15:14:54 +0000
commit05a1cc6e55c645da16272e68c2779021e31e419a (patch)
treea1b6fc6c21d7b61579632391eedf9b7faea0afb9
parent1de86e8aaa5719c248b03f1d3a166849fedc3919 (diff)
make portability block be a table - solves layout issues
-rw-r--r--html/Classic.theme/xhaddock.css18
-rw-r--r--html/Ocean.std-theme/ocean.css17
-rw-r--r--src/Haddock/Backends/Xhtml.hs9
3 files changed, 16 insertions, 28 deletions
diff --git a/html/Classic.theme/xhaddock.css b/html/Classic.theme/xhaddock.css
index 867b821a..1287ac53 100644
--- a/html/Classic.theme/xhaddock.css
+++ b/html/Classic.theme/xhaddock.css
@@ -162,29 +162,23 @@ div#style-menu-holder {
#module-header .caption {
font-size: 200%;
- padding: .25em 0;
+ padding: .35em 0;
font-weight: normal;
font-style: normal;
}
-dl.info {
+table.info {
color: #ffffff;
display: block;
float: right;
- width: 50%;
+ max-width: 50%;
}
-dl.info dt {
- float: left;
- width: 5em;
- font-weight: bold;
- display: block;
+.info th, .info td {
+ text-align: left;
+ padding: 0 10px 0 0;
}
-dl.info dd {
- display: block;
- padding-left: 6em;
-}
#table-of-contents {
margin-top: 1em;
diff --git a/html/Ocean.std-theme/ocean.css b/html/Ocean.std-theme/ocean.css
index c6dc58e3..171c72e3 100644
--- a/html/Ocean.std-theme/ocean.css
+++ b/html/Ocean.std-theme/ocean.css
@@ -85,7 +85,7 @@ pre, code, kbd, samp, tt, .src {
font-size: 182%; /* 24pt */
}
-dl.info {
+.info {
font-size: 85%; /* 11pt */
}
@@ -209,7 +209,7 @@ pre {
border-bottom: 1px solid #ddd;
}
-dl.info {
+table.info {
float: right;
padding: 0.5em 1em;
border: 1px solid #ddd;
@@ -217,18 +217,11 @@ dl.info {
background-color: #fff;
max-width: 40%;
margin: -1em 0 1em 1em;
+ border-spacing: 0;
}
-dl.info dt {
- float: left;
- font-weight: bold;
- display: block;
- margin: 0 1em 0 0;
-}
-
-dl.info dd {
- display: block;
- margin: 0 0 0 6em;
+.info th {
+ padding: 0 1em 0 0;
}
div#style-menu-holder {
diff --git a/src/Haddock/Backends/Xhtml.hs b/src/Haddock/Backends/Xhtml.hs
index 1ae8b12d..9259ae61 100644
--- a/src/Haddock/Backends/Xhtml.hs
+++ b/src/Haddock/Backends/Xhtml.hs
@@ -189,10 +189,11 @@ moduleInfo iface =
let
info = ifaceInfo iface
- doOneEntry :: (String, (HaddockModInfo GHC.Name) -> Maybe String) -> Maybe (String, String)
- doOneEntry (fieldName, field) = field info >>= \a -> return (fieldName, a)
+ doOneEntry :: (String, (HaddockModInfo GHC.Name) -> Maybe String) -> Maybe HtmlTable
+ doOneEntry (fieldName, field) =
+ field info >>= \a -> return (th << fieldName <-> td << a)
- entries :: [(String, String)]
+ entries :: [HtmlTable]
entries = mapMaybe doOneEntry [
("Portability",hmi_portability),
("Stability",hmi_stability),
@@ -201,7 +202,7 @@ moduleInfo iface =
in
case entries of
[] -> noHtml
- _ -> defList entries ! [theclass "info"]
+ _ -> table ! [theclass "info"] << aboves entries
--------------------------------------------------------------------------------