This repository was archived by the owner on Jun 22, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSearchBar.css
More file actions
129 lines (109 loc) · 2.66 KB
/
Copy pathSearchBar.css
File metadata and controls
129 lines (109 loc) · 2.66 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500&display=swap");
:root {
--blue: #9ab3f5;
--purple: #B5A9F0;
--white: hsl(0, 0%, 100%);
--shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.search-bar-community {
margin-top: 50px;
margin-left: auto;
margin-right: auto;
align-items: center;
border-radius: 50px;
border: 1px solid black;
box-sizing: border-box;
display: flex;
height: 5.5vh;
z-index: 9999;
}
.span {
align-items: center;
margin-left: auto;
margin-right: auto;
align-items: center;
}
.dropdown {
position: relative;
width: 350px;
height: 5vh;
border-radius: 50px;
border: 1px solid var(--white);
background-color: var(--purple);
box-shadow: var(--shadow);
cursor: pointer;
}
.dropdown-text {
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
font-weight: 500;
color: var(--white);
padding: 0.7rem;
font-family: 'Montserrat', sans-serif;
}
.dropdown-list {
position: absolute;
top: calc(100% + 10px); /* Position dropdown below the button */
left: 0;
width: 100%;
background-color: var(--purple);
border-radius: 20px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15); /* Subtle shadow */
list-style: none;
padding: 0;
margin: 0;
max-height: 200px; /* Limit height for scrolling */
overflow-y: auto; /* Enable scroll for overflow */
transition: all 0.3s ease; /* Smooth opening animation */
}
.dropdown-list-item {
padding: 12px 16px; /* Consistent padding */
font-size: 0.9rem;
font-weight: 500;
color: var(--white);
cursor: pointer;
text-align: left;
border-radius: 10px; /* Rounded corners for items */
transition: background-color 0.2s ease, transform 0.2s ease; /* Add hover effects */
}
.dropdown-list-item:hover {
background-color: #c0b8f6; /* Lighter shade on hover */
transform: translateX(5px); /* Subtle movement */
}
.search-box {
display: flex;
align-items: center;
padding-right: 1rem;
width: 100%;
color: var(--purple);
}
.search-box input {
padding: 12px;
width: 100%;
font-size: 12px;
font-weight: 500;
border-radius: 50px;
color: var(--purple);
border: 0;
outline: 0;
}
.search-box i {
font-size: 1.3rem;
cursor: pointer;
height: 5vh;
}
.search-box input::placeholder {
font-size: 1rem;
font-weight: 500;
color: var(--purple);
height: 5vh;
}
.search-container {
display: flex;
align-items: center;
justify-content: center;
background-color: var(--white);
height: 5vh;
}