Skip to content

Commit 6c51471

Browse files
committed
Experiment with adding codehilite extension
Following this example: mkdocs/mkdocs#1019
1 parent cd00c2e commit 6c51471

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

doc/css/extra.css

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,119 @@
11
.hidden-warning {
22
display: none
33
}
4+
5+
.codehilite code, .codehilite pre{color:#3F3F3F;background-color:#F7F7F7;
6+
overflow: auto;
7+
box-sizing: border-box;
8+
9+
padding: 0.01em 16px;
10+
padding-top: 0.01em;
11+
padding-right-value: 16px;
12+
padding-bottom: 0.01em;
13+
padding-left-value: 16px;
14+
padding-left-ltr-source: physical;
15+
padding-left-rtl-source: physical;
16+
padding-right-ltr-source: physical;
17+
padding-right-rtl-source: physical;
18+
19+
border-radius: 16px !important;
20+
border-top-left-radius: 16px;
21+
border-top-right-radius: 16px;
22+
border-bottom-right-radius: 16px;
23+
border-bottom-left-radius: 16px;
24+
25+
border: 1px solid #CCC !important;
26+
border-top-width: 1px;
27+
border-right-width-value: 1px;
28+
border-right-width-ltr-source: physical;
29+
border-right-width-rtl-source: physical;
30+
border-bottom-width: 1px;
31+
border-left-width-value: 1px;
32+
border-left-width-ltr-source: physical;
33+
border-left-width-rtl-source: physical;
34+
border-top-style: solid;
35+
border-right-style-value: solid;
36+
border-right-style-ltr-source: physical;
37+
border-right-style-rtl-source: physical;
38+
border-bottom-style: solid;
39+
border-left-style-value: solid;
40+
border-left-style-ltr-source: physical;
41+
border-left-style-rtl-source: physical;
42+
border-top-color: #CCC;
43+
border-right-color-value: #CCC;
44+
border-right-color-ltr-source: physical;
45+
border-right-color-rtl-source: physical;
46+
border-bottom-color: #CCC;
47+
border-left-color-value: #CCC;
48+
border-left-color-ltr-source: physical;
49+
border-left-color-rtl-source: physical;
50+
-moz-border-top-colors: none;
51+
-moz-border-right-colors: none;
52+
-moz-border-bottom-colors: none;
53+
-moz-border-left-colors: none;
54+
border-image-source: none;
55+
border-image-slice: 100% 100% 100% 100%;
56+
border-image-width: 1 1 1 1;
57+
border-image-outset: 0 0 0 0;
58+
border-image-repeat: stretch stretch;}
59+
.codehilite .hll { background-color: #ffffcc }
60+
.codehilite .c { color: #999988; font-style: italic } /* Comment */
61+
.codehilite .err { color: #a61717; background-color: #e3d2d2 } /* Error */
62+
.codehilite .k { color: #000000; font-weight: bold } /* Keyword */
63+
.codehilite .o { color: #000000; font-weight: bold } /* Operator */
64+
.codehilite .cm { color: #999988; font-style: italic } /* Comment.Multiline */
65+
.codehilite .cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
66+
.codehilite .c1 { color: #999988; font-style: italic } /* Comment.Single */
67+
.codehilite .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
68+
.codehilite .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
69+
.codehilite .ge { color: #000000; font-style: italic } /* Generic.Emph */
70+
.codehilite .gr { color: #aa0000 } /* Generic.Error */
71+
.codehilite .gh { color: #999999 } /* Generic.Heading */
72+
.codehilite .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
73+
.codehilite .go { color: #888888 } /* Generic.Output */
74+
.codehilite .gp { color: #555555 } /* Generic.Prompt */
75+
.codehilite .gs { font-weight: bold } /* Generic.Strong */
76+
.codehilite .gu { color: #aaaaaa } /* Generic.Subheading */
77+
.codehilite .gt { color: #aa0000 } /* Generic.Traceback */
78+
.codehilite .kc { color: #000000; font-weight: bold } /* Keyword.Constant */
79+
.codehilite .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
80+
.codehilite .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
81+
.codehilite .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
82+
.codehilite .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
83+
.codehilite .kt { color: #445588; font-weight: bold } /* Keyword.Type */
84+
.codehilite .m { color: #009999 } /* Literal.Number */
85+
.codehilite .s { color: #d01040 } /* Literal.String */
86+
.codehilite .na { color: #008080 } /* Name.Attribute */
87+
.codehilite .nb { color: #0086B3 } /* Name.Builtin */
88+
.codehilite .nc { color: #445588; font-weight: bold } /* Name.Class */
89+
.codehilite .no { color: #008080 } /* Name.Constant */
90+
.codehilite .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
91+
.codehilite .ni { color: #800080 } /* Name.Entity */
92+
.codehilite .ne { color: #990000; font-weight: bold } /* Name.Exception */
93+
.codehilite .nf { color: #990000; font-weight: bold } /* Name.Function */
94+
.codehilite .nl { color: #990000; font-weight: bold } /* Name.Label */
95+
.codehilite .nn { color: #555555 } /* Name.Namespace */
96+
.codehilite .nt { color: #000080 } /* Name.Tag */
97+
.codehilite .nv { color: #008080 } /* Name.Variable */
98+
.codehilite .ow { color: #000000; font-weight: bold } /* Operator.Word */
99+
.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
100+
.codehilite .mf { color: #009999 } /* Literal.Number.Float */
101+
.codehilite .mh { color: #009999 } /* Literal.Number.Hex */
102+
.codehilite .mi { color: #009999 } /* Literal.Number.Integer */
103+
.codehilite .mo { color: #009999 } /* Literal.Number.Oct */
104+
.codehilite .sb { color: #d01040 } /* Literal.String.Backtick */
105+
.codehilite .sc { color: #d01040 } /* Literal.String.Char */
106+
.codehilite .sd { color: #d01040 } /* Literal.String.Doc */
107+
.codehilite .s2 { color: #d01040 } /* Literal.String.Double */
108+
.codehilite .se { color: #d01040 } /* Literal.String.Escape */
109+
.codehilite .sh { color: #d01040 } /* Literal.String.Heredoc */
110+
.codehilite .si { color: #d01040 } /* Literal.String.Interpol */
111+
.codehilite .sx { color: #d01040 } /* Literal.String.Other */
112+
.codehilite .sr { color: #009926 } /* Literal.String.Regex */
113+
.codehilite .s1 { color: #d01040 } /* Literal.String.Single */
114+
.codehilite .ss { color: #990073 } /* Literal.String.Symbol */
115+
.codehilite .bp { color: #999999 } /* Name.Builtin.Pseudo */
116+
.codehilite .vc { color: #008080 } /* Name.Variable.Class */
117+
.codehilite .vg { color: #008080 } /* Name.Variable.Global */
118+
.codehilite .vi { color: #008080 } /* Name.Variable.Instance */
119+
.codehilite .il { color: #009999 } /* Literal.Number.Integer.Long */

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ nav:
5656
markdown_extensions:
5757
- toc:
5858
permalink: true
59+
- codehilite:

0 commit comments

Comments
 (0)