Skip to content

Commit 2daee73

Browse files
author
Filip Łukasik
committed
add margin-top to divider
1 parent 6382877 commit 2daee73

File tree

3 files changed

+12
-186
lines changed

3 files changed

+12
-186
lines changed

scaladoc-js/common/css/searchbar.css

Lines changed: 0 additions & 183 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,3 @@
1-
/* Global search */
2-
.search-content {
3-
padding: 0;
4-
margin: var(--content-padding);
5-
position: fixed;
6-
top: 0;
7-
right: 0;
8-
z-index: 5;
9-
background: none;
10-
}
11-
12-
/* popup */
13-
.popup-wrapper {
14-
box-shadow: 0 0 10px var(--border-light) !important;
15-
border: 2px solid var(--border-light) !important;
16-
font-family: var(--mono-font) !important;
17-
width: calc(100% - var(--side-width) - 84px);
18-
left: calc(var(--side-width) + 42px) !important;
19-
}
20-
.popup-wrapper .indented {
21-
text-indent: 1.5em !important;
22-
}
23-
.popup-wrapper .disabled {
24-
color: var(--inactive-fg) !important;
25-
font-weight: 500 !important;
26-
}
27-
.action_def:hover,
28-
.action_def.hover_a79 {
29-
color: var(--selected-fg);
30-
background: var(--selected-bg) !important;
31-
font-weight: 500;
32-
}
33-
.action_def .template-description {
34-
margin-left: 2rem;
35-
font-style: italic;
36-
}
37-
38-
/* Landscape phones, portait tablets */
39-
@media (max-width: 768px) {
40-
.popup-wrapper {
41-
width: calc(100% - 48px);
42-
left: 24px !important;
43-
}
44-
}
45-
46-
/* Portrait phones */
47-
@media (max-width: 576px) {
48-
.search-content {
49-
margin: 0 !important;
50-
top: 9px !important;
51-
right: 12px !important;
52-
}
53-
.popup-wrapper {
54-
width: 100%;
55-
left: 0 !important;
56-
top: 36px !important;
57-
}
58-
/* Allow to scroll horizontally in the search results, which is useful on small screens */
59-
.popup-wrapper div.ReactVirtualized__Grid__innerScrollContainer {
60-
overflow: auto !important;
61-
}
62-
.popup-wrapper div.ReactVirtualized__Grid__innerScrollContainer > div {
63-
min-width: 100%;
64-
width: auto !important;
65-
}
66-
}
67-
681
/* Loading */
692
.loading-wrapper {
703
text-align: center;
@@ -126,120 +59,20 @@ div[selected] > .scaladoc-searchbar-inkuire-package {
12659
display: flex;
12760
}
12861

129-
.scaladoc-searchbar-inkuire-package > .micon {
130-
float: right;
131-
margin-left: auto !important;
132-
}
133-
134-
/* button */
135-
.search span {
136-
background: var(--red500);
137-
fill: var(--white);
138-
cursor: pointer;
139-
border: none;
140-
padding: 9px;
141-
border-radius: 24px;
142-
box-shadow: 0 0 16px var(--code-bg);
143-
}
144-
.search span:hover {
145-
background: var(--red600);
146-
}
147-
148-
@media (max-width: 576px) {
149-
.search span {
150-
background: none;
151-
fill: var(--icon-color);
152-
cursor: pointer;
153-
border: none;
154-
padding: 0;
155-
box-shadow: none;
156-
margin-top: 2px;
157-
}
158-
159-
.search span:hover {
160-
fill: var(--link-hover-fg);
161-
}
162-
163-
#scaladoc-searchbar span.pull-right {
164-
display: none;
165-
}
166-
}
167-
168-
#scaladoc-search {
169-
margin-top: 16px;
170-
cursor: pointer;
171-
position: fixed;
172-
top: 0;
173-
right: 20px;
174-
z-index: 5;
175-
}
176-
17762
#scaladoc-searchbar.hidden {
17863
display: none;
17964
}
18065

181-
/* #scaladoc-searchbar {
182-
position: fixed;
183-
top: 50px;
184-
left: calc(5% + var(--side-width));
185-
z-index: 5;
186-
width: calc(90% - var(--side-width));
187-
box-shadow: 2px 2px 8px 0 var(--shadow);
188-
font-size: 13px;
189-
font-family: system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu,
190-
Cantarell, Helvetica Neue, Arial, sans-serif;
191-
background-color: var(--leftbar-bg);
192-
color: var(--leftbar-fg);
193-
box-shadow: 0 0 2px var(--shadow);
194-
} */
195-
196-
/* #scaladoc-searchbar-input { */
197-
/* width: 100%;
198-
min-height: 32px;
199-
border: none;
200-
border-bottom: 1px solid #bbb;
201-
padding: 10px;
202-
background-color: var(--leftbar-bg);
203-
color: var(--leftbar-fg); */
204-
/* } */
205-
206-
/* #scaladoc-searchbar-input:focus {
207-
outline: none;
208-
} */
209-
210-
/* #scaladoc-searchbar-results {
211-
display: flex;
212-
flex-direction: column;
213-
overflow: auto;
214-
} */
215-
216-
/* .scaladoc-searchbar-row {
217-
display: flex;
218-
background-color: var(--leftbar-bg);
219-
color: var(--leftbar-fg);
220-
line-height: 24px;
221-
padding: 4px 10px 4px 10px;
222-
} */
223-
22466
.scaladoc-searchbar-row.hidden {
22567
display: none;
22668
}
22769

228-
/* .scaladoc-searchbar-row[divider] {
229-
border-top: solid 1px var(--leftbar-border);
230-
} */
231-
23270
.scaladoc-searchbar-row .micon {
23371
height: 16px;
23472
width: 16px;
23573
margin: 4px 8px 0px 0px;
23674
}
23775

238-
/* .scaladoc-searchbar-row[selected] {
239-
background-color: var(--leftbar-hover-bg);
240-
color: var(--leftbar-hover-fg);
241-
} */
242-
24376
.scaladoc-searchbar-row[result] {
24477
flex-direction: column;
24578
}
@@ -265,22 +98,6 @@ div[selected] > .scaladoc-searchbar-inkuire-package {
26598
margin-right: 4px;
26699
}
267100

268-
/* .searchbar-hints {
269-
padding-top: 5vh;
270-
padding-bottom: 5vh;
271-
padding-left: 5vw;
272-
padding-right: 5vw;
273-
display: flex;
274-
flex-direction: column;
275-
align-items: center;
276-
justify-content: center;
277-
}
278-
279-
.searchbar-hints-list {
280-
font-size: medium;
281-
line-height: 2em;
282-
} */
283-
284101
#searchBar {
285102
display: inline-flex;
286103
}

scaladoc-js/main/src/searchbar/SearchbarComponent.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ class SearchbarComponent(engine: SearchbarEngine, inkuireEngine: InkuireJSSearch
7575
def createLoadMoreElement =
7676
div(cls := "scaladoc-searchbar-row monospace", "loadmore" := "")(
7777
a(
78-
a(cls := "i fas fa-arrow-down"),
79-
span("Show more...")
78+
span("Load more")
8079
)
8180
).tap { loadMoreElement => loadMoreElement
8281
.addEventListener("mouseover", _ => handleHover(loadMoreElement))

scaladoc/resources/dotty_res/styles/theme/layout/searchBar.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,20 @@
155155
.scaladoc-searchbar-row {
156156
display: flex;
157157
color: var(--text-secondary);
158-
padding: calc(2 * var(--base-spacing)) calc(2 * var(--base-spacing));
158+
padding: calc(1.5 * var(--base-spacing)) calc(2 * var(--base-spacing));
159+
}
160+
161+
.scaladoc-searchbar-row[result] {
162+
padding: calc(1.25 * var(--base-spacing)) calc(2 * var(--base-spacing));
163+
}
164+
165+
.scaladoc-searchbar-row[result]:hover,
166+
.scaladoc-searchbar-row[selected] {
167+
background-color: var(--action-primary-background-selected);
159168
}
160169

161170
.scaladoc-searchbar-row[divider] {
171+
margin-top: calc(0.25 * var(--base-spacing));
162172
border-top: solid 1px var(--border-default);
163173
}
164174

0 commit comments

Comments
 (0)