Fix class= in <section>.
authorJulien Moutinho <julm+hdoc@autogeree.net>
Sun, 6 May 2018 01:44:28 +0000 (03:44 +0200)
committerJulien Moutinho <julm+hdoc@autogeree.net>
Sun, 6 May 2018 01:44:28 +0000 (03:44 +0200)
Language/DTC/Write/HTML5.hs
style/dtc-html5.css

index 3b654abde81bfcbfa3dd0c558fdad4c84b2a18de..9a92508b9b91a8d49b13feec53ce06a57b913798 100644 (file)
@@ -359,11 +359,10 @@ instance Html5ify BodyCursor
                         Just (secNotes, state_notes) -> do
                                liftStateMarkup $ S.modify' $ \s -> s{state_notes}
                                html5ify secNotes
-               H.section ! HA.class_ "section"
-                         ! HA.id (attrify pos) $$ do
-                       forM_ aliases html5ify
-                       html5CommonAttrs attrs{classes="section-header":classes attrs} $
-                               H.table $$
+               html5CommonAttrs attrs{classes="section":classes attrs} $
+                       H.section ! HA.id (attrify pos) $$ do
+                               forM_ aliases html5ify
+                               H.table ! HA.class_ "section-header" $$
                                        H.tbody $$
                                                H.tr $$ do
                                                        H.td ! HA.class_ "section-number" $$ do
@@ -378,10 +377,10 @@ instance Html5ify BodyCursor
                                                                 5 -> H.h6
                                                                 _ -> H.h6) $$
                                                                        html5ify title
-                       forM_ (Tree.axis_child `Tree.runAxis` z) $
-                               html5ify
-                       notes <- liftStateMarkup $ S.gets state_notes
-                       html5ify $ Map.lookup (posAncestors pos) notes
+                               forM_ (Tree.axis_child `Tree.runAxis` z) $
+                                       html5ify
+                               notes <- liftStateMarkup $ S.gets state_notes
+                               html5ify $ Map.lookup (posAncestors pos) notes
 instance Html5ify [Anchor.Note] where
        html5ify notes =
                H.aside ! HA.class_ "notes" $$ do
index 0bf769909655e23174469672d7e5095eb34c3a95..4a075b08b170044f55ded87e2befa5a4e2374366 100644 (file)
                font-size:1.3em;
         }
 /* .section */
+       .section {
+               page-break-before:auto;
+               page-break-inside:avoid;
+               page-break-after:auto;
+        }
        .section > section,
        .section > *:first-child {
                margin-left:0em;