From 4183a820ae9b4d9932efd1009bdd6ae4da7ab524 Mon Sep 17 00:00:00 2001 From: David Baynard Date: Mon, 11 Dec 2017 00:45:51 +0000 Subject: [PATCH] Collapse divs correctly --- src/Skylighting/Format/HTML.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Skylighting/Format/HTML.hs b/src/Skylighting/Format/HTML.hs index b28f226c6..b37785699 100644 --- a/src/Skylighting/Format/HTML.hs +++ b/src/Skylighting/Format/HTML.hs @@ -179,6 +179,8 @@ styleToCss f = unlines $ , "a.sourceLine:empty { height: 1.2em; position: absolute; }" -- correct empty line height , ".sourceCode { overflow: visible; }" -- needed for line numbers , "code.sourceCode { white-space: pre; position: relative; }" -- position relative needed for absolute contents + , "div.sourceCode { margin: 1em 0; }" -- Collapse neighbours correctly + , "pre.sourceCode { margin: 0; }" -- Collapse neighbours correctly , "@media screen {" , "div.sourceCode { overflow: auto; }" -- do not overflow on screen , "}"