Robert Birming

Testimonials styles

Display testimonials in a clean card grid, using only blockquotes and <cite> for markup.1

Preview

Below are some examples to give you a feel for how it looks. For a larger context, check out the Bearming testimonials page.

I'm writing to thank you for your blog and theme. Bearming is great. I'm using it and have changed a few things, but your project is perfect: stylish and minimal. Sebastian

Your theme is already excellent, and it's great to see that you have even more features coming. Pete

Your blog refresh looks fantastic. I love what you did with the layout. Cole

Just wanted to say hello and tell you how much I love your new blog design. It's beautiful. Darren Hester

How to use

Wrap each quote in a blockquote and end it with a <cite> tag, then place them inside a container using the testimonials class.2

Markup

<div class="testimonials">

> Quote text here. <cite>Name</cite>

> Quote with a link. <cite><a href="https://example.com">Name</a></cite>

</div>

Styles

/* Testimonials | robertbirming.com */
.testimonials {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-block: var(--space-block);
}

.testimonials blockquote {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  padding-block-start: 1.5rem;
  padding-block-end: 1.2rem;
  padding-inline: 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.75);
  font-style: normal;
  overflow: hidden;
}

.testimonials blockquote p {
  margin: 0;
  margin-block-start: 0.6rem;
  color: var(--text);
  font-size: calc(var(--font-size) * 0.92);
  line-height: 1.6;
}

.testimonials blockquote::before {
  content: "\201C";
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-end: 0.8rem;
  font-family: Georgia, serif;
  font-size: 3.2rem;
  line-height: 1;
  color: color-mix(in srgb, var(--text) 12%, transparent);
  pointer-events: none;
}

.testimonials cite {
  display: block;
  margin-block-start: 1.1rem;
  padding-block-start: 0.9rem;
  border-block-start: 1px dashed color-mix(in srgb, var(--border) 80%, transparent);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.testimonials cite a {
  color: inherit;
  text-decoration: none;
}

Want more? Check out all available Bearming add-ons.

Happy blogging, and may your testimonials always be five stars.

  1. Built for the Bearming theme. Using a different theme? Add the Bearming tokens to make them work with your setup.

  2. Bear Blog renders blockquotes with a <p> tag inside, so the <cite> goes at the end of the quote text, separated by a space. Keep everything on one line so <cite> renders as a separate element, allowing the flex layout to anchor it to the bottom of the card. Links inside <cite> are optional.