Skip to content

Commit 9474ab8

Browse files
committed
Searchbar colors
1 parent e8f87b2 commit 9474ab8

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

scaladoc-js/resources/scaladoc-searchbar.css

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
box-shadow: 0 2px 16px 0 rgba(0, 42, 76, 0.15);
5151
font-size: 13px;
5252
font-family: system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, sans-serif;
53+
background-color: var(--leftbar-bg);
54+
color: var(--leftbar-fg);
55+
box-shadow: 0 0 2px var(--shadow);
5356
}
5457

5558
#scaladoc-searchbar-input {
@@ -58,23 +61,24 @@
5861
border: none;
5962
border-bottom: 1px solid #bbb;
6063
padding: 10px;
61-
color: black;
64+
background-color: var(--leftbar-bg);
65+
color: var(--leftbar-fg);
6266
}
6367

6468
#scaladoc-searchbar-input:focus {
6569
outline: none;
6670
}
6771

6872
#scaladoc-searchbar-results {
69-
background: var(--white);
7073
display: flex;
7174
flex-direction: column;
7275
max-height: 500px;
7376
overflow: auto;
7477
}
7578

7679
.scaladoc-searchbar-result {
77-
background: var(--white);
80+
background-color: var(--leftbar-bg);
81+
color: var(--leftbar-fg);
7882
line-height: 24px;
7983
display: flex;
8084
padding: 4px 10px 4px 10px;
@@ -91,11 +95,11 @@
9195
}
9296

9397
.scaladoc-searchbar-result[selected] {
94-
background-color: var(--blue100);
98+
background-color: var(--leftbar-hover-bg);
99+
color: var(--leftbar-hover-fg);
95100
}
96101

97102
.scaladoc-searchbar-result a {
98-
color: var(--grey900);
99103
/* for some reason, with display:block if there's a wrap between the
100104
* search result text and the location span, the dead space to the
101105
* left of the location span doesn't get treated as part of the block,
@@ -108,10 +112,6 @@
108112
padding-left: 20px;
109113
}
110114

111-
.scaladoc-searchbar-result .scaladoc-searchbar-location {
112-
color: gray;
113-
}
114-
115115
#searchBar {
116116
display: inline-flex;
117117
}

scaladoc/resources/dotty_res/styles/colors.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,14 @@
8080
--icon-color: var(--grey400);
8181
--selected-fg: var(--blue900);
8282
--selected-bg: var(--blue200);
83+
84+
--shadow: var(--black);
8385
}
8486

8587
/* Dark Mode */
8688
:root.theme-dark {
89+
color-scheme: dark;
90+
8791
--border-light: var(--blue800);
8892
--border-medium: var(--blue700);
8993

@@ -124,4 +128,6 @@
124128

125129
--tab-selected: var(--white);
126130
--tab-default: var(--grey300);
131+
132+
--shadow: var(--white);
127133
}

scaladoc/resources/dotty_res/styles/search-bar.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,4 @@
105105
100% {
106106
background-color: white;
107107
}
108-
}
109-
110-
/* Search Error */
111-
.search-error {
112-
color: black
113108
}

0 commit comments

Comments
 (0)