Skip to content

Commit 090e6a8

Browse files
authored
Merge pull request #121 from mattam82/update-refman-styles
Update the sphinx styles as was done in Rocq
2 parents 6885eea + 25f2a98 commit 090e6a8

File tree

3 files changed

+62
-30
lines changed

3 files changed

+62
-30
lines changed

doc/sphinx/_static/coqdoc.css

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,61 @@
99
/************************************************************************/
1010
/* Taken from CoqDoc's default stylesheet */
1111

12-
.coqdoc-constructor {
13-
color: rgb(60%,0%,0%);
14-
}
1512

16-
.coqdoc-var {
17-
color: rgb(40%,0%,40%);
13+
.id[title="constructor"],.coqdoc-constructor {
14+
color: rgb(225 0 0);
1815
}
1916

20-
.coqdoc-variable {
21-
color: rgb(40%,0%,40%);
17+
.id[title="var"],.coqdoc-var,
18+
.id[title="variable"],.coqdoc-variable {
19+
color: rgb(210 46 0);
2220
}
2321

24-
.coqdoc-definition {
25-
color: rgb(0%,40%,0%);
22+
.id[title="definition"],.coqdoc-definition {
23+
color: #FF540A;
2624
}
2725

28-
.coqdoc-abbreviation {
29-
color: rgb(0%,40%,0%);
30-
}
26+
.id[title="abbreviation"],.coqdoc-abbreviation {
27+
color: #0042b9; font-weight: bold
3128

32-
.coqdoc-lemma {
33-
color: rgb(0%,40%,0%);
3429
}
3530

36-
.coqdoc-instance {
37-
color: rgb(0%,40%,0%);
31+
.id[title="lemma"],.coqdoc-lemma {
32+
color: rgb(255 85 0);
33+
font-weight: bold
3834
}
3935

40-
.coqdoc-projection {
41-
color: rgb(0%,40%,0%);
36+
.id[title="instance"],.coqdoc-instance {
37+
color: #003eae; font-weight: bold
38+
4239
}
4340

44-
.coqdoc-method {
45-
color: rgb(0%,40%,0%);
41+
.id[title="projection"],.coqdoc-projection {
42+
color: #0042b9; font-weight: bold
43+
4644
}
4745

48-
.coqdoc-inductive {
49-
color: rgb(0%,0%,80%);
46+
.id[title="method"],.coqdoc-method {
47+
color: #0d62fb; font-weight: bold
48+
5049
}
5150

52-
.coqdoc-record {
51+
.id[title="inductive"],.coqdoc-inductive {
5352
color: rgb(0%,0%,80%);
5453
}
5554

56-
.coqdoc-class {
55+
.id[title="record"],.coqdoc-record {
5756
color: rgb(0%,0%,80%);
5857
}
5958

60-
.coqdoc-keyword {
61-
color : #cf1d1d;
59+
.id[title="class"],.coqdoc-class {
60+
color: rgb(200 105 8);
6261
}
6362

64-
/* Custom additions */
63+
.id[title="keyword"],.coqdoc-keyword {
64+
color: #08288d;
65+
font-weight: bold
66+
}
6567

6668
.coqdoc-tactic {
6769
font-weight: bold;
@@ -75,10 +77,21 @@
7577
:root {
7678
--refman-custom-primary-blue: #260086;
7779
--refman-custom-primary-blue-2: #040b92;
80+
--refman-custom-primary-blue-3: #6e6f82;
7881
--refman-custom-secondary-orange: #ff540a;
7982
--refman-custom-secondary-orange-2: #ffe9df;
8083
}
8184

85+
.highlight,
86+
.wy-side-nav-search{
87+
background: var(--refman-custom-secondary-orange) !important;
88+
}
89+
90+
.wy-side-nav-search>div.version {
91+
color: #dedede !important;
92+
}
93+
94+
.std-term,
8295
.btn-info:hover, a:hover, a.wy-text-info:hover {
8396
color: var(--refman-custom-primary-blue-2) !important
8497
}
@@ -97,7 +110,7 @@ html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-conte
97110
border-top: 3px solid var(--refman-custom-secondary-orange) !important;
98111
}
99112

100-
.wy-tray-container li.wy-tray-item-info, .btn-info, .wy-menu-vertical a:active, .wy-side-nav-search, .wy-dropdown-menu>dd>a:hover, .wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover, .wy-side-nav-search img, .wy-nav .wy-menu-vertical a:hover, .wy-nav-top, .wy-nav-top img {
113+
.wy-tray-container li.wy-tray-item-info, .btn-info, .wy-menu-vertical a:active, .wy-dropdown-menu>dd>a:hover, .wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover, .wy-side-nav-search img, .wy-nav .wy-menu-vertical a:hover, .wy-nav-top, .wy-nav-top img {
101114
background-color: var(--refman-custom-secondary-orange) !important
102115
}
103116

@@ -109,11 +122,14 @@ html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-conte
109122
background: #dedede !important;
110123
}
111124

112-
.wy-side-nav-search>div.version {
113-
color: #dedede !important;
125+
.rst-content .admonition-title a{
126+
color: var(--refman-custom-secondary-orange-2) !important;
114127
}
115128

116129
.wy-menu-vertical a:hover {
117130
background-color: #494949 !important;
118131
color: #dedede !important;
119132
}
133+
.notation .hole, .std-token .pre {
134+
color: var(--refman-custom-secondary-orange) !important
135+
}

doc/sphinx/_static/css/custom.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
html.writer-html5 .rst-content dl.field-list,
2+
html.writer-html5 .rst-content dl.footnote {
3+
display: grid;
4+
grid-template-columns: 30% 70%;
5+
justify-content: start;
6+
justify-items: start;
7+
align-items: start;
8+
}
9+
10+
dt.field-even, dd.field-odd {
11+
max-width: 100%;
12+
}

doc/sphinx/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ def setup(app):
265265
# so a file named "default.css" will overwrite the builtin "default.css".
266266
html_static_path = ['_static']
267267

268+
html_css_files = [
269+
'css/custom.css',
270+
]
271+
268272
# Add any extra paths that contain custom files (such as robots.txt or
269273
# .htaccess) here, relative to this directory. These files are copied
270274
# directly to the root of the documentation.

0 commit comments

Comments
 (0)