Skip to content

Commit

Permalink
Fix new hashtag page's items not being full-width on mobile (mastodon…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron committed Jan 18, 2019
1 parent 32daecf commit b506ce1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class DetailedStatus extends ImmutablePureComponent {

_measureHeight (heightJustChanged) {
if (this.props.measureHeight && this.node) {
scheduleIdleTask(() => this.node && this.setState({ height: this.node.scrollHeight }));
scheduleIdleTask(() => this.node && this.setState({ height: Math.ceil(this.node.scrollHeight) + 1 }));

if (this.props.onHeightChange && heightJustChanged) {
this.props.onHeightChange();
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/styles/mastodon/containers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
color: $primary-text-color;
}

@media screen and (max-width: $no-gap-breakpoint) {
@media screen and (max-width: 550px) {
&.optional {
display: none;
}
Expand Down
10 changes: 9 additions & 1 deletion app/javascript/styles/mastodon/widgets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,21 @@ $fluid-breakpoint: $maximum-width + 20px;
.statuses-grid {
min-height: 600px;

@media screen and (max-width: 640px) {
width: 100% !important; // Masonry layout is unnecessary at this width
}

&__item {
width: (960px - 20px) / 3;

@media screen and (max-width: $fluid-breakpoint) {
width: (940px - 20px) / 3;
}

@media screen and (max-width: 640px) {
width: 100%;
}

@media screen and (max-width: $no-gap-breakpoint) {
width: 100vw;
}
Expand All @@ -448,7 +456,7 @@ $fluid-breakpoint: $maximum-width + 20px;
border-radius: 4px;

@media screen and (max-width: $no-gap-breakpoint) {
border-bottom: 1px solid lighten($ui-base-color, 12%);
border-top: 1px solid lighten($ui-base-color, 16%);
}

&.compact {
Expand Down

0 comments on commit b506ce1

Please sign in to comment.