Skip to content

A platform for community discussion. Free, open, simple.

UX: search CSS refactor + fixes (#32401)

chapoi43872ac2101a
diff --git a/app/assets/javascripts/discourse/app/components/search-menu/results.gjs b/app/assets/javascripts/discourse/app/components/search-menu/results.gjs
index eb80a9a9142..56de02cedc5 100644
--- a/app/assets/javascripts/discourse/app/components/search-menu/results.gjs
+++ b/app/assets/javascripts/discourse/app/components/search-menu/results.gjs
@@ -82,6 +82,7 @@ export default class Results extends Component {
(and @inHeaderMobileView this.search.activeGlobalSearchTerm)
"with-search-term"
)
+ (if this.search.contextType "has-context")
}}
data-test-selector="search-menu-results"
>
diff --git a/app/assets/javascripts/discourse/app/components/search-menu/results/assistant-item.gjs b/app/assets/javascripts/discourse/app/components/search-menu/results/assistant-item.gjs
index acbfe6e4556..afe00d52b5b 100644
--- a/app/assets/javascripts/discourse/app/components/search-menu/results/assistant-item.gjs
+++ b/app/assets/javascripts/discourse/app/components/search-menu/results/assistant-item.gjs
@@ -141,59 +141,62 @@ export default class AssistantItem extends Component {
{{on "click" this.onClick}}
data-usage={{@usage}}
>
- <a class="search-link" href={{this.href}}>
+ <a class={{concatClass @typeClass "search-link"}} href={{this.href}}>
<span aria-label={{i18n "search.title"}}>
{{icon (or @icon "magnifying-glass")}}
</span>
+ <span class="search-item-wrapper">
+ {{#if this.prefix}}
+ <span class="search-item-prefix">
+ {{this.prefix}}
+ </span>
+ {{/if}}
+
+ {{#if @withInLabel}}
+ <span class="label-suffix">{{i18n "search.in"}}</span>
+ {{/if}}
- {{#if this.prefix}}
- <span class="search-item-prefix">
- {{this.prefix}}
- </span>
- {{/if}}
-
- {{#if @withInLabel}}
- <span class="label-suffix">{{i18n "search.in"}}</span>
- {{/if}}
-
- {{#if @category}}
- <Category @result={{@category}} />
- {{#if (and @tag @isIntersection)}}
- <span class="search-item-tag">
- {{icon "tag"}}{{@tag}}
+ {{#if @category}}
+ <Category @result={{@category}} />
+ {{#if (and @tag @isIntersection)}}
+ <span class="search-item-tag">
+ {{icon "tag"}}{{@tag}}
+ </span>
+ {{/if}}
+ {{else if @tag}}
+ {{#if (and @isIntersection @additionalTags.length)}}
+ <span class="search-item-tag">{{this.tagsSlug}}</span>
+ {{else}}
+ <span class="search-item-tag">
+ <Tag @result={{@tag}} />
+ </span>
+ {{/if}}
+ {{else if @user}}
+ <span class="search-item-user">
+ <User @result={{@user}} />
</span>
{{/if}}
- {{else if @tag}}
- {{#if (and @isIntersection @additionalTags.length)}}
- <span class="search-item-tag">{{this.tagsSlug}}</span>
- {{else}}
- <span class="search-item-tag">
- <Tag @result={{@tag}} />
+
+ {{#if (or @label @suffix)}}
+ <span class="search-item-slug">
+ {{#if @suffix}}
+ <span class="label-suffix">{{@suffix}}</span>
+ {{/if}}
+ {{@label}}
</span>
{{/if}}
- {{else if @user}}
- <span class="search-item-user">
- <User @result={{@user}} />
- </span>
- {{/if}}
-
- <span class="search-item-slug">
- {{#if @suffix}}
- <span class="label-suffix">{{@suffix}}</span>
+ {{#if @extraHint}}
+ <span class="extra-hint">
+ {{i18n
+ (if
+ this.site.mobileView
+ "search.mobile_enter_hint"
+ "search.enter_hint"
+ )
+ }}
+ </span>
{{/if}}
- {{@label}}
</span>
- {{#if @extraHint}}
- <span class="extra-hint">
- {{i18n
- (if
- this.site.mobileView
- "search.mobile_enter_hint"
- "search.enter_hint"
- )
- }}
- </span>
- {{/if}}
</a>
</li>
</template>
diff --git a/app/assets/javascripts/discourse/app/components/search-menu/results/recent-searches.gjs b/app/assets/javascripts/discourse/app/components/search-menu/results/recent-searches.gjs
index d3f956bd760..bab4f8df081 100644
--- a/app/assets/javascripts/discourse/app/components/search-menu/results/recent-searches.gjs
+++ b/app/assets/javascripts/discourse/app/components/search-menu/results/recent-searches.gjs
@@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
import { service } from "@ember/service";
-import FlatButton from "discourse/components/flat-button";
+import DButton from "discourse/components/d-button";
import AssistantItem from "discourse/components/search-menu/results/assistant-item";
import User from "discourse/models/user";
import { i18n } from "discourse-i18n";
@@ -53,11 +53,11 @@ export default class RecentSearches extends Component {
<div class="search-menu-recent">
<div class="heading">
<h4>{{i18n "search.recent"}}</h4>
- <FlatButton
+ <DButton
@title="search.clear_recent"
@icon="xmark"
@action={{this.clearRecent}}
- class="clear-recent-searches"
+ class="btn-flat clear-recent-searches"
/>
</div>
diff --git a/app/assets/stylesheets/common/base/header.scss b/app/assets/stylesheets/common/base/header.scss
index eb82ec2d98d..90589a2ba37 100644
--- a/app/assets/stylesheets/common/base/header.scss
+++ b/app/assets/stylesheets/common/base/header.scss
@@ -4,6 +4,10 @@
position: sticky;
top: 0;
z-index: z("header");
+
+ @include viewport.until(sm) {
+ z-index: z("mobile-header");
+ }
}
.d-header {
diff --git a/app/assets/stylesheets/common/base/menu-panel.scss b/app/assets/stylesheets/common/base/menu-panel.scss
index c92893d3bd3..4456b3484b3 100644
--- a/app/assets/stylesheets/common/base/menu-panel.scss
+++ b/app/assets/stylesheets/common/base/menu-panel.scss
@@ -242,7 +242,7 @@
&.search-menu-panel {
width: 100vw;
max-width: 100vw;
- padding: 0.5rem 0.5rem 0;
+ padding: 0;
transform-origin: 66%;
transition: height 0.2s ease-in;
@@ -278,7 +278,7 @@
}
.btn-cancel-mobile-search {
- padding: 1rem 0.625rem;
+ align-self: stretch;
}
}
}
diff --git a/app/assets/stylesheets/common/base/search-menu.scss b/app/assets/stylesheets/common/base/search-menu.scss
index 059c29e1878..ead21c65597 100644
--- a/app/assets/stylesheets/common/base/search-menu.scss
+++ b/app/assets/stylesheets/common/base/search-menu.scss
@@ -7,25 +7,21 @@
@mixin separator {
border-top: 1px solid var(--primary-low);
- margin-top: 0.5em;
- padding-top: 0.5em;
}
$search-pad-vertical: 0.25em;
$search-pad-horizontal: 0.5em;
+$search-result-element-padding: 0.35em 1rem; // hate myself but .25em is too tight and .5 too loose
.search-menu.glimmer-search-menu {
.search-input-wrapper {
@include breakpoint("mobile-extra-large") {
- --search-input-wrapper-padding: 0.5rem;
position: fixed;
- left: var(--search-input-wrapper-padding);
- right: var(--search-input-wrapper-padding);
- top: var(--search-input-wrapper-padding);
- width: calc(100dvw - calc(var(--search-input-wrapper-padding) * 2));
- padding-bottom: var(--search-input-wrapper-padding);
+ left: 1rem;
+ right: 0.35rem; // to compensate for cancel button padding
+ top: 0.5em;
+ padding-bottom: 0.5em;
background-color: var(--secondary);
- z-index: z("base");
}
}
}
@@ -40,7 +36,12 @@ $search-pad-horizontal: 0.5em;
display: flex;
align-items: center;
justify-content: space-between;
- gap: 0.25rem;
+
+ .search-menu-panel & {
+ @include breakpoint("mobile-extra-large", $rule: min-width) {
+ padding: $search-result-element-padding;
+ }
+ }
}
.search-input {
@@ -51,7 +52,7 @@ $search-pad-horizontal: 0.5em;
background: var(--d-input-bg-color);
border: var(--d-input-border);
border-radius: var(--d-input-border-radius);
- padding: 0.25rem;
+ padding: 0.25em 0;
input.search-term__input {
background: none;
@@ -66,19 +67,8 @@ $search-pad-horizontal: 0.5em;
}
@include breakpoint("mobile-extra-large") {
- .mobile-search-button + input.search-term__input {
- padding-left: 0;
- }
- }
-
- .btn.search-context {
- margin: 2px;
- margin-right: 0;
- white-space: nowrap;
- background-color: var(--primary-200);
-
- &:hover {
- background-color: var(--primary-medium);
+ .mobile-search-button ~ input.search-term__input {
+ padding-inline: 0;
}
}
@@ -87,18 +77,20 @@ $search-pad-horizontal: 0.5em;
}
}
- @include breakpoint("mobile-extra-large") {
- .btn.search-context {
- margin: 0.25em 0 0 0;
- padding: 0.25em 0.5em;
- }
- }
+ .menu-panel {
+ border: 0;
+ box-shadow: var(--shadow-dropdown);
+ padding: 0; // overrule generic menu panels to achieve full width hover effect
- .heading {
- padding: 5px 0 5px 5px;
+ @include breakpoint("mobile-extra-large", $rule: min-width) {
+ // alignment adjustment for search menu panel (within topic) on desktop to align with results
+ .search-input {
+ padding-right: calc(1rem - 0.65em);
+ }
- .filter {
- padding: 0 5px;
+ .search-term__input {
+ padding-left: 1rem;
+ }
}
}
@@ -114,374 +106,365 @@ $search-pad-horizontal: 0.5em;
}
}
- .results {
- display: flex;
- flex-direction: column;
- border-radius: var(--d-border-radius);
+ .search-context {
+ white-space: nowrap;
+ background-color: var(--primary-200);
- &.with-search-term {
- padding-top: $search-pad-vertical;
+ @include breakpoint("mobile-extra-large", $rule: min-width) {
+ margin-left: 1rem;
+ margin-right: 0;
}
@include breakpoint("mobile-extra-large") {
- &,
- &.with-search-term {
- padding-top: 3rem;
- }
- }
-
- .list {
- min-width: 100px;
-
- .item {
- .blurb {
- // https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/
- overflow-wrap: break-word;
- word-wrap: break-word;
- word-break: break-word;
- hyphens: auto;
- margin-top: 0.25em;
- color: var(--primary-high);
- font-size: var(--font-down-1);
- }
- }
- }
-
- .search-result-topic {
- .first-line {
- display: block;
- line-height: var(--line-height-medium);
- }
-
- .second-line {
- display: flex;
- flex-wrap: wrap;
- align-items: baseline;
- gap: 0 0.5em;
- }
- }
-
- .search-result-post {
- .blurb {
- font-size: var(--font-down-1);
- }
+ position: fixed;
+ top: calc(var(--header-offset) + 0.75em);
+ left: 1rem;
+ padding: 0.25em 0.5em;
}
- .search-result-category {
- .badge-category__wrapper {
- font-size: var(--font-0);
- }
-
- .widget-link {
- margin-bottom: 0;
- }
+ &:hover {
+ background-color: var(--primary-medium);
}
+ }
- .search-result-group .group-result,
- .search-result-user {
- .search-link {
- display: flex;
- align-items: center;
-
- img.avatar {
- margin-right: 10px;
- }
- }
-
- .user-titles {
- @include user-item-flex;
-
- .name {
- font-weight: 700;
- }
-
- .username,
- .name,
- .custom-field {
- color: var(--primary-high-or-secondary-low);
- }
+ .results {
+ display: flex;
+ flex-direction: column;
+ border-radius: var(--d-border-radius);
- .custom-field {
- font-size: var(--font-down-2);
- }
+ @include breakpoint("mobile-extra-large") {
+ &.with-search-term {
+ padding-top: calc(var(--header-offset));
}
- .user-result {
- display: flex;
- align-items: center;
- font-size: var(--font-down-1);
+ // temporary solution while waiting for dev to add conditional class
+ :has(.search-context) & {
+ padding-top: calc(var(--header-offset) + 2.25em);
}
}
- .search-result-group .group-result {
+ .heading {
+ padding: 0.5em 0 0 1rem;
display: flex;
- gap: 0.5em;
align-items: center;
+ justify-content: space-between;
- &:not(.--with-flair) {
- svg {
- padding: 0.43em; // matching avatar-flair width
- background: var(--primary-200);
- border-radius: 50%;
- }
+ .menu-panel & {
+ padding: 0.5em 0.5rem 0 1rem;
}
- .d-icon {
- font-size: var(--font-down-1);
+ .filter {
+ padding: 0 5px;
}
- .avatar-flair {
- width: 1.62em;
- height: 1.6em;
- display: flex;
- justify-content: center;
- align-items: center;
- background: var(--primary-200);
+ h4 {
color: var(--primary-medium);
- border-radius: 50%;
-
- &.avatar-flair-image {
- background-repeat: no-repeat;
- background-size: 100% 100%;
- }
+ font-weight: normal;
+ margin-bottom: 0;
+ }
- .d-icon {
- font-size: var(--font-down-2);
- color: currentcolor;
- }
+ .clear-recent-searches {
+ cursor: pointer;
+ color: var(--primary-low-mid);
}
+ }
+ }
- .group-names {
- @include user-item-flex;
- min-width: 0;
+ .search-link {
+ padding: $search-result-element-padding;
- .name,
- .slug {
- @include ellipsis;
- }
+ &.category,
+ &.user,
+ &.tag {
+ display: flex;
+ align-items: center;
+ flex-wrap: nowrap;
+ gap: 0.5em;
+ }
- &.--group-with-slug {
- .name {
- font-weight: 700;
- }
- }
- }
+ // This is purposefully redundant
+ // the search widget can be used outside of the header
+ // and the focus/hover styles from the header in those cases wouldn't follow
+ &:focus,
+ &:hover {
+ background-color: var(--d-hover);
}
- .search-result-category,
- .search-result-tag {
- + .search-result-user,
- + .search-result-group {
- @include separator;
- }
+ @include breakpoint("mobile-extra-large") {
+ padding-block: 0.5em;
}
- .search-result-user .user-result img.avatar,
- .search-item-user {
+ .search-item-tag {
display: flex;
- align-self: center;
+ align-items: center;
+ gap: 0.25em;
+ color: var(--primary-high);
+ }
- img.avatar {
- width: 20px;
- height: 20px;
- margin-right: 0.5em;
- }
+ // overrules for legacy css
+ .topic-statuses {
+ float: none;
- .username {
- margin-right: 0.33em;
+ .topic-status .d-icon {
+ height: 1em;
+ width: 1em;
+ font-size: var(--font-down-1);
}
}
- .label-suffix {
- color: var(--primary-medium);
- margin-right: 0.33em;
+ .topic {
+ display: block;
}
- .badge-category__wrapper + .search-item-tag {
- display: flex;
- align-items: baseline;
- margin-left: 0.33em;
+ .topic-title {
+ font-size: var(--font-up-1-rem);
+ color: var(--tertiary);
+ overflow-wrap: anywhere;
+ margin-right: 0.25em;
}
+ }
- .search-item-tag {
- color: var(--primary-high);
+ .search-menu-initial-options,
+ .search-result-tag,
+ .search-result-user,
+ .search-result-category {
+ .search-link {
+ display: flex;
+ align-items: center;
+ gap: 0.5em;
}
+ }
- .extra-hint {
- color: var(--primary-low-mid);
- font-size: var(--font-down-1);
+ .search-menu-initial-options {
+ + .search-result-tag,
+ + .search-result-category,
+ + .search-result-user,
+ + .search-result-group {
+ @include separator;
}
- .search-item-slug {
- overflow-wrap: anywhere;
- white-space: wrap;
- min-width: 0;
+ .search-menu-recent {
+ @include separator;
+ }
+ }
- .keyword {
- margin-right: 0.33em;
- }
+ .search-result-category {
+ .badge-category__wrapper {
+ font-size: var(--font-0);
- .badge-wrapper {
- font-size: var(--font-0);
- margin-left: 2px;
+ .badge-category {
+ gap: 0.5em;
}
}
- .search-menu-initial-options {
- + .search-result-tag,
- + .search-result-category,
- + .search-result-user,
- + .search-result-group {
- @include separator;
- }
+ .widget-link {
+ margin-bottom: 0;
}
+ }
- .search-menu-initial-options,
- .search-result-tag,
- .search-menu-assistant {
- .search-item-prefix {
- margin-right: 0.33em;
+ .search-result-topic,
+ .search-result-post {
+ .list {
+ min-width: 100px;
+
+ .search-link {
+ padding-block: 0.5em;
}
- .badge-category__wrapper {
- font-size: var(--font-0);
+ .first-line {
+ display: block;
+ line-height: var(--line-height-medium);
}
- .search-link {
+ .second-line {
display: flex;
flex-wrap: wrap;
align-items: baseline;
+ gap: 0 0.5em;
+ }
- @include ellipsis;
-
- .d-icon {
- margin-right: 0.33em;
- vertical-align: middle;
- }
-
- .d-icon-tag {
- font-size: 0.7em;
- }
-
- .d-icon-magnifying-glass {
+ .item {
+ .blurb {
+ // https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/
+ overflow-wrap: break-word;
+ word-wrap: break-word;
+ word-break: break-word;
+ hyphens: auto;
+ color: var(--primary-high);
font-size: var(--font-down-1);
}
}
}
}
- .browser-search-tip,
- .search-random-quick-tip {
- padding: $search-pad-vertical 1px;
- font-size: var(--font-down-2);
- color: var(--primary-medium);
-
- .tip-label {
- background-color: rgba(var(--tertiary-rgb), 0.1);
- margin-right: 4px;
- padding: 2px 4px;
- display: inline-block;
- border: none;
+ .search-result-group .group-result {
+ display: flex;
+ gap: 0.5em;
+ align-items: center;
- &.tip-clickable {
- cursor: pointer;
+ &:not(.--with-flair) {
+ svg {
+ padding: 0.36em; // matching avatar-flair width
+ background: var(--primary-200);
+ border-radius: 50%;
}
}
- }
- .search-menu-recent {
- @include separator;
-
- .search-menu-assistant-item .search-link {
- flex-wrap: nowrap;
+ .d-icon {
+ font-size: var(--font-down-1);
}
- .heading {
+ .avatar-flair {
+ width: 1.62em;
+ height: 1.6em;
display: flex;
- justify-content: space-between;
+ justify-content: center;
+ align-items: center;
+ background: var(--primary-200);
+ color: var(--primary-medium);
+ border-radius: 50%;
- h4 {
- color: var(--primary-medium);
- font-weight: normal;
- margin-bottom: 0;
+ &.avatar-flair-image {
+ background-repeat: no-repeat;
+ background-size: 100% 100%;
}
- .clear-recent-searches {
- cursor: pointer;
- color: var(--primary-low-mid);
+ .d-icon {
+ font-size: var(--font-down-2);
+ color: currentcolor;
+ }
+ }
+
+ .group-names {
+ @include user-item-flex;
+ min-width: 0;
+
+ .name,
+ .slug {
+ @include ellipsis;
+ }
+
+ &.--group-with-slug {
+ .name {
+ font-weight: 700;
+ }
}
}
}
- .browser-search-tip {
- padding-top: 0.5em;
+ .search-result-category,
+ .search-result-tag {
+ + .search-result-user,
+ + .search-result-group {
+ @include separator;
+ }
}
- .searching {
- display: flex;
- align-items: center;
+ .user-titles {
+ @include user-item-flex;
- .spinner {
- width: 0.75rem; // 12px
- height: 0.75rem; // 12px
- border-width: 0.125rem; // 2px
- margin: 0 $hpad 0 0;
+ .name {
+ font-weight: 700;
}
- .show-advanced-search,
- .clear-search {
- .d-icon {
- color: var(--primary-medium);
- }
-
- &:focus,
- &:hover {
- .d-icon {
- color: var(--primary-high);
- }
- }
+ .username,
+ .name,
+ .custom-field {
+ color: var(--primary-high-or-secondary-low);
}
- .clear-search {
- padding-right: 0.25rem; // 4px
+ .custom-field {
+ font-size: var(--font-down-2);
}
+ }
+
+ .user-result {
+ display: flex;
+ align-items: center;
+ font-size: var(--font-down-1);
+ }
+
+ .search-result-user .user-result img.avatar,
+ .search-item-user {
+ display: flex;
+ align-self: center;
+ gap: 0.5em;
- .show-advanced-search {
- padding-left: 0.375rem; // 6px
+ img.avatar {
+ width: 20px;
+ height: 20px;
}
}
- .no-results {
- padding: $search-pad-vertical $search-pad-horizontal;
+ .label-suffix {
+ color: var(--primary-medium);
}
- .search-link {
- display: block;
- padding: $search-pad-vertical $search-pad-horizontal;
+ .extra-hint {
+ color: var(--primary-low-mid);
+ font-size: var(--font-down-1);
+ }
- // This is purposefully redundant
- // the search widget can be used outside of the header
- // and the focus/hover styles from the header in those cases wouldn't follow
- &:focus,
- &:hover {
- background-color: var(--highlight-bg);
+ .search-item-slug {
+ overflow-wrap: anywhere;
+ white-space: wrap;
+ min-width: 0;
+
+ .keyword {
+ margin-right: 0.25em;
}
- .topic {
- display: block;
+ .badge-wrapper {
+ font-size: var(--font-0);
+ margin-left: 2px;
}
+ }
+}
- .topic-title {
- color: var(--tertiary);
- overflow-wrap: anywhere;
- margin-right: 0.25em;
+.search-random-quick-tip {
+ padding: max(0.5rem, 0.5em) 1rem;
+ font-size: var(--font-down-2);
+ color: var(--primary-medium);
+
+ .tip-label {
+ background-color: rgba(var(--tertiary-rgb), 0.1);
+ margin-right: 0.25em;
+ padding: 2px 4px;
+ display: inline-block;
+ border: none;
+
+ &.tip-clickable {
+ cursor: pointer;
}
}
+}
- .search-result-topic,
- .search-result-post {
- .search-link {
- padding: 0.5em;
+.searching {
+ display: flex;
+ align-items: center;
+
+ .spinner {
+ width: 0.75rem; // 12px
+ height: 0.75rem; // 12px
+ border-width: 0.125rem; // 2px
+ margin: 0 $hpad 0 0;
+ }
+
+ .show-advanced-search,
+ .clear-search {
+ .d-icon {
+ color: var(--primary-medium);
+ }
+
+ &:focus,
+ &:hover {
+ .d-icon {
+ color: var(--primary-high);
+ }
}
}
}
+
+.no-results {
+ padding: $search-result-element-padding;
+}
diff --git a/app/assets/stylesheets/common/components/welcome-banner.scss b/app/assets/stylesheets/common/components/welcome-banner.scss
index 060aacf54ac..2a60a2b4de7 100644
--- a/app/assets/stylesheets/common/components/welcome-banner.scss
+++ b/app/assets/stylesheets/common/components/welcome-banner.scss
@@ -55,10 +55,6 @@
margin: 0;
}
- .browser-search-tip {
- display: none;
- }
-
.search-input {
.search-term__input {
min-width: 0;
@@ -93,7 +89,9 @@
color: var(--primary-medium);
height: 100%;
position: absolute;
- left: 0;
+ left: calc(
+ 1rem - 0.65em
+ ); // to align with result panel, minus padding of search icon btn
.rtl & {
right: 0;
@@ -112,11 +110,11 @@
}
+ .search-menu-container .search-input {
- padding-left: 1.75em;
+ padding-left: 2em;
.rtl & {
padding-left: unset;
- padding-right: 1.75em;
+ padding-right: 2em;
}
}
@@ -131,14 +129,10 @@
border-radius: var(--d-border-radius);
background: var(--secondary);
z-index: 9;
- margin-left: auto;
- margin-right: auto;
left: 0;
top: 100%;
right: 0;
- @include float-down;
-
@include breakpoint(mobile-extra-large) {
width: 100%;
}
diff --git a/app/assets/stylesheets/common/foundation/variables.scss b/app/assets/stylesheets/common/foundation/variables.scss
index 3cdfd2400ed..8b4004673fe 100644
--- a/app/assets/stylesheets/common/foundation/variables.scss
+++ b/app/assets/stylesheets/common/foundation/variables.scss
@@ -89,6 +89,7 @@ $z-layers: (
"overlay": 1200,
),
"fullscreen": 1150,
+ "mobile-header": 1150,
"mobile-composer": 1100,
"ipad-header-nav": 1020,
"header": 1000,
diff --git a/app/assets/stylesheets/desktop/components/header-search.scss b/app/assets/stylesheets/desktop/components/header-search.scss
index 52759568805..76383d3a034 100644
--- a/app/assets/stylesheets/desktop/components/header-search.scss
+++ b/app/assets/stylesheets/desktop/components/header-search.scss
@@ -31,7 +31,7 @@
.floating-search-input {
width: 100%;
- max-width: 550px; // half of defualt d-max-width
+ max-width: 550px; // half of default d-max-width
.search-banner {
height: 100%;
@@ -80,10 +80,9 @@
.search-icon {
background: transparent;
- padding: 0.25em;
pointer-events: none;
color: var(--header_primary-medium);
- margin-left: 0.3em;
+ margin-left: calc(1rem - 0.65em);
height: 100%;
position: absolute;
z-index: 2;
@@ -97,7 +96,7 @@
.search-input {
display: flex;
- padding: 0 0 0 1.5em;
+ padding: 0 0 0 2em;
border-radius: var(--d-input-border-radius);
.search-term__input {
@@ -118,7 +117,6 @@
display: none;
}
background: var(--secondary);
- padding: 0.5em;
position: relative;
box-sizing: border-box;
width: 100%;
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 82de528edf8..960d1d52860 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -3050,7 +3050,7 @@ en:
in_messages_tooltip: "switch to searching regular topics"
in_topics_posts: "in all topics and posts"
enter_hint: "or press Enter"
- mobile_enter_hint: "or tap Search icon"
+ mobile_enter_hint: "or tap Search"
in_posts_by: "in posts by %{username}"
recent: "Recent Searches"
clear_recent: "Clear Recent Searches"