From 34be96e559e88f555c5b4180d62bd65b1369dced Mon Sep 17 00:00:00 2001 From: Mark Lentczner <markl@glyphic.com> Date: Fri, 23 Jul 2010 19:13:59 +0000 Subject: [PATCH] tweaks for dl layout, though still not used --- html/nhaddock.css | 24 +++++++++++++++++++++++- src/Haddock/Backends/Xhtml/Layout.hs | 4 +++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/html/nhaddock.css b/html/nhaddock.css index ae9832930b..2bb5c1c8ba 100644 --- a/html/nhaddock.css +++ b/html/nhaddock.css @@ -74,7 +74,8 @@ ul.links li { ul.links li a { padding: 5px 10px; } .hide { display: none; } -.show { } +.show { display: inherit; } +.clear { clear: both; } pre { padding: 0.5em; @@ -260,6 +261,25 @@ div#style-menu-holder { margin-top: 0.5em; } +#interface dt { + float: left; + clear: left; + display: block; + margin: 1px 0; +} + +#interface dd { + float: right; + width: 90%; + display: block; + margin: 1px 0; + padding-left: 0.5em; +} + +#interface dd p { + margin: 0; +} + /* div.top code { border: 1px solid #ddd; } */ .top p.src { border-top: 1px solid #ccc; @@ -288,10 +308,12 @@ div.top .subs, div.top .doc { .fields p { margin: 0 0; } +/* this seems bulky to me .methods, .constructors { background: #f8f8f8; border: 1px solid #eee; } +*/ .fields { padding-left: 1em; } diff --git a/src/Haddock/Backends/Xhtml/Layout.hs b/src/Haddock/Backends/Xhtml/Layout.hs index 775a1cdb8b..63b2b6c8b5 100644 --- a/src/Haddock/Backends/Xhtml/Layout.hs +++ b/src/Haddock/Backends/Xhtml/Layout.hs @@ -114,7 +114,7 @@ divSubDecls cssClass captionName = maybe noHtml wrap subDlist :: [SubDecl] -> Maybe Html subDlist [] = Nothing -subDlist decls = Just $ dlist << map subEntry decls +subDlist decls = Just $ dlist << map subEntry decls +++ clearDiv where subEntry (decl, mdoc, subs) = dterm ! [theclass "src"] << decl @@ -123,6 +123,8 @@ subDlist decls = Just $ dlist << map subEntry decls Nothing `with` [] = spaceHtml ma `with` bs = ma +++ bs + + clearDiv = thediv ! [ theclass "clear" ] << noHtml -} -- GitLab