Skip to content

Commit

Permalink
fix(css): don't display key shortcuts on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Shipow committed Jul 4, 2020
1 parent dde883e commit 1957f5a
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 59 deletions.
9 changes: 0 additions & 9 deletions src/styles/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,6 @@ svg.DocSearch-Hit-Select-Icon {
display: none;
}

.DocSearch-SearchButton-KeySeparator,
.DocSearch-SearchButton-Key {
display: none;
}

.DocSearch-SearchButton-Placeholder {
display: none;
}

.DocSearch-Dropdown {
height: 100%;
}
Expand Down
110 changes: 60 additions & 50 deletions src/styles/search-button.css
Original file line number Diff line number Diff line change
@@ -1,56 +1,66 @@
/* Search Button */

.DocSearch-SearchButton {
align-items: center;
background: var(--docsearch-searchbox-background);
border: 0;
border-radius: 40px;
color: var(--docsearch-text-color);
color: var(--docsearch-muted-color);
cursor: pointer;
display: flex;
font-weight: 500;
height: 36px;
margin: 0 0 0 16px;
padding: 0 8px;
user-select: none;
}

.DocSearch-SearchButton:hover,
.DocSearch-SearchButton:active,
.DocSearch-SearchButton:focus {
background: var(--docsearch-searchbox-focus-background);
box-shadow: var(--docsearch-searchbox-shadow);
color: var(--docsearch-text-color);
outline: none;
}

.DocSearch-Search-Icon {
stroke-width: 1.6;
}

.DocSearch-SearchButton .DocSearch-Search-Icon {
color: var(--docsearch-text-color);
align-items: center;
background: var(--docsearch-searchbox-background);
border: 0;
border-radius: 40px;
color: var(--docsearch-text-color);
color: var(--docsearch-muted-color);
cursor: pointer;
display: flex;
font-weight: 500;
height: 36px;
margin: 0 0 0 16px;
padding: 0 8px;
user-select: none;
}

.DocSearch-SearchButton:hover,
.DocSearch-SearchButton:active,
.DocSearch-SearchButton:focus {
background: var(--docsearch-searchbox-focus-background);
box-shadow: var(--docsearch-searchbox-shadow);
color: var(--docsearch-text-color);
outline: none;
}

.DocSearch-Search-Icon {
stroke-width: 1.6;
}

.DocSearch-SearchButton .DocSearch-Search-Icon {
color: var(--docsearch-text-color);
}

.DocSearch-SearchButton-Placeholder {
font-size: 1rem;
padding: 0 12px 0 6px;
}

.DocSearch-SearchButton-Key {
align-items: center;
background: var(--docsearch-key-gradient);
border-radius: 3px;
box-shadow: var(--docsearch-key-shadow);
color: var(--docsearch-muted-color);
display: flex;
height: 18px;
justify-content: center;
margin-right: 0.4em;
padding-bottom: 2px;
position: relative;
top: -1px;
width: 20px;
}

@media (max-width: 750px) {
.DocSearch-SearchButton-KeySeparator,
.DocSearch-SearchButton-Key {
display: none;
}

.DocSearch-SearchButton-Placeholder {
font-size: 1rem;
padding: 0 12px 0 6px;
}

.DocSearch-SearchButton-Key {
align-items: center;
background: var(--docsearch-key-gradient);
border-radius: 3px;
box-shadow: var(--docsearch-key-shadow);
color: var(--docsearch-muted-color);
display: flex;
height: 18px;
justify-content: center;
margin-right: 0.4em;
padding-bottom: 2px;
position: relative;
top: -1px;
width: 20px;
display: none;
}
}

0 comments on commit 1957f5a

Please sign in to comment.