From 03836297a59c665f72176f3efecd448bac5e8423 Mon Sep 17 00:00:00 2001 From: Mark Lentczner Date: Sat, 24 Jul 2010 06:28:44 +0000 Subject: fields are def lists, tweak css for style menu, mini pages, arguments --- html/nhaddock.css | 39 +++++++++++++++++++++++------------- src/Haddock/Backends/Xhtml/Layout.hs | 5 +---- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/html/nhaddock.css b/html/nhaddock.css index c448a781..393662ff 100644 --- a/html/nhaddock.css +++ b/html/nhaddock.css @@ -177,23 +177,19 @@ div#style-menu-holder { position: absolute; z-index: 1; overflow: visible; - background: rgb(41,56,69); -/* background-color: #eaeaea; */ + background: #374c5e; margin: 0; - width: 6em; text-align: center; right: 0; - padding: 0 2px 1px; - border-left: 1px solid #919191; - border-right: 1px solid #919191; - border-bottom: 1px solid #919191; + padding: 0; + top: 1.25em; } #style-menu li { display: list-item; border-style: none; margin: 0; - padding: 3px; + padding: 0; color: #000; list-style-type: none; } @@ -202,6 +198,12 @@ div#style-menu-holder { border-top: 1px solid #919191; } +#style-menu a { + width: 6em; + padding: 3px; + display: block; +} + #footer { margin: 1em 0 0 0; background: #ddd; @@ -220,7 +222,7 @@ div#style-menu-holder { clear: right; background: rgb(239,238,209); border: 1px solid rgba(196,69,29,0.2); - font-size: 75%; + font-size: 80%; padding: 0.5em 1em; position: relative; top: 0em; /* use -5em to pull up into title area */ @@ -254,7 +256,7 @@ div#style-menu-holder { height: 80%; top: 5em; padding: 0; - background-color: #fcfcb0; + background-color: #fff2b2; } #synopsis:hover { @@ -265,7 +267,7 @@ div#style-menu-holder { #synopsis .caption, #synopsis ul, #synopsis ul li.src { - background-color: #fcfcb0; + background-color: #fff2b2; white-space: nowrap; } @@ -326,8 +328,8 @@ div#style-menu-holder { float: right; width: 90%; display: block; - margin: 1px 0; padding-left: 0.5em; + margin-bottom: 0.5em; } #interface dd p { @@ -358,6 +360,15 @@ div.top .subs, div.top .doc { */ /* @end */ +.arguments { + margin-top: -0.4em; +} +.arguments .caption { + display: none; +} + +.fields { padding-left: 1em; } + .fields .caption { display: none; } .fields p { margin: 0 0; } @@ -369,14 +380,14 @@ div.top .subs, div.top .doc { } */ -.fields { padding-left: 1em; } - /* @end */ /* @group Auxillary Pages */ #mini { font-size: 75%; + margin: 0 auto; + padding: 0 1em; } #mini #module-header .caption { diff --git a/src/Haddock/Backends/Xhtml/Layout.hs b/src/Haddock/Backends/Xhtml/Layout.hs index 63b2b6c8..499d058a 100644 --- a/src/Haddock/Backends/Xhtml/Layout.hs +++ b/src/Haddock/Backends/Xhtml/Layout.hs @@ -109,8 +109,6 @@ divSubDecls cssClass captionName = maybe noHtml wrap subSection = thediv ! [theclass $ unwords ["subs", cssClass]] subCaption = paragraph ! [theclass "caption"] << captionName -{- - if we ever decide to style sub-declarations with dl lists, this code does it subDlist :: [SubDecl] -> Maybe Html subDlist [] = Nothing @@ -125,7 +123,6 @@ subDlist decls = Just $ dlist << map subEntry decls +++ clearDiv ma `with` bs = ma +++ bs clearDiv = thediv ! [ theclass "clear" ] << noHtml --} subTable :: [SubDecl] -> Maybe Html @@ -157,7 +154,7 @@ subConstructors = divSubDecls "constructors" "Constructors" . subTable subFields :: [SubDecl] -> Html -subFields = divSubDecls "fields" "Fields" . subTable +subFields = divSubDecls "fields" "Fields" . subDlist subInstances :: String -> [SubDecl] -> Html -- cgit v1.2.3