fix: bio formatting for remote profiles (hashtags/mentions inline)

Override upstream .mention { display: grid } that broke Mastodon's
hashtag/mention HTML in profile bios. Fixes both admin reader
(.ap-profile__bio) and public profile (.ap-pub__bio) views.
This commit is contained in:
Ricardo
2026-02-23 13:45:44 +01:00
parent e5c0fa1191
commit 376a1bb938
3 changed files with 46 additions and 1 deletions

View File

@@ -993,6 +993,40 @@
color: var(--color-primary); color: var(--color-primary);
} }
/* Override upstream .mention { display: grid } for bio content */
.ap-profile__bio .h-card {
display: inline;
}
.ap-profile__bio .h-card a,
.ap-profile__bio a.u-url.mention {
display: inline;
white-space: nowrap;
}
.ap-profile__bio .h-card a span,
.ap-profile__bio a.u-url.mention span {
display: inline;
}
.ap-profile__bio a.mention.hashtag {
display: inline;
white-space: nowrap;
}
.ap-profile__bio a.mention.hashtag span {
display: inline;
}
/* Mastodon invisible/ellipsis spans for long URLs in bios */
.ap-profile__bio .invisible {
display: none;
}
.ap-profile__bio .ellipsis::after {
content: "…";
}
.ap-profile__actions { .ap-profile__actions {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

View File

@@ -1,6 +1,6 @@
{ {
"name": "@rmdes/indiekit-endpoint-activitypub", "name": "@rmdes/indiekit-endpoint-activitypub",
"version": "2.0.9", "version": "2.0.10",
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.", "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
"keywords": [ "keywords": [
"indiekit", "indiekit",

View File

@@ -177,6 +177,17 @@
.ap-pub__bio p { margin: 0 0 var(--space-s); } .ap-pub__bio p { margin: 0 0 var(--space-s); }
.ap-pub__bio p:last-child { margin-bottom: 0; } .ap-pub__bio p:last-child { margin-bottom: 0; }
/* Mastodon mention/hashtag formatting */
.ap-pub__bio .h-card { display: inline; }
.ap-pub__bio .h-card a,
.ap-pub__bio a.u-url.mention { display: inline; white-space: nowrap; }
.ap-pub__bio .h-card a span,
.ap-pub__bio a.u-url.mention span { display: inline; }
.ap-pub__bio a.mention.hashtag { display: inline; white-space: nowrap; }
.ap-pub__bio a.mention.hashtag span { display: inline; }
.ap-pub__bio .invisible { display: none; }
.ap-pub__bio .ellipsis::after { content: "…"; }
/* ================================================================ /* ================================================================
Profile fields Profile fields
================================================================ */ ================================================================ */