Skip to content

Commit 72865de

Browse files
TheElectronWillromanowski
authored andcommitted
Fix search popup on small screens
1 parent 6e22e8c commit 72865de

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/* Global search */
2+
.search-content {
3+
padding: 0;
4+
margin: var(--content-padding);
5+
position: absolute;
6+
top: 0;
7+
right: 0;
8+
z-index: 5;
9+
background: none;
10+
}
11+
12+
/* button */
13+
.search button {
14+
background: none;
15+
fill: var(--icon-color);
16+
cursor: pointer;
17+
border: none;
18+
padding: 0;
19+
}
20+
.search button:hover {
21+
fill: var(--link-hover-fg);
22+
}
23+
.search button svg {
24+
width: 24px;
25+
height: 24px;
26+
}
27+
28+
/* popup */
29+
.popup-wrapper {
30+
box-shadow: 0 0 10px var(--border-light) !important;
31+
border: 2px solid var(--border-light) !important;
32+
font-family: var(--mono-font) !important;
33+
width: calc(100% - var(--side-width) - 84px);
34+
left: calc(var(--side-width) + 42px) !important;
35+
}
36+
.popup-wrapper .indented {
37+
text-indent: 1.5em !important;
38+
}
39+
.popup-wrapper .disabled {
40+
color: var(--inactive-fg) !important;
41+
font-weight: 500 !important;
42+
}
43+
.action_def:hover, .action_def:focus-within {
44+
color: var(--selected-fg);
45+
background: var(--selected-bg) !important;
46+
font-weight: 500;
47+
}
48+
49+
/* Landscape phones, portait tablets */
50+
@media(max-width: 768px) {
51+
.popup-wrapper {
52+
width: calc(100% - 48px);
53+
left: 24px !important;
54+
}
55+
}
56+
57+
/* Portrait phones */
58+
@media(max-width: 576px) {
59+
.search-content {
60+
margin: 0 !important;
61+
top: 9px !important;
62+
right: 12px !important;
63+
}
64+
.popup-wrapper {
65+
width: 100%;
66+
left: 0 !important;
67+
top: 36px !important;
68+
}
69+
/* Allow to scroll horizontally in the search results, which is useful on small screens */
70+
.popup-wrapper div.ReactVirtualized__Grid__innerScrollContainer {
71+
overflow: auto !important;
72+
}
73+
.popup-wrapper div.ReactVirtualized__Grid__innerScrollContainer > div {
74+
min-width: 100%;
75+
width: auto !important;
76+
}
77+
}

0 commit comments

Comments
 (0)