Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Style bigger collapse after 4.3.0-beta #54

Merged
merged 6 commits into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
.status {
$status-collapsed-height: 10em;
$notification-collapsed-height: 6em;

.status__wrapper {
&.collapsed {
.status__content {
height: unset;
max-height: 6em;
padding-top: unset;
.status {
&__content {
height: unset;
max-height: $status-collapsed-height;
padding-top: unset;
mask-image: linear-gradient(#000 80%, transparent);

&::after {
top: unset;
height: 40%;
}

// "See more" button
&__spoiler-link {
background: $action-button-color;

&::after {
top: unset;
height: 40%;
&:hover,
&:focus {
background: lighten($action-button-color, 7%);
text-decoration: none;
}
}
}
}
}

&--in-thread {
&.collapsed {
& > button {
&--in-thread > button {
margin-inline-start: 46px + 10px;
}
}
}
}

// Fix background color after upstream moved how the
// normal button is placed in the DOM
.status.collapsed .status__content__spoiler-link {
background: $action-button-color;
// set a smaller height for previews of longposts in notifications
// The component structure is different depending on whether
// grouped notifications is enabled or not, and whether
// something is an interaction or not - there isn't a
// class given for "notifications" so we have to improvise
.notification-ungrouped .status__wrapper.collapsed .status__content,
.notification__filter-bar
+ .scrollable
.status__wrapper.collapsed
.status__content {
max-height: $notification-collapsed-height;
}
Loading