2023-05-19 00:55:49 +02:00
|
|
|
#searchbox {
|
2023-03-07 00:42:28 +01:00
|
|
|
width: 100%;
|
|
|
|
height: var(--header-height);
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.navbar-search {
|
2024-03-09 02:22:59 +01:00
|
|
|
margin: 3.5px 0;
|
2022-05-16 19:24:49 +02:00
|
|
|
border-radius: 5px;
|
|
|
|
position: absolute;
|
2024-03-09 02:22:59 +01:00
|
|
|
overflow: hidden;
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.search_icon {
|
2024-03-09 02:22:59 +01:00
|
|
|
grid-area: search-icon;
|
|
|
|
align-self: center;
|
2022-05-16 19:24:49 +02:00
|
|
|
text-decoration: none;
|
|
|
|
padding: 0 7px;
|
|
|
|
font-size: 17px;
|
|
|
|
border: none;
|
|
|
|
background-color: transparent;
|
2024-08-16 17:34:40 +02:00
|
|
|
color: var(--color-search-icons);
|
2022-05-16 19:24:49 +02:00
|
|
|
opacity: 0.5;
|
|
|
|
cursor: default;
|
2023-03-07 00:42:28 +01:00
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
&:active,
|
|
|
|
&:focus {
|
|
|
|
outline: none;
|
2023-03-07 01:37:24 +01:00
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
&:disabled {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search_close_button {
|
2024-03-09 02:22:59 +01:00
|
|
|
grid-area: search-close;
|
2022-05-16 19:24:49 +02:00
|
|
|
width: 28px;
|
|
|
|
height: 100%;
|
|
|
|
background: none;
|
|
|
|
border: none;
|
|
|
|
opacity: 0.5;
|
|
|
|
line-height: 0;
|
|
|
|
border-radius: 4px;
|
2024-08-16 17:34:40 +02:00
|
|
|
/* Reset iOS button defaults. */
|
|
|
|
color: var(--color-search-icons);
|
|
|
|
padding: 0;
|
2022-05-16 19:24:49 +02:00
|
|
|
|
|
|
|
&:not(:focus-visible) {
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
opacity: 1;
|
2022-05-30 02:42:28 +02:00
|
|
|
}
|
|
|
|
|
2024-09-18 21:12:19 +02:00
|
|
|
&:focus-visible {
|
|
|
|
outline-offset: -3px;
|
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
&:disabled {
|
|
|
|
visibility: hidden;
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-09 02:22:59 +01:00
|
|
|
.search-input-and-pills {
|
|
|
|
grid-area: search-pills;
|
|
|
|
display: flex;
|
2024-04-11 06:15:50 +02:00
|
|
|
padding: 0;
|
2024-03-09 02:22:59 +01:00
|
|
|
flex-wrap: wrap;
|
2024-07-17 03:14:43 +02:00
|
|
|
gap: 2px;
|
2024-03-09 02:22:59 +01:00
|
|
|
align-self: center;
|
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.navbar-search:not(.expanded) {
|
2023-02-22 22:30:54 +01:00
|
|
|
right: 0;
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.search_close_button {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
#searchbox-input-container {
|
2023-09-27 19:23:05 +02:00
|
|
|
width: var(--search-box-width);
|
2022-05-16 19:24:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.search-input {
|
|
|
|
border-radius: 5px;
|
|
|
|
color: var(--color-text-search);
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
@media (width >= $md_min) {
|
|
|
|
box-shadow:
|
|
|
|
0 4px 20px var(--color-search-box-hover-shadow),
|
|
|
|
0 1px 5px var(--color-search-box-hover-shadow);
|
|
|
|
}
|
|
|
|
|
|
|
|
.search_icon {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-22 22:30:54 +01:00
|
|
|
@media (width < $md_min) {
|
2023-06-17 07:00:32 +02:00
|
|
|
.search-input {
|
2022-05-16 19:24:49 +02:00
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-09 00:29:56 +01:00
|
|
|
@media (height < $short_navbar_cutoff_height) {
|
2022-05-16 19:24:49 +02:00
|
|
|
#searchbox-input-container .search_icon {
|
|
|
|
font-size: 18px;
|
|
|
|
}
|
2023-02-22 22:30:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.navbar-search.expanded {
|
2023-03-07 00:42:28 +01:00
|
|
|
width: 100%;
|
2022-05-16 19:24:49 +02:00
|
|
|
box-shadow:
|
|
|
|
0 4px 20px var(--color-search-shadow-wide),
|
|
|
|
0 1px 5px var(--color-search-shadow-tight);
|
|
|
|
|
2024-03-09 02:22:59 +01:00
|
|
|
.search-input {
|
|
|
|
cursor: text;
|
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
@media (width < $md_min) {
|
|
|
|
/* 3px chosen so that the cursor clicks the search button
|
|
|
|
and close button from the same position. */
|
|
|
|
width: calc(100% - 3px);
|
|
|
|
/* z-index to not see the gear icon underneath */
|
|
|
|
z-index: 1;
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
2022-05-16 19:24:49 +02:00
|
|
|
}
|
2023-03-07 00:42:28 +01:00
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.typeahead.dropdown-menu {
|
|
|
|
/* Match the typeahead's width to its parent container. */
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
margin-top: 0;
|
|
|
|
padding-top: 0;
|
|
|
|
box-shadow: none;
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
background: var(--color-background-search);
|
|
|
|
color: var(--color-text-search);
|
|
|
|
|
|
|
|
border-width: 0;
|
|
|
|
border-top-width: 1px;
|
|
|
|
border-top-color: var(--color-search-dropdown-top-border);
|
|
|
|
border-radius: 0 0 4px 4px;
|
|
|
|
|
|
|
|
.active > a {
|
|
|
|
background-color: var(--color-background-search-option-hover);
|
|
|
|
background-image: none;
|
|
|
|
color: var(--color-text-search-hover);
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
2024-07-09 10:00:58 +02:00
|
|
|
|
2024-07-17 05:41:50 +02:00
|
|
|
.typeahead-menu .simplebar-content {
|
|
|
|
min-width: unset;
|
|
|
|
}
|
|
|
|
|
2024-06-27 10:21:46 +02:00
|
|
|
.typeahead-menu .simplebar-content > li > a {
|
2024-07-09 10:00:58 +02:00
|
|
|
max-width: none;
|
|
|
|
}
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.input-append {
|
|
|
|
position: relative;
|
2023-03-07 00:42:28 +01:00
|
|
|
width: 100%;
|
2024-07-22 06:13:21 +02:00
|
|
|
box-sizing: border-box;
|
2022-05-16 19:24:49 +02:00
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
2023-06-17 07:00:32 +02:00
|
|
|
.search-input {
|
2024-06-18 15:51:49 +02:00
|
|
|
/* Avoid massive inheritance chain on font-size. */
|
|
|
|
font-size: var(--base-font-size-px);
|
2022-05-16 19:24:49 +02:00
|
|
|
/* override bootstrap padding for input[type="text"] */
|
2023-03-07 00:42:28 +01:00
|
|
|
padding: 0;
|
|
|
|
border: none;
|
2022-05-16 19:24:49 +02:00
|
|
|
outline: none;
|
2023-03-07 00:42:28 +01:00
|
|
|
border-radius: 0;
|
2023-03-27 12:47:59 +02:00
|
|
|
font-family: "Source Sans 3 VF", sans-serif;
|
2022-05-16 19:24:49 +02:00
|
|
|
font-weight: 400;
|
|
|
|
background: transparent;
|
2023-03-07 00:42:28 +01:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
2022-05-16 19:24:49 +02:00
|
|
|
flex-grow: 1;
|
2023-06-20 08:21:47 +02:00
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
color: var(--color-text-search);
|
2023-03-07 01:37:24 +01:00
|
|
|
|
2023-09-21 11:50:42 +02:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
&:empty::before {
|
|
|
|
content: attr(data-placeholder-text);
|
2022-05-16 19:24:49 +02:00
|
|
|
color: var(--color-text-search-placeholder);
|
2023-03-07 01:37:24 +01:00
|
|
|
}
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
#searchbox-input-container {
|
2024-03-09 02:22:59 +01:00
|
|
|
display: grid;
|
2024-01-25 22:11:22 +01:00
|
|
|
/* The next two styles override .input-append style from app_components.js */
|
2022-05-16 19:24:49 +02:00
|
|
|
letter-spacing: normal;
|
2024-01-25 22:11:22 +01:00
|
|
|
font-size: 100%;
|
2024-03-09 02:22:59 +01:00
|
|
|
/* Override style for .pill-container that isn't relevant for search. */
|
2024-01-25 22:11:22 +01:00
|
|
|
border: none;
|
2024-03-09 02:22:59 +01:00
|
|
|
grid-template:
|
2024-07-12 23:32:49 +02:00
|
|
|
"search-icon search-pills search-close" var(--search-box-height)
|
|
|
|
". search-pills ." auto / auto minmax(0, 1fr) 28px;
|
2024-07-17 16:46:42 +02:00
|
|
|
align-content: center;
|
2024-03-09 02:22:59 +01:00
|
|
|
cursor: pointer;
|
2024-01-25 22:11:22 +01:00
|
|
|
|
2024-03-09 02:22:59 +01:00
|
|
|
/* Override styles for .pill-container that aren't relevant for search. */
|
2024-07-17 16:46:42 +02:00
|
|
|
&.pill-container {
|
2024-07-18 22:22:34 +02:00
|
|
|
/* Pill container should display the same background
|
|
|
|
color as the search typeahead. */
|
|
|
|
background-color: var(--color-background-search);
|
2024-07-17 16:46:42 +02:00
|
|
|
/* Maintain only a column gap. */
|
|
|
|
gap: 0 5px;
|
2024-07-23 22:01:23 +02:00
|
|
|
/* Override padding. */
|
|
|
|
padding: 0;
|
2024-07-17 16:46:42 +02:00
|
|
|
}
|
|
|
|
|
2024-03-09 02:22:59 +01:00
|
|
|
.pill {
|
|
|
|
margin: 0;
|
|
|
|
min-width: unset;
|
|
|
|
}
|
2024-01-25 22:11:22 +01:00
|
|
|
|
2024-03-09 02:22:59 +01:00
|
|
|
&:not(.focused) {
|
|
|
|
max-height: var(--search-box-height);
|
|
|
|
overflow: hidden;
|
2024-01-25 22:11:22 +01:00
|
|
|
|
2024-03-09 02:22:59 +01:00
|
|
|
.search-input-and-pills {
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
overflow: hidden;
|
2024-07-17 21:56:56 +02:00
|
|
|
|
|
|
|
@media (height < $short_navbar_cutoff_height) {
|
|
|
|
line-height: var(--base-line-height-unitless);
|
|
|
|
}
|
2024-01-25 22:11:22 +01:00
|
|
|
}
|
|
|
|
}
|
2024-04-11 06:15:50 +02:00
|
|
|
|
2024-07-11 01:44:21 +02:00
|
|
|
&.focused .user-pill-container {
|
|
|
|
flex-flow: row wrap;
|
|
|
|
}
|
|
|
|
|
2024-04-11 06:15:50 +02:00
|
|
|
.user-pill-container {
|
2024-07-19 17:42:15 +02:00
|
|
|
gap: 2px 5px;
|
|
|
|
/* Don't enforce a height, as user-pill containers
|
|
|
|
can contain multiple user pills that wrap onto
|
|
|
|
new lines. */
|
|
|
|
height: unset;
|
2024-04-11 06:15:50 +02:00
|
|
|
|
|
|
|
> .pill-label {
|
|
|
|
min-width: fit-content;
|
|
|
|
white-space: nowrap;
|
|
|
|
width: fit-content;
|
2024-06-25 21:58:40 +02:00
|
|
|
/* Replaced by the 5px gap. */
|
|
|
|
margin-right: 0;
|
2024-07-17 22:14:54 +02:00
|
|
|
/* Don't inherit large line-height for user pill labels. */
|
|
|
|
line-height: 1;
|
2024-04-11 06:15:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.pill {
|
2024-07-17 16:16:28 +02:00
|
|
|
/* Reduce user pill height by 2px to
|
|
|
|
preserve an apparent border around
|
|
|
|
them even under `box-sizing: border-box`
|
|
|
|
in the area. */
|
|
|
|
height: calc(var(--height-input-pill) - 2px);
|
2024-04-11 06:15:50 +02:00
|
|
|
border: none;
|
2024-07-17 18:21:46 +02:00
|
|
|
/* Match border radius to image */
|
|
|
|
border-radius: 4px;
|
2024-07-11 00:26:58 +02:00
|
|
|
max-width: none;
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: auto 1fr auto;
|
2024-04-11 06:15:50 +02:00
|
|
|
|
2024-07-17 22:14:54 +02:00
|
|
|
/* Don't inherit large line-height for user pills themselves, either. */
|
|
|
|
line-height: 1;
|
|
|
|
|
2024-04-11 06:15:50 +02:00
|
|
|
&:not(.deactivated-pill) {
|
|
|
|
background-color: var(--color-background-user-pill);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
|
|
|
|
2024-07-11 00:26:58 +02:00
|
|
|
.pill-label {
|
|
|
|
min-width: 30px;
|
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
@media (width >= $md_min) {
|
|
|
|
.navbar-search {
|
|
|
|
background: var(--color-background-search);
|
|
|
|
}
|
2023-05-19 00:55:49 +02:00
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.navbar-search:not(.expanded) {
|
|
|
|
box-shadow: 0 0 2px var(--color-search-box-hover-shadow);
|
2023-03-07 00:54:07 +01:00
|
|
|
}
|
2022-05-16 19:24:49 +02:00
|
|
|
}
|
2023-03-07 00:42:28 +01:00
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
@media (width < $md_min) {
|
|
|
|
.navbar-search:not(.expanded) .search_icon:hover {
|
|
|
|
opacity: 1;
|
2023-03-07 00:54:07 +01:00
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.navbar-search.expanded {
|
|
|
|
background: var(--color-background-search);
|
2023-03-07 00:54:07 +01:00
|
|
|
}
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
|
|
|
|
2023-11-09 00:29:56 +01:00
|
|
|
@media (height < $short_navbar_cutoff_height) {
|
|
|
|
#searchbox_form:not(.expanded) {
|
2022-05-16 19:24:49 +02:00
|
|
|
margin: 0;
|
2023-11-09 00:29:56 +01:00
|
|
|
/* Now that the header is shorter, the search box will take up the whole
|
2024-07-17 21:56:56 +02:00
|
|
|
height (which looks weird), so add 1px of space above and below it
|
|
|
|
by manipulating the margin and the height. */
|
|
|
|
margin-top: 1px;
|
|
|
|
height: calc(var(--header-height) - 3px);
|
2022-05-16 19:24:49 +02:00
|
|
|
}
|
2023-03-07 00:42:28 +01:00
|
|
|
|
2023-11-09 00:29:56 +01:00
|
|
|
/* It looks fine to fill the navbar when the typeahead is open. */
|
|
|
|
#searchbox_form.expanded {
|
2024-07-17 21:56:56 +02:00
|
|
|
margin-top: 1px;
|
2023-11-09 00:29:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (width < $sm_min) {
|
2022-05-16 19:24:49 +02:00
|
|
|
#searchbox_form.expanded {
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
right: 9px;
|
|
|
|
width: 100%;
|
|
|
|
border-radius: 0;
|
|
|
|
box-shadow: none;
|
2024-04-22 10:31:01 +02:00
|
|
|
/* To be visible over `.left-sidebar-toggle-unreadcount` */
|
2022-05-16 19:24:49 +02:00
|
|
|
z-index: 20;
|
|
|
|
}
|
2023-03-07 01:03:29 +01:00
|
|
|
}
|
|
|
|
|
2024-06-27 10:21:46 +02:00
|
|
|
.typeahead-menu .simplebar-content > li > a {
|
2024-07-12 21:58:47 +02:00
|
|
|
padding: 3px 40px;
|
2023-07-13 18:04:22 +02:00
|
|
|
/* Override white-space: nowrap from zulip.css */
|
|
|
|
white-space: normal;
|
2022-05-16 19:24:49 +02:00
|
|
|
|
2024-07-11 00:47:39 +02:00
|
|
|
.search_list_item {
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.search_list_item .pill-container {
|
2024-07-19 17:44:38 +02:00
|
|
|
margin: 1px 5px;
|
2024-06-10 02:15:36 +02:00
|
|
|
/* This contains only one pill, which handles its own border */
|
|
|
|
border: none;
|
2024-05-24 22:13:41 +02:00
|
|
|
cursor: pointer;
|
|
|
|
padding: 0;
|
2024-07-11 00:47:39 +02:00
|
|
|
max-width: 100%;
|
2022-05-16 19:24:49 +02:00
|
|
|
}
|
2023-07-13 18:04:22 +02:00
|
|
|
|
2023-09-21 20:21:22 +02:00
|
|
|
.pill {
|
|
|
|
align-items: baseline;
|
2024-05-24 22:13:41 +02:00
|
|
|
margin: 0;
|
2024-06-10 02:15:36 +02:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
/* Keep the border the same color, there's no user interaction for users in the typeahead menu */
|
|
|
|
border-color: var(--color-background-input-pill);
|
|
|
|
}
|
2024-05-24 22:13:41 +02:00
|
|
|
|
|
|
|
.exit {
|
|
|
|
display: none;
|
|
|
|
}
|
2023-09-21 20:21:22 +02:00
|
|
|
}
|
2023-07-13 18:04:22 +02:00
|
|
|
|
2023-09-21 20:21:22 +02:00
|
|
|
.pill-image {
|
|
|
|
/* Add line-height equal to height to mimic baseline alignment. */
|
2024-07-17 16:16:28 +02:00
|
|
|
line-height: var(--height-input-pill);
|
2023-09-21 20:21:22 +02:00
|
|
|
align-self: center;
|
|
|
|
}
|
2023-07-13 18:04:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Break really long words (unlikely to happen). */
|
|
|
|
.search_list_item span {
|
|
|
|
word-break: break-word;
|
|
|
|
}
|
2023-03-07 01:03:29 +01:00
|
|
|
}
|