Halloween Sale 15% off Ends in See the plans
SCSS

Elegant Blockquote Styles (SCSS)

Gives quotes in your posts a refined look with a large quotation mark, an accent border and a styled citation line.

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

Code

$accent: #2271b1;
$quote-size: 1.15em;

.entry-content,
.wp-block-post-content {
    blockquote,
    .wp-block-quote {
        position: relative;
        margin: 2em 0;
        padding: 0.5em 1.5em 0.5em 2.25em;
        border-left: 4px solid $accent;
        font-size: $quote-size;
        font-style: italic;

        &::before {
            content: "\201C";
            position: absolute;
            top: -0.15em;
            left: 0.25em;
            font-size: 3em;
            line-height: 1;
            color: rgba($accent, 0.35);
        }

        p:last-of-type {
            margin-bottom: 0;
        }

        cite {
            display: block;
            margin-top: 0.75em;
            font-size: 0.8em;
            font-style: normal;
            opacity: 0.75;

            &::before {
                content: "\2014\00a0";
            }
        }
    }
}

Notes

Change the $accent variable to your brand color.

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.