Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Algolia styling to Styleguide #471

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addon/styles/addon.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
@import 'icon.css';
@import 'sidebar-container.css';
@import 'well.css';
@import 'algolia-search.css';

/* Helpers */
@import 'helpers/index.css';
Expand Down
78 changes: 78 additions & 0 deletions addon/styles/algolia-search.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#search-input {
border-radius: 18px;
border: 2px solid var(--color-card-border);
line-height: 30px;
padding-left: 8px;
width: 100%;
}

/* Dropdown styling */
.ds-dropdown-results {
z-index: 1; /* makes sure that the search is above the version selector */
}
.ds-dropdown-menu {
width: 500px;
background-color: white;
color: black;
border-radius: 8px;
margin-top: 10px;
border: 2px solid var(--color-card-border);
overflow-x: hidden;
}

/* Dropdown header styling */
.algolia-docsearch-suggestion__main {
background-color: var(--color-info);
padding: 8px 16px;
}

.algolia-docsearch-suggestion__main > .algolia-docsearch-suggestion--wrapper {
border: none;
padding: 0;
}

/* No results styling */
.algolia-docsearch-suggestion--noresults {
color: var(--color-gray-600);
padding: 8px 16px;
}

/* Result styling */
.algolia-docsearch-suggestion--wrapper {
display: flex;
border-bottom: 1px solid var(--color-card-border);
gap: 10px;
font-size: 14px;
padding: 8px 16px;
}

.algolia-docsearch-suggestion--subcategory-column {
flex-basis: 80px;
min-width: 80px;
}

.algolia-docsearch-suggestion--subcategory-column-text {
font-weight: bold;
}

/* Search sponsor styling */
.powered-by-algolia {
display: flex;
justify-content: end;
margin: 8px;
}
.powered-by-algolia > a {
display: flex;
}

@media (min-width: 1008px) {
.navbar-list {
flex-grow: 1;
}
}

@media (max-width: 1007px) {
.ds-dropdown-menu {
width: calc(100vw - 2rem);
}
}
3 changes: 3 additions & 0 deletions docs/concepts/search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Algolia Search style overrides

We use Algolia as search engine. This comes with some default styling which we've updated a bit to look nicer and fit more with our theme.