Skip to content

Commit f27f6d8

Browse files
committed
Update syntax higlighting
1 parent 8cd9640 commit f27f6d8

File tree

2 files changed

+86
-8
lines changed

2 files changed

+86
-8
lines changed

docs/_static/custom.css

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ code.docutils > .pre {
3434
font-weight: bold;
3535
font-size: smaller;
3636
}
37+
3738
/* Theme Overrides */
3839
.wy-side-nav-search {
3940
background-color: black !important;
@@ -79,6 +80,7 @@ html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-cont
7980
color: #80c;
8081
}
8182
.wy-grid-for-nav {
83+
8284
}
8385
html.writer-html4 .rst-content dl:not(.docutils)>dt,
8486
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt {
@@ -99,12 +101,50 @@ html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(
99101
font-weight: light;
100102
font-size: 13px;
101103
}
102-
.highlight .s1 {
103-
color: #ffcf64 !important;
104-
}
104+
/* prompt */
105105
.highlight .gp {
106+
color: #BBDEFB !important;
107+
}
108+
/* punctuation */
109+
.highlight .p {
106110
color: #aaa !important;
107111
}
112+
/* operator */
108113
.highlight .o {
109-
color: #aaa !important;
114+
color: #9575CD !important;
115+
}
116+
/* keyword / constant */
117+
.highlight .k, .highlight .kn, .highlight .ow, .highlight .kc,
118+
.highlight .kd, .highlight .kp, .highlight .kr, .highlight .kl {
119+
color: rgba(189, 147, 249, 0.9) !important;
120+
}
121+
/* strings */
122+
.highlight .s, .highlight .s1, .highlight .s2 {
123+
color: rgba(255, 121, 198, 0.8) !important;
124+
}
125+
/* attributes / methods */
126+
.highlight .n, .highlight .na, .highlight .nf {
127+
color: #9FA8DA !important;
128+
}
129+
/* builtin */
130+
.highlight .nb {
131+
color: #B39DDB !important;
132+
}
133+
/* output */
134+
.highlight .go {
135+
color: #eee !important;
136+
}
137+
/* comment */
138+
.highlight .c, .highlight .ch, .highlight .cm, .highlight .cp,
139+
.highlight .cpf, .highlight .c1, .highlight .cs {
140+
color: #BBDEFB !important;
141+
}
142+
/* number */
143+
.highlight .m, .highlight .il, .highlight .mb, .highlight .mf,
144+
.highlight .mh, .highlight .mi {
145+
color: #9FA8DA !important;
146+
}
147+
/* error */
148+
.highlight .err {
149+
color: #f00 !important;
110150
}

docs/src/custom.css

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,50 @@ html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(
101101
font-weight: light;
102102
font-size: 13px;
103103
}
104-
.highlight .s1 {
105-
color: #ffcf64 !important;
106-
}
104+
/* prompt */
107105
.highlight .gp {
106+
color: #BBDEFB !important;
107+
}
108+
/* punctuation */
109+
.highlight .p {
108110
color: #aaa !important;
109111
}
112+
/* operator */
110113
.highlight .o {
111-
color: #aaa !important;
114+
color: #9575CD !important;
115+
}
116+
/* keyword / constant */
117+
.highlight .k, .highlight .kn, .highlight .ow, .highlight .kc,
118+
.highlight .kd, .highlight .kp, .highlight .kr, .highlight .kl {
119+
color: rgba(189, 147, 249, 0.9) !important;
120+
}
121+
/* strings */
122+
.highlight .s, .highlight .s1, .highlight .s2 {
123+
color: rgba(255, 121, 198, 0.8) !important;
124+
}
125+
/* attributes / methods */
126+
.highlight .n, .highlight .na, .highlight .nf {
127+
color: #9FA8DA !important;
128+
}
129+
/* builtin */
130+
.highlight .nb {
131+
color: #B39DDB !important;
132+
}
133+
/* output */
134+
.highlight .go {
135+
color: #eee !important;
136+
}
137+
/* comment */
138+
.highlight .c, .highlight .ch, .highlight .cm, .highlight .cp,
139+
.highlight .cpf, .highlight .c1, .highlight .cs {
140+
color: #BBDEFB !important;
141+
}
142+
/* number */
143+
.highlight .m, .highlight .il, .highlight .mb, .highlight .mf,
144+
.highlight .mh, .highlight .mi {
145+
color: #9FA8DA !important;
146+
}
147+
/* error */
148+
.highlight .err {
149+
color: #f00 !important;
112150
}

0 commit comments

Comments
 (0)