Skip to content

Commit 31e888d

Browse files
committed
Fix dark theme issues
1 parent 647a1a3 commit 31e888d

File tree

3 files changed

+11
-33
lines changed

3 files changed

+11
-33
lines changed

python_docs_theme/layout.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ <h3>{{ _('Navigation') }}</h3>
3737
{{ reldelim2 }}
3838
</li>
3939
{%- endif %}
40+
<li class="right"><input type="button" value="Toggle theme" class="theme-toggle" onclick="toggleTheme()">{{ reldelim2 }}</li>
4041
{% endblock %}
4142
</ul>
4243
</div>
@@ -59,16 +60,6 @@ <h3>{{ _('Navigation') }}</h3>
5960
{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
6061
{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
6162

62-
{% block relbaritems %}
63-
{%- if pagename != "search" and builder != "singlehtml" and builder != "htmlhelp" %}
64-
<li class="right">
65-
{{ searchbox() }}
66-
{{ reldelim2 }}
67-
</li>
68-
{%- endif %}
69-
<li class="right"><input type="button" value="Toggle theme" class="theme-toggle" onclick="toggleTheme()">{{ reldelim2 }}</li>
70-
{% endblock %}
71-
7263
{%- block extrahead -%}
7364
<link rel="stylesheet" href="{{ pathto('_static/pydoctheme_dark.css', 1) }}" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
7465
<link rel="shortcut icon" type="image/png" href="{{ pathto('_static/' + theme_root_icon, 1) }}" />

python_docs_theme/static/pydoctheme.css

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,23 @@ body {
3434
}
3535

3636
div.related {
37+
margin-top: 0.5em;
3738
margin-bottom: 1.2em;
3839
padding: 0.5em 0;
39-
border-top: 1px solid #ccc;
40-
margin-top: 0.5em;
40+
border-width: 1px;
41+
border-color: #ccc;
4142
}
4243

43-
div.related a:hover {
44-
color: #0095c4;
44+
.mobile-nav + div.related {
45+
border-bottom-style: solid;
4546
}
4647

47-
div.related ~ div.related {
48-
border-top: 1px solid #ccc;
49-
border-bottom: none;
48+
.document + div.related {
49+
border-top-style: solid;
5050
}
5151

52-
div.related:first-child {
53-
border-top: 0;
54-
border-bottom: 1px solid #ccc;
52+
div.related a:hover {
53+
color: #0095c4;
5554
}
5655

5756
.related .switchers {
@@ -62,13 +61,6 @@ div.related:first-child {
6261
margin-right: 5px;
6362
}
6463

65-
.version_switcher_placeholder,
66-
.language_switcher_placeholder {
67-
padding-left: 5px;
68-
background-color: white;
69-
}
70-
71-
7264
div.related ul::after {
7365
content: '';
7466
clear: both;

python_docs_theme/static/pydoctheme_dark.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ body {
1313

1414
div.related {
1515
color: rgba(255, 255, 255, 0.7); /* classic overwrite */
16-
border-top-color: #424242;
17-
}
18-
19-
div.related:first-child {
20-
/* use :first-child because border-color would need !important */
21-
border-bottom-color: #424242;
16+
border-color: #424242;
2217
}
2318

2419
/* SIDEBAR */

0 commit comments

Comments
 (0)