add styling for cohost/fedi posts in descriptions

This commit is contained in:
rhiannon morris 2024-07-07 22:12:21 +02:00
parent 58b88ed23c
commit 00a238e00f

View file

@ -226,3 +226,53 @@ footer {
margin-right: 0.75em;
white-space: nowrap;
}
.chost, .toot {
--avatar-size: 4em;
display: grid;
grid-template: 'avatar user' 1lh
'avatar post' auto / var(--avatar-size) 1fr;
grid-gap: 5px 15px;
margin: 0;
}
:is(.chost, .toot) .user {
grid-area: user;
font-weight: 800;
}
:is(.chost, .toot) :is(.user a, a.user) {
font-weight: 800;
text-decoration: none;
}
:is(.chost, .toot) .username {
margin-left: 1em;
font-size: 90%;
font-weight: 500;
}
:is(.chost, .toot) .post { grid-area: post; }
:is(.chost, .toot) .avatar { grid-area: avatar; }
:is(.chost, .toot) :is(.avatar img, img.avatar) {
height: var(--avatar-size); width: var(--avatar-size);
border-radius: 1000em;
}
.chost .squircle {
mask-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAwIDBDMjAgMCAwIDIwIDAgMTAwczIwIDEwMCAxMDAgMTAwIDEwMC0yMCAxMDAtMTAwUzE4MCAwIDEwMCAweiIvPjwvc3ZnPg==);
mask-size: contain;
mask-repeat: no-repeat;
mask-position: center;
border-radius: 0;
}
:is(.chost, .toot) h1 {
margin: 0 0 0.5em;
font-size: 150%;
font-weight: 700;
}
:is(.chost, .toot) + :is(.chost, .toot) { margin-top: 1.5em; }