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

Alt text is too wide #2890

Open
Christopher-Hayes opened this issue Jun 20, 2024 · 2 comments
Open

Alt text is too wide #2890

Christopher-Hayes opened this issue Jun 20, 2024 · 2 comments
Labels
c: bug Something isn't working s: pending triage Pending Triage

Comments

@Christopher-Hayes
Copy link
Contributor

Christopher-Hayes commented Jun 20, 2024

Description

Alt text on desktop screens is really wide, it's not good for readability.

Screenshots

image

image

Proposed Solution

If we match the max-width of Mastodon posts (600px), we get:

image

image

For longer alt text (like the 2nd screenshot), we could clamp it at 3 lines:

image

Code from proposed solution

Parent div:

max-width: 600px;
border-radius: 12px; /* full rounded doesn't look good on multiple lines */

Alt text p:

[line-clamp-3] {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

Related Issues

Alt text should be wrapped #2509

@Christopher-Hayes Christopher-Hayes added c: bug Something isn't working s: pending triage Pending Triage labels Jun 20, 2024
Copy link

stackblitz bot commented Jun 20, 2024

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@Christopher-Hayes
Copy link
Contributor Author

Christopher-Hayes commented Jun 20, 2024

Unrelated - While I'd prefer to invite discussion and get sign-off from a maintainer before starting a PR, I did try the "Solve in Codeflow" button above. However, the setup script failed with:

│ ✔ Types generated in .nuxt
│ > @elk-zone/[email protected] prepare-translation-status /home/elk-zone/elk
│ > tsx scripts/prepare-translation-status.ts
│ TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/elk-zone/elk/scripts/prepare-translation-status.ts
...
│ Node.js 18.20.3
│  ELIFECYCLE  Command failed with exit code 1.
│ Process exited with code: 1
└─ Failed in 17.6s at /home/elk-zone/elk
 ELIFECYCLE  Command failed with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working s: pending triage Pending Triage
Projects
None yet
Development

No branches or pull requests

1 participant