YO
Salesforce Lightning
JS behaviour
Chatter Feed
A share-an-update publisher above posts, likes and threaded comments — social collaboration that screams Salesforce.
Real scenarios
The component as it is used in a product — not a specimen grid.
Collaboration, right on the record
Share an update, toggle the likes, and grow a comment thread — every post lands on the opportunity for the whole deal team to see.
Older posts live in the full feed.
The publisher’s two states
Collapsed on the placeholder; focused, it spreads the attach tools and arms the Share button.
collapsed
focused · draft
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| publisher | composer | 'collapsed' | The publisher rests collapsed on «Share an update…»; focus opens the attach tools and the Share button. |
| like | toggle | 'count' | The like heart carries a counter and untoggles on a second tap. |
| comment | thread | 'nested' | Comments thread beneath the post above a «Write a comment…» input. |
| avatar | initials | '2-letter' | A circular avatar of the user’s two initials; every user owns a colour. |
Snippet
<div class="sflx-feed">
<form class="sflx-publisher">
<span class="sflx-avatar" data-user="me">YO</span>
<input type="text" placeholder="Share an update…">
<button type="submit" class="sflx-btn" data-variant="brand">Share</button>
</form>
<article class="sflx-post">
<header><span class="sflx-avatar" data-user="lena">LH</span><b>Lena Hoffmann</b><time>2 hours ago</time></header>
<p>Sent the revised quote to Acme ✅</p>
<footer>
<button class="sflx-like" aria-pressed="false">♥ Like 3</button>
<button>Comment 2</button>
</footer>
</article>
</div>
<style>
.sflx-publisher { display: flex; gap: .5rem; padding: .75rem 1rem; background: #fff;
border: 1px solid #DDDBDA; border-radius: .25rem; }
.sflx-avatar { display: grid; place-items: center; inline-size: 2rem; aspect-ratio: 1;
border-radius: 50%; background: #0B5CAB; color: #fff; font-size: .7rem; }
.sflx-post { margin-block-start: .75rem; padding: .75rem 1rem; background: #fff;
border: 1px solid #DDDBDA; border-radius: .25rem; }
</style>
// resources/js/pages/Opportunities/Feed.tsx — an Inertia page (React
// flavor). Posts arrive from the backend as props; the feed itself is the
// ChatterFeed component from the React snippet. For pagination use
// router.visit(url, { preserveState: true }) or Inertia's usePrefetch.
import ChatterFeed from '@/components/ChatterFeed';
export default function OpportunityFeed() {
// A real page would read its data: const { posts } = usePage().props;
return <ChatterFeed />;
}
// ChatterFeed.tsx — the Chatter feed: a share-an-update publisher, posts
// with initials avatars, like counters that untoggle, and comment threads
// that grow through the inline composer. Mirrors the playground partial.
import { type CSSProperties, useState } from 'react';
import '@nabuxai/ui-react/css';
type Comment = { who: string; initials: string; tint: string; time: string; body: string };
type Post = Comment & { likes: number; liked: boolean; comments: Comment[] };
const INITIAL: Post[] = [
{
who: 'Elif Demir', initials: 'ED', tint: '#0176D3', time: '2 hours ago',
body: 'Sent the revised quote to Bosporus — waiting on their purchasing team now.',
likes: 3, liked: false,
comments: [
{ who: 'Lena Fischer', initials: 'LF', tint: '#6739B7', time: '1 hour ago', body: 'Attached the final pricing sheet; the legal copy lands tomorrow.' },
],
},
{
who: 'Marco Benzi', initials: 'MB', tint: '#04844B', time: 'yesterday',
body: 'Got the discount approved by the sales director — we are clear up to 5%.',
likes: 7, liked: true, comments: [],
},
];
const PATHS = {
heart: 'M12 20s-7.5-4.6-7.5-10.2A4.3 4.3 0 0 1 12 7.1a4.3 4.3 0 0 1 7.5 2.7C19.5 15.4 12 20 12 20z',
message: 'M4 5h16v11H9l-5 4z',
paperclip: 'M20 11.5l-7.8 7.8a5 5 0 0 1-7.1-7.1l8-8a3.3 3.3 0 0 1 4.7 4.7l-8 8a1.7 1.7 0 0 1-2.4-2.4l7.3-7.3',
image: 'M5.5 4h13A1.5 1.5 0 0 1 20 5.5v13a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 18.5v-13A1.5 1.5 0 0 1 5.5 4zM9 10.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM20 15l-4.5-4.5L6 20',
};
const I = ({ d }: { d: string }) => (
<svg className="nx-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"
strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d={d} /></svg>
);
export default function ChatterFeed() {
const [draft, setDraft] = useState('');
const [posts, setPosts] = useState(INITIAL);
const [openComments, setOpenComments] = useState([true, false]);
const share = () => {
const body = draft.trim();
if (!body) return;
setPosts([{ who: 'You', initials: 'YO', tint: '#FE9339', time: 'just now', body, likes: 0, liked: false, comments: [] }, ...posts]);
setOpenComments([false, ...openComments]);
setDraft('');
};
const like = (i: number) => setPosts(posts.map((p, j) =>
j === i ? { ...p, liked: !p.liked, likes: p.likes + (p.liked ? -1 : 1) } : p));
const addComment = (i: number, input: HTMLInputElement) => {
const body = input.value.trim();
if (!body) return;
setPosts(posts.map((p, j) => j === i
? { ...p, comments: [...p.comments, { who: 'You', initials: 'YO', tint: '#FE9339', time: 'just now', body }] }
: p));
input.value = '';
};
return (
<div className="slf-root">
<div className="slf-feed">
<form className="slf-publisher" onSubmit={(e) => { e.preventDefault(); share(); }}>
<div className="slf-pub-row">
<span className="slf-ava" style={{ '--slf-tint': '#FE9339' } as CSSProperties} aria-hidden="true">YO</span>
<input type="text" value={draft} onChange={(e) => setDraft(e.target.value)}
placeholder="Share an update…" aria-label="Share an update" />
</div>
<div className="slf-tools">
<button type="button" className="slf-tool" aria-label="Attach a file"><I d={PATHS.paperclip} /></button>
<button type="button" className="slf-tool" aria-label="Add an image"><I d={PATHS.image} /></button>
<button type="submit" className="slf-share" disabled={!draft.trim()}>Share</button>
</div>
</form>
{posts.map((p, i) => (
<article key={p.who + i} className="slf-post">
<header className="slf-post-head">
<span className="slf-ava" style={{ '--slf-tint': p.tint } as CSSProperties} aria-hidden="true">{p.initials}</span>
<b>{p.who}</b>
<time>{p.time}</time>
<small>on the opportunity</small>
</header>
<p>{p.body}</p>
<div className="slf-acts">
<button type="button" className="slf-act" aria-pressed={p.liked} onClick={() => like(i)}>
<svg className="nx-icon" viewBox="0 0 24 24" fill={p.liked ? 'currentColor' : 'none'}
stroke="currentColor" strokeLinejoin="round" aria-hidden="true"><path d={PATHS.heart} /></svg>
<span>{p.likes > 0 ? p.likes : ''}</span>
Like
</button>
<button type="button" className="slf-act" aria-expanded={openComments[i]}
onClick={() => setOpenComments(openComments.map((o, j) => (j === i ? !o : o)))}>
<svg className="nx-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"
strokeLinejoin="round" aria-hidden="true"><path d={PATHS.message} /></svg>
<span>{p.comments.length > 0 ? p.comments.length : ''}</span>
Comment
</button>
</div>
{openComments[i] && (
<div className="slf-comments">
{p.comments.map((c, j) => (
<div key={j} className="slf-comment">
<span className="slf-ava" style={{ '--slf-tint': c.tint } as CSSProperties} aria-hidden="true">{c.initials}</span>
<div className="slf-comment-body">
<b>{c.who}</b><time>{c.time}</time>
<p>{c.body}</p>
</div>
</div>
))}
<div className="slf-compose">
<span className="slf-ava" aria-hidden="true">YO</span>
<input type="text" placeholder="Write a comment…" aria-label="Write a comment"
onKeyDown={(e) => e.key === 'Enter' && addComment(i, e.currentTarget)} />
</div>
</div>
)}
</article>
))}
<p className="slf-empty">Older posts live in the full feed.</p>
</div>
<style>{css}</style>
</div>
);
}
const css = `
.slf-root { font-family: 'Salesforce Sans', -apple-system, 'Segoe UI', Roboto, sans-serif; color: #181818;
--slf-blue: #0176D3; --slf-blue-soft: color-mix(in srgb, #0176D3 8%, #FFFFFF);
--slf-muted: #706E6B; --slf-border: #DDDBDA; --slf-card: #FFFFFF; }
@media (prefers-color-scheme: dark) { .slf-root { color: #F3F3F3;
--slf-blue: #0D9DDA; --slf-blue-soft: color-mix(in srgb, #0D9DDA 16%, #232323);
--slf-muted: #A5A5A5; --slf-border: #474747; --slf-card: #232323; } }
.slf-feed { max-inline-size: 40rem; margin-inline: auto; display: grid; gap: .75rem; }
.slf-publisher { border: 1px solid var(--slf-border); border-radius: .25rem; background: var(--slf-card);
padding: .75rem .85rem; display: grid; gap: .6rem; }
.slf-pub-row { display: flex; align-items: center; gap: .6rem; }
.slf-ava { display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; border-radius: 50%;
background: var(--slf-tint, var(--slf-blue)); color: #FFFFFF; font-size: .68rem; font-weight: 700; flex: none; }
.slf-pub-row input { flex: 1; min-inline-size: 0; border: 0; background: transparent; color: inherit;
font: inherit; font-size: .88rem; }
.slf-tools { display: flex; align-items: center; gap: .25rem; }
.slf-tool { display: grid; place-items: center; inline-size: 2rem; aspect-ratio: 1; border: 0;
border-radius: .25rem; background: transparent; cursor: pointer; }
.slf-share { margin-inline-start: auto; padding: .4rem 1.1rem; border: 1px solid var(--slf-blue);
border-radius: .25rem; background: var(--slf-blue); color: #FFFFFF; font: inherit; font-size: .8rem;
font-weight: 700; cursor: pointer; }
.slf-share:disabled { opacity: .45; cursor: not-allowed; }
.slf-post { border: 1px solid var(--slf-border); border-radius: .25rem; background: var(--slf-card);
padding: .75rem .85rem; display: grid; gap: .55rem; }
.slf-post-head { display: flex; align-items: center; gap: .6rem; }
.slf-post-head b { font-size: .85rem; }
.slf-post-head time, .slf-post-head small { font-size: .74rem; color: var(--slf-muted); }
.slf-post-head small { margin-inline-start: auto; }
.slf-post p { margin: 0; font-size: .88rem; line-height: 1.6; }
.slf-acts { display: flex; gap: .4rem; }
.slf-act { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border: 0;
border-radius: .25rem; background: transparent; color: var(--slf-muted); font: inherit; font-size: .78rem;
font-weight: 600; cursor: pointer; }
.slf-act:hover { background: var(--slf-blue-soft); color: var(--slf-blue); }
.slf-act[aria-pressed='true'] { color: var(--slf-blue); }
.slf-act .nx-icon { inline-size: 1em; block-size: 1em; }
.slf-comments { border-block-start: 1px solid var(--slf-border); padding-block-start: .6rem;
display: grid; gap: .55rem; }
.slf-comment { display: flex; gap: .55rem; }
.slf-comment .slf-ava { inline-size: 1.6rem; block-size: 1.6rem; font-size: .6rem; }
.slf-comment-body { min-inline-size: 0; flex: 1; }
.slf-comment-body b { font-size: .8rem; }
.slf-comment-body time { font-size: .7rem; color: var(--slf-muted); margin-inline-start: .4rem; }
.slf-comment-body p { margin: .1rem 0 0; font-size: .82rem; line-height: 1.55; }
.slf-compose { display: flex; gap: .55rem; align-items: center; }
.slf-compose .slf-ava { background: #6739B7; }
.slf-compose input { flex: 1; min-inline-size: 0; padding: .45rem .6rem; border: 1px solid var(--slf-border);
border-radius: .25rem; background: var(--slf-card); color: inherit; font: inherit; font-size: .8rem; }
.slf-empty { text-align: center; color: var(--slf-muted); font-size: .82rem; padding: .4rem 0 0; }
`;
<!-- ChatterFeed.vue — the Chatter feed: a share-an-update publisher, posts
with initials avatars, like counters that untoggle, and comment threads
that grow through the inline composer. Mirrors the playground partial. -->
<script setup lang="ts">
import { ref } from 'vue';
interface Comment { who: string; initials: string; tint: string; time: string; body: string }
interface Post extends Comment { likes: number; liked: boolean; comments: Comment[] }
const posts = ref<Post[]>([
{
who: 'Elif Demir', initials: 'ED', tint: '#0176D3', time: '2 hours ago',
body: 'Sent the revised quote to Bosporus — waiting on their purchasing team now.',
likes: 3, liked: false,
comments: [
{ who: 'Lena Fischer', initials: 'LF', tint: '#6739B7', time: '1 hour ago', body: 'Attached the final pricing sheet; the legal copy lands tomorrow.' },
],
},
{
who: 'Marco Benzi', initials: 'MB', tint: '#04844B', time: 'yesterday',
body: 'Got the discount approved by the sales director — we are clear up to 5%.',
likes: 7, liked: true, comments: [],
},
]);
const draft = ref('');
const openComments = ref([true, false]);
const share = () => {
const body = draft.value.trim();
if (!body) return;
posts.value = [{ who: 'You', initials: 'YO', tint: '#FE9339', time: 'just now', body, likes: 0, liked: false, comments: [] }, ...posts.value];
openComments.value = [false, ...openComments.value];
draft.value = '';
};
const like = (i: number) => {
const p = posts.value[i];
posts.value[i] = { ...p, liked: !p.liked, likes: p.likes + (p.liked ? -1 : 1) };
};
const addComment = (i: number, input: HTMLInputElement) => {
const body = input.value.trim();
if (!body) return;
posts.value[i].comments.push({ who: 'You', initials: 'YO', tint: '#FE9339', time: 'just now', body });
input.value = '';
};
</script>
<template>
<div class="slf-root">
<div class="slf-feed">
<form class="slf-publisher" @submit.prevent="share">
<div class="slf-pub-row">
<span class="slf-ava" style="--slf-tint: #FE9339" aria-hidden="true">YO</span>
<input v-model="draft" type="text" placeholder="Share an update…" aria-label="Share an update" />
</div>
<div class="slf-tools">
<button type="submit" class="slf-share" :disabled="!draft.trim()">Share</button>
</div>
</form>
<article v-for="(p, i) in posts" :key="p.who + i" class="slf-post">
<header class="slf-post-head">
<span class="slf-ava" :style="{ '--slf-tint': p.tint }" aria-hidden="true">{{ p.initials }}</span>
<b>{{ p.who }}</b>
<time>{{ p.time }}</time>
<small>on the opportunity</small>
</header>
<p>{{ p.body }}</p>
<div class="slf-acts">
<button type="button" class="slf-act" :aria-pressed="p.liked" @click="like(i)">♥ {{ p.likes > 0 ? p.likes : '' }} Like</button>
<button type="button" class="slf-act" :aria-expanded="openComments[i]"
@click="openComments[i] = !openComments[i]">
✉ {{ p.comments.length > 0 ? p.comments.length : '' }} Comment
</button>
</div>
<div v-if="openComments[i]" class="slf-comments">
<div v-for="(c, j) in p.comments" :key="j" class="slf-comment">
<span class="slf-ava" :style="{ '--slf-tint': c.tint }" aria-hidden="true">{{ c.initials }}</span>
<div class="slf-comment-body">
<b>{{ c.who }}</b><time>{{ c.time }}</time>
<p>{{ c.body }}</p>
</div>
</div>
<div class="slf-compose">
<span class="slf-ava" aria-hidden="true">YO</span>
<input type="text" placeholder="Write a comment…" aria-label="Write a comment"
@keydown.enter="addComment(i, $event.target as HTMLInputElement)" />
</div>
</div>
</article>
<p class="slf-empty">Older posts live in the full feed.</p>
</div>
</div>
</template>
<style scoped>
.slf-root { font-family: 'Salesforce Sans', -apple-system, 'Segoe UI', Roboto, sans-serif; color: #181818;
--slf-blue: #0176D3; --slf-blue-soft: color-mix(in srgb, #0176D3 8%, #FFFFFF);
--slf-muted: #706E6B; --slf-border: #DDDBDA; --slf-card: #FFFFFF; }
@media (prefers-color-scheme: dark) { .slf-root { color: #F3F3F3;
--slf-blue: #0D9DDA; --slf-blue-soft: color-mix(in srgb, #0D9DDA 16%, #232323);
--slf-muted: #A5A5A5; --slf-border: #474747; --slf-card: #232323; } }
.slf-feed { max-inline-size: 40rem; margin-inline: auto; display: grid; gap: .75rem; }
.slf-publisher { border: 1px solid var(--slf-border); border-radius: .25rem; background: var(--slf-card);
padding: .75rem .85rem; display: grid; gap: .6rem; }
.slf-pub-row { display: flex; align-items: center; gap: .6rem; }
.slf-ava { display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; border-radius: 50%;
background: var(--slf-tint, var(--slf-blue)); color: #FFFFFF; font-size: .68rem; font-weight: 700; flex: none; }
.slf-pub-row input { flex: 1; min-inline-size: 0; border: 0; background: transparent; color: inherit;
font: inherit; font-size: .88rem; }
.slf-tools { display: flex; align-items: center; }
.slf-share { margin-inline-start: auto; padding: .4rem 1.1rem; border: 1px solid var(--slf-blue);
border-radius: .25rem; background: var(--slf-blue); color: #FFFFFF; font: inherit; font-size: .8rem;
font-weight: 700; cursor: pointer; }
.slf-share:disabled { opacity: .45; cursor: not-allowed; }
.slf-post { border: 1px solid var(--slf-border); border-radius: .25rem; background: var(--slf-card);
padding: .75rem .85rem; display: grid; gap: .55rem; }
.slf-post-head { display: flex; align-items: center; gap: .6rem; }
.slf-post-head b { font-size: .85rem; }
.slf-post-head time, .slf-post-head small { font-size: .74rem; color: var(--slf-muted); }
.slf-post-head small { margin-inline-start: auto; }
.slf-post p { margin: 0; font-size: .88rem; line-height: 1.6; }
.slf-acts { display: flex; gap: .4rem; }
.slf-act { padding: .3rem .7rem; border: 0; border-radius: .25rem; background: transparent;
color: var(--slf-muted); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.slf-act:hover { background: var(--slf-blue-soft); color: var(--slf-blue); }
.slf-act[aria-pressed='true'] { color: var(--slf-blue); }
.slf-comments { border-block-start: 1px solid var(--slf-border); padding-block-start: .6rem;
display: grid; gap: .55rem; }
.slf-comment { display: flex; gap: .55rem; }
.slf-comment .slf-ava { inline-size: 1.6rem; block-size: 1.6rem; font-size: .6rem; }
.slf-comment-body { min-inline-size: 0; flex: 1; }
.slf-comment-body b { font-size: .8rem; }
.slf-comment-body time { font-size: .7rem; color: var(--slf-muted); margin-inline-start: .4rem; }
.slf-comment-body p { margin: .1rem 0 0; font-size: .82rem; line-height: 1.55; }
.slf-compose { display: flex; gap: .55rem; align-items: center; }
.slf-compose .slf-ava { background: #6739B7; }
.slf-compose input { flex: 1; min-inline-size: 0; padding: .45rem .6rem; border: 1px solid var(--slf-border);
border-radius: .25rem; background: var(--slf-card); color: inherit; font: inherit; font-size: .8rem; }
.slf-empty { text-align: center; color: var(--slf-muted); font-size: .82rem; padding: .4rem 0 0; }
</style>
<!-- ChatterFeed.svelte — the Chatter feed: a share-an-update publisher,
posts with initials avatars, like counters that untoggle, and comment
threads that grow through the inline composer. Mirrors the partial. -->
<script lang="ts">
interface Comment { who: string; initials: string; tint: string; time: string; body: string }
interface Post extends Comment { likes: number; liked: boolean; comments: Comment[] }
let posts = $state<Post[]>([
{
who: 'Elif Demir', initials: 'ED', tint: '#0176D3', time: '2 hours ago',
body: 'Sent the revised quote to Bosporus — waiting on their purchasing team now.',
likes: 3, liked: false,
comments: [
{ who: 'Lena Fischer', initials: 'LF', tint: '#6739B7', time: '1 hour ago', body: 'Attached the final pricing sheet; the legal copy lands tomorrow.' },
],
},
{
who: 'Marco Benzi', initials: 'MB', tint: '#04844B', time: 'yesterday',
body: 'Got the discount approved by the sales director — we are clear up to 5%.',
likes: 7, liked: true, comments: [],
},
]);
let draft = $state('');
let openComments = $state([true, false]);
const share = () => {
const body = draft.trim();
if (!body) return;
posts = [{ who: 'You', initials: 'YO', tint: '#FE9339', time: 'just now', body, likes: 0, liked: false, comments: [] }, ...posts];
openComments = [false, ...openComments];
draft = '';
};
const like = (i: number) => {
const p = posts[i];
posts[i] = { ...p, liked: !p.liked, likes: p.likes + (p.liked ? -1 : 1) };
};
const addComment = (i: number, input: HTMLInputElement) => {
const body = input.value.trim();
if (!body) return;
posts[i].comments.push({ who: 'You', initials: 'YO', tint: '#FE9339', time: 'just now', body });
input.value = '';
};
</script>
<div class="slf-root">
<div class="slf-feed">
<form class="slf-publisher" onsubmit={(e) => { e.preventDefault(); share(); }}>
<div class="slf-pub-row">
<span class="slf-ava" style:--slf-tint="#FE9339" aria-hidden="true">YO</span>
<input bind:value={draft} type="text" placeholder="Share an update…" aria-label="Share an update" />
</div>
<div class="slf-tools">
<button type="submit" class="slf-share" disabled={!draft.trim()}>Share</button>
</div>
</form>
{#each posts as p, i (p.who + i)}
<article class="slf-post">
<header class="slf-post-head">
<span class="slf-ava" style:--slf-tint={p.tint} aria-hidden="true">{p.initials}</span>
<b>{p.who}</b>
<time>{p.time}</time>
<small>on the opportunity</small>
</header>
<p>{p.body}</p>
<div class="slf-acts">
<button type="button" class="slf-act" aria-pressed={p.liked} onclick={() => like(i)}>
♥ {p.likes > 0 ? p.likes : ''} Like
</button>
<button type="button" class="slf-act" aria-expanded={openComments[i]}
onclick={() => (openComments[i] = !openComments[i])}>
✉ {p.comments.length > 0 ? p.comments.length : ''} Comment
</button>
</div>
{#if openComments[i]}
<div class="slf-comments">
{#each p.comments as c, j (j)}
<div class="slf-comment">
<span class="slf-ava" style:--slf-tint={c.tint} aria-hidden="true">{c.initials}</span>
<div class="slf-comment-body">
<b>{c.who}</b><time>{c.time}</time>
<p>{c.body}</p>
</div>
</div>
{/each}
<div class="slf-compose">
<span class="slf-ava" aria-hidden="true">YO</span>
<input type="text" placeholder="Write a comment…" aria-label="Write a comment"
onkeydown={(e) => e.key === 'Enter' && addComment(i, e.currentTarget)} />
</div>
</div>
{/if}
</article>
{/each}
<p class="slf-empty">Older posts live in the full feed.</p>
</div>
</div>
<style>
.slf-root { font-family: 'Salesforce Sans', -apple-system, 'Segoe UI', Roboto, sans-serif; color: #181818;
--slf-blue: #0176D3; --slf-blue-soft: color-mix(in srgb, #0176D3 8%, #FFFFFF);
--slf-muted: #706E6B; --slf-border: #DDDBDA; --slf-card: #FFFFFF; }
@media (prefers-color-scheme: dark) { .slf-root { color: #F3F3F3;
--slf-blue: #0D9DDA; --slf-blue-soft: color-mix(in srgb, #0D9DDA 16%, #232323);
--slf-muted: #A5A5A5; --slf-border: #474747; --slf-card: #232323; } }
.slf-feed { max-inline-size: 40rem; margin-inline: auto; display: grid; gap: .75rem; }
.slf-publisher { border: 1px solid var(--slf-border); border-radius: .25rem; background: var(--slf-card);
padding: .75rem .85rem; display: grid; gap: .6rem; }
.slf-pub-row { display: flex; align-items: center; gap: .6rem; }
.slf-ava { display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; border-radius: 50%;
background: var(--slf-tint, var(--slf-blue)); color: #FFFFFF; font-size: .68rem; font-weight: 700; flex: none; }
.slf-pub-row input { flex: 1; min-inline-size: 0; border: 0; background: transparent; color: inherit;
font: inherit; font-size: .88rem; }
.slf-tools { display: flex; align-items: center; }
.slf-share { margin-inline-start: auto; padding: .4rem 1.1rem; border: 1px solid var(--slf-blue);
border-radius: .25rem; background: var(--slf-blue); color: #FFFFFF; font: inherit; font-size: .8rem;
font-weight: 700; cursor: pointer; }
.slf-share:disabled { opacity: .45; cursor: not-allowed; }
.slf-post { border: 1px solid var(--slf-border); border-radius: .25rem; background: var(--slf-card);
padding: .75rem .85rem; display: grid; gap: .55rem; }
.slf-post-head { display: flex; align-items: center; gap: .6rem; }
.slf-post-head b { font-size: .85rem; }
.slf-post-head time, .slf-post-head small { font-size: .74rem; color: var(--slf-muted); }
.slf-post-head small { margin-inline-start: auto; }
.slf-post p { margin: 0; font-size: .88rem; line-height: 1.6; }
.slf-acts { display: flex; gap: .4rem; }
.slf-act { padding: .3rem .7rem; border: 0; border-radius: .25rem; background: transparent;
color: var(--slf-muted); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.slf-act:hover { background: var(--slf-blue-soft); color: var(--slf-blue); }
.slf-act[aria-pressed='true'] { color: var(--slf-blue); }
.slf-comments { border-block-start: 1px solid var(--slf-border); padding-block-start: .6rem;
display: grid; gap: .55rem; }
.slf-comment { display: flex; gap: .55rem; }
.slf-comment .slf-ava { inline-size: 1.6rem; block-size: 1.6rem; font-size: .6rem; }
.slf-comment-body { min-inline-size: 0; flex: 1; }
.slf-comment-body b { font-size: .8rem; }
.slf-comment-body time { font-size: .7rem; color: var(--slf-muted); margin-inline-start: .4rem; }
.slf-comment-body p { margin: .1rem 0 0; font-size: .82rem; line-height: 1.55; }
.slf-compose { display: flex; gap: .55rem; align-items: center; }
.slf-compose .slf-ava { background: #6739B7; }
.slf-compose input { flex: 1; min-inline-size: 0; padding: .45rem .6rem; border: 1px solid var(--slf-border);
border-radius: .25rem; background: var(--slf-card); color: inherit; font: inherit; font-size: .8rem; }
.slf-empty { text-align: center; color: var(--slf-muted); font-size: .82rem; padding: .4rem 0 0; }
</style>