[PATCH] style: styles for man page, which suit with the mercurial website

Yuya Nishihara yuya at tcha.org
Sun Nov 8 01:40:20 CST 2009


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1257657091 -32400
# Node ID 155ecb81a3a56a89a7815b1edd37bed3e127f198
# Parent  fe461ae3d5f6b7e8d4f377cd5c9ccb6fe4cb064a
style: styles for man page, which suit with the mercurial website

designed loosely based on:
http://mercurial.selenic.com/css/styles.css

with some modifications:

 * visited links are colored differently
 * no fixed size
 * works without typeface.js

diff --git a/style.css b/style.css
new file mode 100644
--- /dev/null
+++ b/style.css
@@ -0,0 +1,61 @@
+/* Styles for man pages, which suit with http://mercurial.selenic.com/ */
+
+body {
+    margin: 0; padding: 0;
+    font-family: "Helvetica Neue", "Helvetica", "Verdana", "Arial", sans-serif;
+    color: #111;
+}
+
+a:link, a:visited { text-decoration: underline; }
+a:hover, a:focus { text-decoration: none; }
+a:link { color: #00b5f1; }
+a:visited { color: #5c9caf; }
+
+
+.document { position: relative; margin: 1.5em 1.8em; padding: 0; line-height: 1.3; }
+
+.document #contents {
+    position: absolute;
+    right: 0;
+    top: 0;
+    width: 26%;
+}
+
+.document h1.title, .document h2.subtitle, .document .section { width: 72%; }
+.document .section .section { width: auto; }
+.document table.docinfo { max-width: 68%; }
+
+.document h1, .document h2, .document .topic-title, .document .admonition-title {
+    font-family: "MgOpen Cosmetica", "Lucida Sans Unicode", sans-serif;
+    font-weight: normal;
+}
+.document h1.title, .document h2.subtitle, .document .topic-title, .document .admonition-title { margin: 0 0 0.5em; }
+.document h1, .document h2 { margin: 1em 0 0.5em; }
+.document h1.title { font-size: 300%; }
+.document h2.subtitle, .document h1 { font-size: 200%; }
+.document h2, .document .topic-title, .document .admonition-title { font-size: 140%; }
+
+.document a:link.toc-backref, .document a:visited.toc-backref {
+    color: #111;  /* color: inherit */
+    text-decoration: none;
+}
+
+.document th, .document td { padding: 0.1em 0.2em; border: 0 none; }
+.document th { font-weight: bold; text-align: left; }
+
+.document dt { font-weight: bold; }
+
+.document blockquote, .document pre { margin: 0.2em 0 1em 2em; }
+
+.document .note {
+    border-top: 1px #ccc solid;
+    border-bottom: 1px #ccc solid;
+    padding: 0.3em 1em;
+    margin: 0.2em 1em 1em;
+}
+.document .note .first { margin-top: 0; }
+.document .note .last { margin-bottom: 0; }
+
+.document kbd, .document tt, .document pre {
+    font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Lucida Console", "Courier New", monospace;
+}


More information about the Mercurial-devel mailing list