At 18:07 +0300 03 Sep 2016, Alexander Gromnitsky <[email protected]> wrote:
That's actually a great idea. The 2nd version of the patch adds another media query that moves the TOC to the left if the viewport >= 1100px.
In my experience, most of these types of breakpoints are determined by using em values rather than px.
On my browser this is leaving a large blank area to the left of the TOC. The narrowness of the space allocated for the TOC leaves a lot of items being wrapped. Also, since that space to the left isn't considered to be part of the TOC using my scroll wheel in there causes the main body to scroll, when visually I'd expect it to scroll the TOC.
diff -r efccbd9bc6f6 doc/mutt.css
--- a/doc/mutt.css Tue Aug 30 18:43:02 2016 -0700
+++ b/doc/mutt.css Sat Sep 03 18:04:08 2016 +0300
@@ -1,4 +1,34 @@
-body { margin-left:2%; margin-right:2%; font-family:serif; }
+@media (min-width: 701px) {
+ body {
+ width: 700px;
+ margin: 0 auto;
+ }
+}
+
+@media (min-width: 1100px) {
+ body {
+ width: 1099px;
+ margin: 0 auto;
+ }
+
+ .book {
+ margin-left: 330px;
+ }
+
+ .book > .toc {
+ position: fixed;
+ width: 250px;
+ top: 0;
+ left: 50%;
+ margin-left: -500px;
+
+ overflow: scroll;
+ height: 100%;
+
+ padding: 0 0.5em 0;
+ }
+}
+body { font-family:serif; }
.toc, .list-of-tables, .list-of-examples { font-family:sans-serif; }
h1, h2, h3, h4, h5, h6 { font-family:sans-serif; }
p { text-align:justify; }
diff -r efccbd9bc6f6 doc/mutt.xsl
--- a/doc/mutt.xsl Tue Aug 30 18:43:02 2016 -0700
+++ b/doc/mutt.xsl Sat Sep 03 18:04:08 2016 +0300
@@ -7,7 +7,9 @@
<xsl:template name="user.head.content">
<xsl:element name="style">
<xsl:attribute name="type">text/css</xsl:attribute>
- &css;
+ <xsl:text disable-output-escaping="yes">
+ &css;
+ </xsl:text>
</xsl:element>
</xsl:template>
<xsl:param name="admon.style"/>
signature.asc
Description: PGP signature
