diff --git a/src/app.css b/src/app.css index f1f125a2..3f6f9e6c 100644 --- a/src/app.css +++ b/src/app.css @@ -618,10 +618,7 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) { font-size: calc(100% + 25% * max(2 - var(--content-text-weight), 0)); } .status-carousel - .content-container:is( - [style*='content-text-weight:1'], - [style*='content-text-weight: 1'] - ) + .content-container[data-content-text-weight='1'] .media-container.media-eq1 { /* LOL, this is madness, reading a value from the style attribute */ height: auto; diff --git a/src/components/status.css b/src/components/status.css index 1eac8f58..3b9c6ccb 100644 --- a/src/components/status.css +++ b/src/components/status.css @@ -590,7 +590,8 @@ body:has(#modal-container .carousel) .status .media img:hover { max-width: 480px; /* max-height: 160px; */ } -.status.large .card.large { +.status.large .card.large, +.status-carousel .content-container[data-content-text-weight='1'] .card.large { border-radius: 16px; flex-direction: column; max-height: none; @@ -618,7 +619,11 @@ body:has(#modal-container .carousel) .status .media img:hover { .status.large .card .card-image { aspect-ratio: 1 / 1; } -.status.large .card.large .card-image { +.status.large .card.large .card-image, +.status-carousel + .content-container[data-content-text-weight='1'] + .card.large + .card-image { flex-grow: 1; aspect-ratio: 1.91 / 1; width: 100%; diff --git a/src/components/status.jsx b/src/components/status.jsx index 536c1fcb..f5525f37 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -208,6 +208,9 @@ function Status({ const unauthInteractionErrorMessage = `Sorry, your current logged-in instance can't interact with this status from another instance.`; + const textWeight = () => + Math.round((spoilerText.length + htmlContentLength(content)) / 140) || 1; + return (