Skip to content

Commit da3938a

Browse files
authored
Merge pull request #11 from sethbern/fix-dark-mode
fix dark mode for dropdown menu in course home and for chapter naviga…
2 parents f561516 + eca2ee1 commit da3938a

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

bases/rsptx/interactives/runestone/common/css/runestone-custom-sphinx-bootstrap.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,27 @@ div.container {
393393
background-color: #f5f5f5;
394394
}
395395

396+
/*Dark mode-force dropdown menus to black background with white text */
397+
[data-theme="dark"] .dropdown-menu {
398+
background-color: #000000;
399+
color: #ffffff;
400+
}
401+
402+
[data-theme="dark"] .dropdown-menu > li > a,
403+
[data-theme="dark"] .dropdown-menu > li > span,
404+
[data-theme="dark"] .dropdown-menu > li > div,
405+
[data-theme="dark"] .dropdown-menu > li > label {
406+
color: #ffffff;
407+
}
408+
409+
[data-theme="dark"] .dropdown-menu > li > a:hover,
410+
[data-theme="dark"] .dropdown-menu > li > a:focus,
411+
[data-theme="dark"] .dropdown-menu > li > label:hover,
412+
[data-theme="dark"] .dropdown-menu > li > label:focus {
413+
color: #ffffff;
414+
background-color: #333333;
415+
}
416+
396417
.dropdown-menu > li > a {
397418
color: var(--grayToWhite);
398419
}

bases/rsptx/interactives/runestone/common/css/user-highlights.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,17 @@ div.sphinxsidebar {
9999
margin-left: auto;
100100
margin-right: auto;
101101
}
102+
103+
[data-theme="dark"] #jump-to-chapter {
104+
background-color: #000000;
105+
color: #ffffff;
106+
border-color: #555555;
107+
}
108+
109+
[data-theme="dark"] #jump-to-chapter option {
110+
background-color: #000000;
111+
color: #ffffff;
112+
}
102113
#navigation-links{
103114
background-color: #F8F8F8;
104115
border: 1px solid #CCCCCC;

components/rsptx/templates/staticAssets/css/runestone-custom-sphinx-bootstrap.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,27 @@ div.section {
140140
white-space: nowrap;
141141
}
142142

143+
/*Dark mode- force dropdown menus to black background with white text */
144+
[data-theme="dark"] .dropdown-menu {
145+
background-color: #000000 !important;
146+
color: #ffffff !important;
147+
}
148+
149+
[data-theme="dark"] .dropdown-menu > li > a,
150+
[data-theme="dark"] .dropdown-menu > li > span,
151+
[data-theme="dark"] .dropdown-menu > li > div,
152+
[data-theme="dark"] .dropdown-menu > li > label {
153+
color: #ffffff !important;
154+
}
155+
156+
[data-theme="dark"] .dropdown-menu > li > a:hover,
157+
[data-theme="dark"] .dropdown-menu > li > a:focus,
158+
[data-theme="dark"] .dropdown-menu > li > label:hover,
159+
[data-theme="dark"] .dropdown-menu > li > label:focus {
160+
color: #ffffff !important;
161+
background-color: #333333 !important;
162+
}
163+
143164
.loggedinuser {
144165
font-weight: bold;
145166
}

0 commit comments

Comments
 (0)