mirror of https://github.com/Siphonay/mastodon
fix(collapsing): fix and simplify post collapsing CSS (#2757)
This commit is contained in:
parent
a396985c14
commit
6d6064d2c0
|
@ -802,7 +802,7 @@ class Status extends ImmutablePureComponent {
|
|||
{prepend}
|
||||
|
||||
<div
|
||||
className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), 'status--in-thread': !!rootId, 'status--first-in-thread': previousId && (!connectUp || connectToRoot), muted: this.props.muted, 'has-background': isCollapsed && background, collapsed: isCollapsed })}
|
||||
className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), 'status--in-thread': !!rootId, 'status--first-in-thread': previousId && (!connectUp || connectToRoot), muted: this.props.muted, 'has-background': isCollapsed && background })}
|
||||
data-id={status.get('id')}
|
||||
style={isCollapsed && background ? { backgroundImage: `url(${background})` } : null}
|
||||
>
|
||||
|
|
|
@ -1541,12 +1541,15 @@ body > [data-popper-placement] {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.collapsed {
|
||||
.status__wrapper.collapsed {
|
||||
.status {
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
user-select: none;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
&.has-background::before {
|
||||
display: block;
|
||||
|
@ -1574,41 +1577,13 @@ body > [data-popper-placement] {
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding-top: 0;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
inset-inline-start: 0;
|
||||
inset-inline-end: 0;
|
||||
background: linear-gradient(transparent, var(--background-color));
|
||||
pointer-events: none;
|
||||
}
|
||||
mask-image: linear-gradient(rgb(0 0 0 / 100%), transparent);
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus > .status__content::after {
|
||||
background: linear-gradient(
|
||||
rgba(lighten($ui-base-color, 4%), 0),
|
||||
rgba(lighten($ui-base-color, 4%), 1)
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: review
|
||||
&.status-direct > .status__content::after {
|
||||
background: linear-gradient(
|
||||
rgba(mix($ui-base-color, $ui-highlight-color, 95%), 0),
|
||||
rgba(mix($ui-base-color, $ui-highlight-color, 95%), 1)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.status__wrapper.collapsed {
|
||||
.notification__message {
|
||||
margin-bottom: 0;
|
||||
white-space: nowrap;
|
||||
|
@ -1819,10 +1794,6 @@ body > [data-popper-placement] {
|
|||
.status__wrapper-direct {
|
||||
background: rgba($ui-highlight-color, 0.05);
|
||||
|
||||
&:focus {
|
||||
background: rgba($ui-highlight-color, 0.05);
|
||||
}
|
||||
|
||||
.status__prepend {
|
||||
color: $highlight-text-color;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue