Change styling to always have scrollbar on search results

This commit is contained in:
Thibaut Girka 2020-08-17 14:05:59 +02:00 committed by ThibG
parent d4b65193c7
commit 5dcc406abe
2 changed files with 45 additions and 34 deletions

View File

@ -125,9 +125,11 @@ class SearchResults extends ImmutablePureComponent {
<FormattedMessage id='search_results.total' defaultMessage='{count, number} {count, plural, one {result} other {results}}' values={{ count }} /> <FormattedMessage id='search_results.total' defaultMessage='{count, number} {count, plural, one {result} other {results}}' values={{ count }} />
</header> </header>
{accounts} <div className='search-results__contents'>
{statuses} {accounts}
{hashtags} {statuses}
{hashtags}
</div>
</div> </div>
); );
}; };

View File

@ -115,8 +115,10 @@
.drawer--results { .drawer--results {
background: $ui-base-color; background: $ui-base-color;
overflow-x: hidden; overflow: hidden;
overflow-y: auto; display: flex;
flex-direction: column;
flex: 1 1 auto;
& > header { & > header {
color: $dark-text-color; color: $dark-text-color;
@ -125,6 +127,7 @@
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
cursor: default; cursor: default;
flex: 0 0 auto;
.fa { .fa {
display: inline-block; display: inline-block;
@ -132,41 +135,47 @@
} }
} }
& > section { & > .search-results__contents {
margin-bottom: 5px; overflow-x: hidden;
overflow-y: scroll;
flex: 1 1 auto;
h5 { & > section {
background: darken($ui-base-color, 4%); margin-bottom: 5px;
border-bottom: 1px solid lighten($ui-base-color, 8%);
cursor: default;
display: flex;
padding: 15px;
font-weight: 500;
font-size: 16px;
color: $dark-text-color;
.fa { h5 {
display: inline-block; background: darken($ui-base-color, 4%);
margin-right: 5px; border-bottom: 1px solid lighten($ui-base-color, 8%);
cursor: default;
display: flex;
padding: 15px;
font-weight: 500;
font-size: 16px;
color: $dark-text-color;
.fa {
display: inline-block;
margin-right: 5px;
}
} }
}
.account:last-child, .account:last-child,
& > div:last-child .status { & > div:last-child .status {
border-bottom: 0; border-bottom: 0;
} }
& > .hashtag { & > .hashtag {
display: block; display: block;
padding: 10px; padding: 10px;
color: $secondary-text-color; color: $secondary-text-color;
text-decoration: none; text-decoration: none;
&:hover, &:hover,
&:active, &:active,
&:focus { &:focus {
color: lighten($secondary-text-color, 4%); color: lighten($secondary-text-color, 4%);
text-decoration: underline; text-decoration: underline;
}
} }
} }
} }