Compare commits

...

2 commits

Author SHA1 Message Date
thislight
3ae9cffba8
TootPreviewCard: limit text lines (#9)
All checks were successful
/ depoly (push) Successful in 1m1s
A problem in this impl is that the ellipsis does
not show.
2024-09-14 15:08:17 +08:00
thislight
581d2d456e
TootBottomSheet: fix visual with preview card 2024-09-14 14:28:30 +08:00
4 changed files with 14 additions and 0 deletions

View file

@ -11,6 +11,8 @@
--button-size: 1rem; --button-size: 1rem;
--button-weight: 500; --button-weight: 500;
--button-text-transform: uppercase; --button-text-transform: uppercase;
--body-line-height: 1.375;
--title-line-height: 1.25;
@media (min-width: 1024px) { @media (min-width: 1024px) {
& { & {
@ -39,6 +41,8 @@
--caption-size: 0.9375rem; --caption-size: 0.9375rem;
--button-size: 1.0625rem; --button-size: 1.0625rem;
--button-text-transform: none; --button-text-transform: none;
--body-line-height: 1.425;
--title-line-height: 1.3;
@media (min-width: 1024px) { @media (min-width: 1024px) {
& { & {
@ -148,4 +152,5 @@
body { body {
font-size: var(--body-size, 1rem); font-size: var(--body-size, 1rem);
line-height: var(--body-line-height);
} }

View file

@ -22,6 +22,7 @@
.title { .title {
font-size: var(--title-size); font-size: var(--title-size);
font-weight: var(--title-weight); font-weight: var(--title-weight);
line-height: var(--title-line-height);
} }
.subheading { .subheading {

View file

@ -164,6 +164,7 @@ const TootBottomSheet: Component = (props) => {
.bottom-dock { .bottom-dock {
position: sticky; position: sticky;
bottom: 0; bottom: 0;
z-index: var(--tutu-zidx-nav);
} }
.name :global(img) { .name :global(img) {

View file

@ -137,12 +137,19 @@
>h1 { >h1 {
color: var(--tutu-color-on-surface); color: var(--tutu-color-on-surface);
max-height: calc(4 * var(--title-line-height) * var(--title-size));
}
> p {
max-height: calc(8 * var(--body-line-height) * var(--body-size));
} }
>h1, >h1,
>p { >p {
margin-left: 16px; margin-left: 16px;
margin-right: 16px; margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
} }
&.compact { &.compact {