Quote

figure.quote

Quote — a quotation with its attribution.

Examples

With an attribution

View “With an attribution” as

The trouble with fiction is that it makes too much sense.

Aldous Huxley, Brave New World Revisited
<figure class="quote">
  <blockquote class="quote-text" cite="https://example.com/essay">
    <p>The trouble with fiction is that it makes too much sense.</p>
  </blockquote>
  <figcaption class="quote-attribution">
    <span class="quote-author">Aldous Huxley</span>,
    <cite class="quote-source">Brave New World Revisited</cite>
  </figcaption>
</figure>

A <blockquote> may not contain its own attribution — per the HTML spec it belongs outside, which is why this is a <figure> with a <figcaption>.

The wrong version, a <footer> inside the quote, is everywhere including in framework documentation, and it changes what the page claims was said.

With nobody to credit

View “With nobody to credit” as

Everything should be made as simple as possible, but no simpler.

<blockquote class="quote quote-text">
  <p>Everything should be made as simple as possible, but no simpler.</p>
</blockquote>

No <figure>, because a figure with no caption adds nothing. Both classes go on the blockquote: .quote declares the tokens and .quote-text consumes them.

Tokens 15

Level 2, declared on .quote itself. Set any of them on that selector to restyle this component without touching the skin.

Level 2 tokens declared by quote
TokenDefault
--quote-paragraph-gapvar(--space-3)
--quote-colorvar(--color-on-surface-muted)
--quote-font-familyvar(--font-tertiary)
--quote-padding-inlinevar(--space-4)
--quote-rule-colorvar(--color-border-strong)
--quote-rule-widthvar(--border-width-strong)
--quote-attribution-colorvar(--color-on-surface-muted)
--quote-attribution-font-sizevar(--font-size-sm)
--quote-attribution-gapvar(--space-4)
--quote-author-colorvar(--color-on-surface)
--quote-mark""
--quote-mark-colorvar(--color-border)
--quote-mark-size5rem
--quote-font-sizevar(--font-size-base)
--quote-line-heightvar(--line-height-snug)

Variants and states

Variants

  • .quote-text
  • .quote-lg
  • .quote-pull
  • .quote-sm

Inside it

  • .quote-attribution
  • .quote-author
  • .quote-source

State it reads

Read from the platform, never mirrored into a class that could disagree with it.

  • data-legacy

Before you ship it

What you have to do 3 requirements

  1. Never put the attribution inside the <blockquote>. See above.
  2. <cite> names the work, not the person.
  3. A pull quote repeating body copy needs aria-hidden="true" on the figure.

src/css/components/quote.css · npx mostlycss add quote