From 8b9c485580d7f35333172b90b0133a5c8a164291 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Thu, 20 Jul 2017 12:23:52 -0700 Subject: [PATCH] Experimental table of content print styles * Provide sense of hierarchy * Make full width * Break pages before and after Bug: T169823 Change-Id: I8a20c70b550de5bfda638873d180ea97880dfd13 --- print.less | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/print.less b/print.less index 8e6021d8c..50c3d3011 100644 --- a/print.less +++ b/print.less @@ -82,5 +82,62 @@ font-size: 10pt; } } + + // Using #toc rather than .toc to override default print style + #toc { + page-break-before: always; + page-break-after: always; + font-family: serif; + background: none; + border: 0; + display: block; + + a { + border: 0; + font-weight: normal; + } + + > ul { + + > li { + margin-bottom: 20px; + font-weight: bold; + + > ul { + padding-left: 0; + } + } + } + + ul { + margin: 0; + list-style: none; + + ul { + padding-left: 30px; + + li { + padding-left: 30px; + } + .tocnumber { + min-width: 30px; + } + } + } + + li.toclevel-1 { + > a { + font-weight: bold; + font-size: 16px; + } + } + + .tocnumber { + padding-right: 0; + text-align: right; + margin-right: 30px; + display: inline-block; + } + } } }