Thread de comentários

Thread de comentários: um card em CSS. Copie as regras, ou o prompt que o reconstrói.

commentthreadnestedavatarlight

Devon Price

Does the flip card work with keyboard focus?

Reply
Rin Sato

Yes, if you use the checkbox version and keep the input focusable.

Reply
CSS
.card-078 {
  width: 380px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  font-family: system-ui,sans-serif;
  color: #111827
}
.card-078 article {
  display: flex;
  gap: 12px
}
.card-078 article i {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg,#c7d2fe,#6366f1)
}
.card-078__reply {
  margin: 14px 0 0 46px;
  padding-left: 14px;
  border-left: 2px solid #e5e7eb
}
.card-078__reply i {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg,#fde68a,#f59e0b)
}
.card-078 header {
  display: flex;
  gap: 8px;
  align-items: baseline
}
.card-078 b {
  font-size: 13px
}
.card-078 time {
  font-size: 11px;
  color: #9ca3af
}
.card-078 p {
  margin: 3px 0 6px;
  font-size: 14px;
  line-height: 1.45
}
.card-078 a {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none
}
.card-078 a:hover {
  color: #4f46e5
}
.card-078 :is(a,button,input,select,textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
HTML
<div class="card-078">
  <article><i></i><div><header><b>Devon Price</b><time>3d</time></header><p>Does the flip card work with keyboard focus?</p><a href="#">Reply</a></div></article>
  <article class="card-078__reply"><i></i><div><header><b>Rin Sato</b><time>2d</time></header><p>Yes, if you use the checkbox version and keep the input focusable.</p><a href="#">Reply</a></div></article>
</div>
Prompt

Crie um card de thread de comentários de 380px: branco, borda de 1px #e5e7eb, raio de 14px. Cada comentário é uma linha flex com um avatar circular (34px, gradiente #c7d2fe para #6366f1), um cabeçalho com nome 13px bold e horário 11px #9ca3af, texto 14px, e um link 12px "Reply" que fica índigo no hover. A resposta é recuada 46px, tem uma borda esquerda de 2px #e5e7eb com padding de 14px, e um avatar menor de 28px em gradiente âmbar.