diff --git a/web/css/06-crate.css b/web/css/06-crate.css index d327baa..276abf3 100644 --- a/web/css/06-crate.css +++ b/web/css/06-crate.css @@ -43,12 +43,13 @@ .hero__bar--public { justify-content: flex-start; } +/* The handle is the identity, not decoration: it wraps instead of ellipsing. + overflow-wrap covers the no-spaces case (a handle breaks only at its own + dots by nature, which isn't always enough room). */ .hero__brand--handle { text-transform: uppercase; min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + overflow-wrap: anywhere; } /* Pushed to the row's far end regardless of how little space the handle needs. */ .hero__follow { @@ -195,11 +196,15 @@ min-width: 0; padding: 10px; } +/* Titles run long ("The Rise And Fall Of Ziggy Stardust..."); two lines + before an ellipsis reads as content, one line reads as a stub. */ .cover-card__title { font: 700 13px/1.2 var(--mono); + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + line-clamp: 2; overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; } .cover-card__artist { font: 400 11px/1.2 var(--mono); @@ -322,11 +327,14 @@ flex-direction: column; gap: 2px; } +/* Same reasoning as .cover-card__title: two lines before an ellipsis. */ .row__title { font: 700 13px/1.2 var(--mono); + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + line-clamp: 2; overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; } .row__meta { font: 400 11px/1.2 var(--mono); diff --git a/web/css/07-browse.css b/web/css/07-browse.css index bbfad30..5147835 100644 --- a/web/css/07-browse.css +++ b/web/css/07-browse.css @@ -66,14 +66,14 @@ gap: 3px; padding: 10px 10px 0; } -/* Handles like @cratedigger.bsky.social have no word breaks, so without this - the line wraps mid-word across up to 3 lines instead of reading as content. */ +/* A handle is the identity, not decoration: never ellipse it. Handles like + @cratedigger.bsky.social have no spaces to break on, so overflow-wrap + lets it break at a dot or, failing that, anywhere, rather than + truncating mid-string. */ .browse-card__via { display: block; min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + overflow-wrap: anywhere; font-style: italic; } .browse-card__via-link { diff --git a/web/css/12-autocomplete.css b/web/css/12-autocomplete.css index 4b52f9a..042b9cc 100644 --- a/web/css/12-autocomplete.css +++ b/web/css/12-autocomplete.css @@ -47,6 +47,14 @@ text-overflow: ellipsis; white-space: nowrap; } +/* The login handle-suggestion dropdown reuses this same markup for a real + handle, not a record title: unlike everywhere else `.suggestion__main + strong` shows up, that identity can never be ellipsed. */ +.signin .suggestion__main strong { + overflow: visible; + white-space: normal; + overflow-wrap: anywhere; +} /* --- discogs search / infinite scroll --------------------------------- */ .search-row {