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 {
|
|
|
|
margin: 5.5px 0;
|
|
|
|
border-radius: 5px;
|
|
|
|
position: absolute;
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.search_icon {
|
|
|
|
text-decoration: none;
|
|
|
|
padding: 0 7px;
|
|
|
|
font-size: 17px;
|
|
|
|
border: none;
|
|
|
|
background-color: transparent;
|
|
|
|
color: hsl(0deg 0% 0%);
|
|
|
|
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 {
|
|
|
|
width: 28px;
|
|
|
|
height: 100%;
|
|
|
|
background: none;
|
|
|
|
border: none;
|
|
|
|
opacity: 0.5;
|
|
|
|
line-height: 0;
|
|
|
|
border-radius: 4px;
|
|
|
|
/* Leave room for the focus outline. */
|
|
|
|
margin-right: 1px;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
/* Reduce height to leave 1px on top and bottom for the outline. */
|
|
|
|
height: calc(100% - 2px);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not(:focus-visible) {
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
opacity: 1;
|
2022-05-30 02:42:28 +02:00
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
&:disabled {
|
|
|
|
visibility: hidden;
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.zulip-icon-close {
|
|
|
|
font-size: 13px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.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;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
&: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);
|
|
|
|
|
|
|
|
@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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.input-append {
|
|
|
|
position: relative;
|
2023-03-07 00:42:28 +01:00
|
|
|
width: 100%;
|
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;
|
|
|
|
height: var(--search-box-height);
|
|
|
|
/* override bootstrap min-height for input[type="text"] */
|
|
|
|
min-height: var(--search-box-height);
|
|
|
|
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
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
&::placeholder {
|
|
|
|
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 {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
/* override .input-append style from app_components.js */
|
|
|
|
letter-spacing: normal;
|
|
|
|
height: var(--search-box-height);
|
2023-03-07 00:42:28 +01:00
|
|
|
}
|
|
|
|
|
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
|
|
|
|
height (which looks weird), so add 2px of space above and below it.
|
|
|
|
The extra pixel is to account for the header's bottom border (box shadow). */
|
|
|
|
margin-top: 2px;
|
|
|
|
height: calc(var(--header-height) - 5px);
|
|
|
|
|
|
|
|
#searchbox-input-container {
|
|
|
|
height: calc(var(--search-box-height) - 5px);
|
|
|
|
}
|
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 {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@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
|
|
|
}
|
|
|
|
|
2022-05-16 19:24:49 +02:00
|
|
|
.typeahead-menu li a {
|
|
|
|
padding: 3px 30px;
|
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
|
|
|
|
|
|
|
.search_list_item .pill-container {
|
|
|
|
margin-left: 5px;
|
|
|
|
}
|
2023-07-13 18:04:22 +02:00
|
|
|
|
2023-09-21 20:21:22 +02:00
|
|
|
.pill {
|
|
|
|
align-items: baseline;
|
|
|
|
}
|
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. */
|
|
|
|
line-height: 20px;
|
|
|
|
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
|
|
|
}
|