mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #5056 from hugovk/fix-4th-level-menu-dark-mode
Don't add light mode bg to 3rd and 4th level menu items
This commit is contained in:
commit
0e50e72807
|
@ -311,3 +311,4 @@ texinfo_documents = [
|
|||
def setup(app):
|
||||
app.add_js_file("js/script.js")
|
||||
app.add_css_file("css/dark.css")
|
||||
app.add_css_file("css/light.css")
|
||||
|
|
|
@ -1196,6 +1196,11 @@
|
|||
color: rgb(166, 158, 146);
|
||||
}
|
||||
|
||||
.wy-menu-vertical li.toctree-l2.current a,
|
||||
.wy-menu-vertical li.toctree-l3.current a {
|
||||
background-color: #363636;
|
||||
}
|
||||
|
||||
.wy-menu-vertical li ul li a {
|
||||
color: rgb(208, 204, 198);
|
||||
}
|
||||
|
|
8
docs/resources/css/light.css
Normal file
8
docs/resources/css/light.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
@media (prefers-color-scheme: light) {
|
||||
|
||||
.wy-menu-vertical li.toctree-l2.current a,
|
||||
.wy-menu-vertical li.toctree-l3.current a {
|
||||
background-color: #c9c9c9;
|
||||
}
|
||||
|
||||
}
|
|
@ -24,13 +24,11 @@ jQuery(document).ready(function ($) {
|
|||
var $upperA = $sidebarItem.parent().children('a');
|
||||
var $upperAParent = $upperA.parent();
|
||||
if ($upperAParent.hasClass('toctree-l2')) {
|
||||
$a.css('background-color', '#c9c9c9');
|
||||
$a.css('padding-left', '4em');
|
||||
} else if ($upperAParent.hasClass('toctree-l3')) {
|
||||
if (!$upperA.find('.toctree-expand').length) {
|
||||
$upperA.prepend($('<span />').addClass('toctree-expand'));
|
||||
}
|
||||
$a.css('background-color', '#c9c9c9');
|
||||
$a.css('padding-left', '5em');
|
||||
} else {
|
||||
$a.css('background-color', '#bdbdbd');
|
||||
|
|
Loading…
Reference in New Issue
Block a user