This repository was archived by the owner on Jun 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
86 lines (71 loc) · 1.38 KB
/
style.css
File metadata and controls
86 lines (71 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
:root {
--color1: yellow;
--color2: orangered;
--color2-trans: rgba(255, 69, 0, 0.25);
--text-background: rgba(255, 255, 255, 0.5);
}
* {
box-sizing: border-box;
}
html,
body,
.search-container {
height: 100%;
}
body {
background: linear-gradient(to right, var(--color1), var(--color2));
}
input {
padding: 1rem;
background-color: var(--text-background);
border-radius: 0.5rem;
border-width: 0.25rem;
}
.search-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 90%;
margin: auto;
position: relative;
}
.search-container input,
.search-container .suggestions {
width: 100%;
}
.search-container input {
transition: box-shadow 0.05s;
}
.search-container input:focus {
box-shadow: 0 0 0.5rem 0.25rem var(--color2);
}
.search-container .suggestions {
position: absolute;
top: calc(50% + 1.75rem);
}
.search-container ul {
margin: 0;
padding: 0;
}
li.suggestions__search-result {
padding: 0.75rem 1rem;
list-style-type: none;
background-color: var(--text-background);
}
li.suggestions__search-result:last-child {
border-bottom-left-radius: 0.5rem;
border-bottom-right-radius: 0.5rem;
}
li.suggestions__search-result:hover {
background-color: var(--color2-trans);
}
.hide {
display: none;
}
@media (min-width: 600px) {
.search-container {
min-width: 20rem;
width: 33%;
}
}