Skip to content

Commit 24d7c6f

Browse files
authored
fix: add styles for focus state of searchbar (solana-foundation#558)
## Description Add styles for focused state for SearchBar. ## Type of change - [x] Bug fix ## Screenshots <img width="899" alt="image" src="https://github.com/user-attachments/assets/13802f7c-eaff-42b5-a6bc-ba8324599ca8" /> ## Checklist - [x] My code follows the project's style guidelines - [x] I have added tests that prove my fix/feature works - [x] All tests pass locally and in CI - [x] I have updated documentation as needed - [x] CI/CD checks pass <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Add focus styles to `.search-bar__control` and normalize color codes in `_solana.scss`. > > - **Styles**: > - Add focus styles to `.search-bar__control` in `_solana.scss`, including a red outline and box-shadow. > - Normalize color codes to lowercase in `.search-indicator`, `.key-indicator`, and `.clear-indicator`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=solana-foundation%2Fexplorer&utm_source=github&utm_medium=referral)<sup> for d0829d6. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
1 parent c4d0ee8 commit 24d7c6f

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

app/scss/_solana.scss

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ h4.slot-pill {
191191
line-height: 1.5rem;
192192
}
193193

194-
195194
.search-bar__control {
196195
border-radius: $border-radius !important;
197196
padding: 2px 16px;
@@ -208,13 +207,13 @@ h4.slot-pill {
208207
width: 16px;
209208
height: 16px;
210209
padding: 4px;
211-
color: #C9C9C9;
210+
color: #c9c9c9;
212211
display: flex;
213212
transition: color 150ms;
214213
box-sizing: content-box;
215214
border-radius: 3px;
216215
border: 1px solid #111312;
217-
background: #282D2C;
216+
background: #282d2c;
218217
text-align: center;
219218
align-items: center;
220219
justify-content: center;
@@ -228,13 +227,13 @@ h4.slot-pill {
228227
width: 16px;
229228
height: 16px;
230229
padding: 4px;
231-
color: #C9C9C9;
230+
color: #c9c9c9;
232231
display: flex;
233232
transition: color 150ms;
234233
box-sizing: content-box;
235234
border-radius: 3px;
236235
border: 1px solid #111312;
237-
background: #282D2C;
236+
background: #282d2c;
238237
text-align: center;
239238
align-items: center;
240239
justify-content: center;
@@ -249,13 +248,13 @@ h4.slot-pill {
249248
width: 16px;
250249
height: 16px;
251250
padding: 4px;
252-
color: #C9C9C9;
251+
color: #c9c9c9;
253252
display: flex;
254253
transition: color 150ms;
255254
box-sizing: content-box;
256255
border-radius: 3px;
257256
border: 1px solid #111312;
258-
background: #282D2C;
257+
background: #282d2c;
259258
text-align: center;
260259
align-items: center;
261260
justify-content: center;
@@ -286,6 +285,13 @@ h4.slot-pill {
286285
}
287286
}
288287

288+
/* duplicate class to increase priority for it above !important at other parts of styles */
289+
.search-bar__control:focus,
290+
.search-bar__control--is-focused.search-bar__control--is-focused {
291+
box-shadow: 0 0rem 0.4rem $primary !important;
292+
transition: box-shadow ease;
293+
}
294+
289295
.search-bar__menu {
290296
border-radius: $border-radius !important;
291297
}

0 commit comments

Comments
 (0)