Skip to content

Commit 17aa2ce

Browse files
authored
Merge pull request #2435 from buildkite/search-style-redux
Visual tweaks to new docs search
2 parents 843ee4d + 95cf91c commit 17aa2ce

File tree

3 files changed

+30
-16
lines changed

3 files changed

+30
-16
lines changed

app/assets/stylesheets/components/docsearch/_variables.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
--docsearch-spacing: 12px;
77
--docsearch-icon-stroke-width: 1.4;
88
--docsearch-highlight-color: var(--docsearch-primary-color);
9-
--docsearch-muted-color: rgb(150, 159, 175);
9+
--docsearch-muted-color: $navy-600;
1010
--docsearch-container-background: rgba(101, 108, 133, 0.8);
1111
--docsearch-logo-color: rgba(84, 104, 255);
1212

1313
/* modal */
1414
--docsearch-modal-width: 560px;
1515
--docsearch-modal-height: 600px;
16-
--docsearch-modal-background: rgb(245, 246, 247);
16+
--docsearch-modal-background: #fff;
1717
--docsearch-modal-shadow: inset 1px 1px 0 0 rgba(255, 255, 255, 0.5),
1818
0 3px 8px 0 rgba(85, 90, 100, 1);
1919

app/assets/stylesheets/components/docsearch/button.scss

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
padding: 0 8px;
1313
user-select: none;
1414
transition: box-shadow $transition-speed, color $transition-speed;
15-
1615
box-shadow: rgba(93, 9, 199, 0) 0px 0px 0px 0px,
1716
rgba(93, 9, 199, 0.1) 0px 1px 3px, rgba(93, 9, 199, 0.2) 0px 0px 0px 1px,
1817
rgba(93, 9, 199, 0.05) 0px 3px 8px;
18+
@media (min-width: $screen-md) {
19+
min-width: 196px;
20+
}
1921
}
2022

2123
.DocSearch-Button:hover,
@@ -53,24 +55,21 @@
5355

5456
.DocSearch-Button-Keys {
5557
display: flex;
56-
min-width: calc(2 * 20px + 2 * 0.4em);
58+
box-shadow: $box-shadow-depth-100;
59+
border-radius: 3px;
60+
padding: 0 4px;
5761
}
5862

5963
.DocSearch-Button-Key {
6064
align-items: center;
61-
background: var(--docsearch-key-gradient);
62-
border-radius: 3px;
63-
box-shadow: var(--docsearch-key-shadow);
64-
color: var(--docsearch-muted-color);
65+
color: $navy-500;
6566
display: flex;
66-
height: 18px;
6767
justify-content: center;
68-
margin-right: 0.4em;
68+
margin: 0;
69+
padding: 2px;
6970
position: relative;
70-
padding: 0px 0px 2px 0px;
7171
border: 0px;
7272
top: -1px;
73-
width: 20px;
7473
}
7574

7675
@media (max-width: 768px) {

app/assets/stylesheets/components/docsearch/modal.scss

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
.DocSearch-Modal {
4444
background: var(--docsearch-modal-background);
45-
border-radius: 6px;
45+
border-radius: 12px;
4646
box-shadow: var(--docsearch-modal-shadow);
4747
flex-direction: column;
4848
margin: 60px auto auto;
@@ -60,14 +60,24 @@
6060
.DocSearch-Form {
6161
align-items: center;
6262
background: var(--docsearch-searchbox-focus-background);
63-
border-radius: 4px;
64-
box-shadow: var(--docsearch-searchbox-shadow);
63+
border-radius: 8px;
64+
box-shadow: rgba(93, 9, 199, 0) 0px 0px 0px 0px,
65+
rgba(93, 9, 199, 0.1) 0px 1px 3px, rgba(93, 9, 199, 0.2) 0px 0px 0px 1px,
66+
rgba(93, 9, 199, 0.05) 0px 3px 8px;
6567
display: flex;
6668
height: var(--docsearch-searchbox-height);
6769
margin: 0;
6870
padding: 0 var(--docsearch-spacing);
6971
position: relative;
7072
width: 100%;
73+
z-index: 11;
74+
transition: 0.2s ease box-shadow;
75+
76+
&:has(.DocSearch-Input:focus) {
77+
box-shadow: rgba(93, 9, 199, 0.2) 0px 0px 0px 3px,
78+
rgba(93, 9, 199, 0.2) 0px 1px 3px, rgba(93, 9, 199, 0.2) 0px 0px 0px 1px,
79+
rgba(93, 9, 199, 0.1) 0px 3px 8px;
80+
}
7181
}
7282

7383
.DocSearch-Input {
@@ -509,7 +519,7 @@ svg.DocSearch-Hit-Select-Icon {
509519
.DocSearch-Footer {
510520
align-items: center;
511521
background: var(--docsearch-footer-background);
512-
border-radius: 0 0 8px 8px;
522+
border-radius: 0 0 12px 12px;
513523
box-shadow: var(--docsearch-footer-shadow);
514524
display: flex;
515525
flex-direction: row-reverse;
@@ -527,6 +537,7 @@ svg.DocSearch-Hit-Select-Icon {
527537
color: var(--docsearch-muted-color);
528538
display: flex;
529539
list-style: none;
540+
justify-content: center;
530541
margin: 0;
531542
padding: 0;
532543
flex: 1;
@@ -640,3 +651,7 @@ svg.DocSearch-Hit-Select-Icon {
640651
opacity: 1;
641652
}
642653
}
654+
655+
.DocSearch-Title {
656+
margin-bottom: 8px;
657+
}

0 commit comments

Comments
 (0)