Halloween Sale 15% off Ends in See the plans
SCSS

Testimonial Card Styles (SCSS)

Styles the [testimonials] grid as soft cards with a large quote mark, gold stars and a clear attribution line that adapt to light and dark themes.

Don’t have WPIDE yet? Install it on your site

Code

$accent: #f5a524;
$radius: 12px;

.testimonials-grid {
    .testimonial {
        position: relative;
        margin: 0;
        padding: 1.75rem 1.5rem 1.25rem;
        border-radius: $radius;
        background: color-mix(in srgb, currentColor 5%, transparent);

        &::before {
            content: "\201C";
            position: absolute;
            top: 0.25rem;
            right: 1rem;
            font-size: 4rem;
            line-height: 1;
            opacity: 0.15;
        }
    }

    blockquote {
        margin: 0 0 1rem;
        padding: 0;
        border: 0;
        font-style: italic;

        p:last-child {
            margin-bottom: 0;
        }
    }

    .testimonial-rating {
        display: block;
        margin-bottom: 0.5rem;
        color: $accent;
        letter-spacing: 0.1em;
    }

    figcaption {
        font-size: 0.9em;

        span {
            opacity: 0.75;
        }
    }
}

Notes

Change $accent and $radius at the top. Pairs with the Testimonials Grid Shortcode snippet.

How to add this snippet

  1. Install WPIDE on your WordPress site (it is free) and open Code Snippets.
  2. Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
  3. It is added inactive: review the code and settings, then switch it on.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.

Which site should get this snippet?

Enter the address of your WordPress site. WPIDE opens there in a new tab with the snippet ready to review and save.

Remembered in this browser only, so you are asked once.

Report this snippet

Tell the WPIDE team what is wrong: broken code, something harmful, spam or copied work.