Skip to content

Commit

Permalink
Fix wrong background color on search results in web UI (mastodon#29584)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored Mar 14, 2024
1 parent 5aea35d commit 1e1d97a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component';

import FindInPageIcon from '@/material-icons/400-24px/find_in_page.svg?react';
import PeopleIcon from '@/material-icons/400-24px/group.svg?react';
import SearchIcon from '@/material-icons/400-24px/search.svg?react';
import TagIcon from '@/material-icons/400-24px/tag.svg?react';
import { Icon } from 'mastodon/components/icon';
import { LoadMore } from 'mastodon/components/load_more';
Expand Down Expand Up @@ -76,11 +75,6 @@ class SearchResults extends ImmutablePureComponent {

return (
<div className='search-results'>
<div className='search-results__header'>
<Icon id='search' icon={SearchIcon} />
<FormattedMessage id='explore.search_results' defaultMessage='Search results' />
</div>

{accounts}
{hashtags}
{statuses}
Expand Down
23 changes: 6 additions & 17 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3485,7 +3485,7 @@ $ui-header-height: 55px;
}

.column-subheading {
background: darken($ui-base-color, 4%);
background: var(--surface-background-color);
color: $darker-text-color;
padding: 8px 20px;
font-size: 12px;
Expand Down Expand Up @@ -4637,7 +4637,7 @@ a.status-card {
}

.follow_requests-unlocked_explanation {
background: darken($ui-base-color, 4%);
background: var(--surface-background-color);
border-bottom: 1px solid var(--background-border-color);
contain: initial;
flex-grow: 0;
Expand Down Expand Up @@ -5269,18 +5269,6 @@ a.status-card {
}
}

.search-results__header {
color: $dark-text-color;
background: lighten($ui-base-color, 2%);
padding: 15px;
font-weight: 500;
font-size: 16px;
cursor: default;
display: flex;
align-items: center;
gap: 5px;
}

.search-results__section {
border-bottom: 1px solid var(--background-border-color);

Expand All @@ -5289,8 +5277,8 @@ a.status-card {
}

&__header {
background: darken($ui-base-color, 4%);
border-bottom: 1px solid var(--background-border-color);
background: var(--surface-background-color);
padding: 15px;
font-weight: 500;
font-size: 14px;
Expand Down Expand Up @@ -7159,7 +7147,7 @@ noscript {
.follow-request-banner,
.account-memorial-banner {
padding: 20px;
background: lighten($ui-base-color, 4%);
background: var(--surface-background-color);
display: flex;
align-items: center;
flex-direction: column;
Expand Down Expand Up @@ -8326,7 +8314,8 @@ noscript {
flex: 1 1 auto;
display: flex;
flex-direction: column;
background: $ui-base-color;
border: 1px solid var(--background-border-color);
border-top: 0;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
Expand Down
1 change: 1 addition & 0 deletions app/javascript/styles/mastodon/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,5 @@ $font-monospace: 'mastodon-font-monospace' !default;
--background-filter: blur(10px) saturate(180%) contrast(75%) brightness(70%);
--background-color: #{darken($ui-base-color, 8%)};
--background-color-tint: #{rgba(darken($ui-base-color, 8%), 0.9)};
--surface-background-color: #{darken($ui-base-color, 4%)};
}

0 comments on commit 1e1d97a

Please sign in to comment.