Skip to content

Commit 87bcc26

Browse files
authored
Always theme search UI (incl. light mode) (#127)
1 parent 23cd55e commit 87bcc26

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

src/scanpydoc/theme/static/styles/scanpy.css

+19-12
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,48 @@ dl.citation > dt {
2323

2424
/* for the search */
2525
/*container*/
26-
html[data-theme="dark"] :is(.search__outer, .rtd__search__credits) {
26+
html[data-theme] :is(.search__outer, .rtd__search__credits) {
2727
font-family: var(--pst-font-family-base);
2828
color: var(--pst-color-text-base);
2929
background-color: var(--pst-color-background);
3030
border-color: var(--pst-color-border);
3131
}
32-
html[data-theme="dark"] .rtd__search__credits a {
32+
html[data-theme] .search__outer {
33+
border-top-left-radius: var(--bs-border-radius);
34+
border-top-right-radius: var(--bs-border-radius);
35+
}
36+
html[data-theme] .rtd__search__credits {
37+
border-bottom-left-radius: var(--bs-border-radius);
38+
border-bottom-right-radius: var(--bs-border-radius);
39+
}
40+
html[data-theme] .rtd__search__credits a {
3341
color: var(--pst-color-link);
3442
}
3543
/*input*/
36-
html[data-theme="dark"] .search__outer__input {
44+
html[data-theme] .search__outer__input {
3745
color: var(--pst-color-text-base);
3846
background-color: transparent;
3947
border-bottom-color: var(--pst-color-border);
4048
}
41-
html[data-theme="dark"] .search__outer .bar::before,
42-
html[data-theme="dark"] .search__outer .bar::after {
49+
html[data-theme] .search__outer .bar::before,
50+
html[data-theme] .search__outer .bar::after {
4351
background-color: var(--pst-color-accent);
4452
}
4553
/*results*/
46-
html[data-theme="dark"] :is(.search__result__subheading span, .search__result__single) {
54+
html[data-theme] :is(.search__result__subheading span, .search__result__single) {
4755
border-bottom-color: var(--pst-color-border);
4856
}
49-
html[data-theme="dark"] .search__result__single:last-of-type {
57+
html[data-theme] .search__result__single:last-of-type {
5058
border-bottom-width: 0;
5159
}
52-
html[data-theme="dark"]
53-
:is(.outer_div_page_results:hover, .search__result__box .active) {
54-
background-color: var(--pst-color-primary-highlight);
60+
html[data-theme] :is(.outer_div_page_results:hover, .search__result__box .active) {
61+
background-color: var(--pst-color-accent-bg);
5562
}
56-
html[data-theme="dark"]
63+
html[data-theme]
5764
:is(.search__error__box, .search__result__subheading, .search__result__content) {
5865
color: var(--pst-color-text-base);
5966
}
60-
html[data-theme="dark"]
67+
html[data-theme]
6168
.search__outer
6269
:is(.search__result__content, .search__result__title)
6370
span {

0 commit comments

Comments
 (0)