탐색

v2.1.0
타이포그래피

인용문

다른 사람의 말을 작성자 자신의 말과 구분해 표시합니다.

이 페이지의 내용

인용문은 다른 사람의 말을 작성자 자신의 말과 구분해 보여 줍니다. 본문에 배치한 인용문에는 제목과 같은 글자색을 적용하고, 인용문 앞쪽 가장자리에는 은은한 세로선을 둡니다. 테두리 대신 세로선을 직접 그려 양 끝을 둥글게 처리합니다.

인용문

<figure class="quote max-w(420) mx-auto">  <blockquote class="quote-body">    <p class="quote-text">Good tools make the next step clear and leave room for the work.</p>  </blockquote>  <figcaption class="quote-source">    <span class="avatar avatar-sm"><img class="avatar-image" src="/demo/portrait-1.svg" alt></span>    <span><span class="quote-name">Alex Morgan</span>Design lead, Atlas</span>  </figcaption></figure>
<figure className="quote max-w(420) mx-auto">  <blockquote className="quote-body">    <p className="quote-text">Good tools make the next step clear and leave room for the work.</p>  </blockquote>  <figcaption className="quote-source">    <span className="avatar avatar-sm">      <img className="avatar-image" src="/demo/portrait-1.svg" alt="" />    </span>    <span><span className="quote-name">Alex Morgan</span>Design lead, Atlas</span>  </figcaption></figure>
<figure class="quote max-w(420) mx-auto">  <blockquote class="quote-body">    <p class="quote-text">Good tools make the next step clear and leave room for the work.</p>  </blockquote>  <figcaption class="quote-source">    <span class="avatar avatar-sm"><img class="avatar-image" src="/demo/portrait-1.svg" alt></span>    <span><span class="quote-name">Alex Morgan</span>Design lead, Atlas</span>  </figcaption></figure>
<template>  <figure class="quote max-w(420) mx-auto">    <blockquote class="quote-body">      <p class="quote-text">Good tools make the next step clear and leave room for the work.</p>    </blockquote>    <figcaption class="quote-source">      <span class="avatar avatar-sm">        <img class="avatar-image" src="/demo/portrait-1.svg" alt>      </span>      <span><span class="quote-name">Alex Morgan</span>Design lead, Atlas</span>    </figcaption>  </figure></template>

인용문의 각 문단을 quote-text로 감싸세요. 출처는 인용문의 일부가 아니므로 출처가 있는 인용은 <figure>로 만드세요. 인용문은 quote-body가 적용된 <blockquote>에 넣고, 출처는 그 뒤에 quote-source가 적용된 <figcaption>에 표시하세요. 아바타가 있으면 함께 표시하고, quote-name에는 전경색을 적용하며, 역할이나 장소는 눈에 덜 띄는 한 줄에 표시하세요. 작품 제목은 <cite>로 감싸세요. 출처가 없는 인용은 <blockquote> 자체에 적용합니다.

#강조 인용문

quote-lg는 인용문 자체에 시선이 가도록 강조하는 형식입니다. 세로선 대신 여는 따옴표가 표시되고, 각 줄의 길이가 고르게 조정됩니다. 페이지당 하나만 사용하고 한두 문장으로 제한하세요.

강조 인용문

<figure class="quote quote-lg max-w(480) mx-auto">  <blockquote class="quote-body">    <p class="quote-text">      We replaced four libraries with a stylesheet, and the interface got quieter.    </p>  </blockquote>  <figcaption class="quote-source">    <span class="avatar"><img class="avatar-image" src="/demo/portrait-3.svg" alt></span>    <span><span class="quote-name">Sam Lee</span>Engineering, <cite>Orbit Review</cite></span>  </figcaption></figure>
<figure className="quote quote-lg max-w(480) mx-auto">  <blockquote className="quote-body">    <p className="quote-text">      We replaced four libraries with a stylesheet, and the interface got quieter.    </p>  </blockquote>  <figcaption className="quote-source">    <span className="avatar">      <img className="avatar-image" src="/demo/portrait-3.svg" alt="" />    </span>    <span><span className="quote-name">Sam Lee</span>Engineering, <cite>Orbit Review</cite></span>  </figcaption></figure>
<figure class="quote quote-lg max-w(480) mx-auto">  <blockquote class="quote-body">    <p class="quote-text">      We replaced four libraries with a stylesheet, and the interface got quieter.    </p>  </blockquote>  <figcaption class="quote-source">    <span class="avatar"><img class="avatar-image" src="/demo/portrait-3.svg" alt></span>    <span><span class="quote-name">Sam Lee</span>Engineering, <cite>Orbit Review</cite></span>  </figcaption></figure>
<template>  <figure class="quote quote-lg max-w(480) mx-auto">    <blockquote class="quote-body">      <p class="quote-text">        We replaced four libraries with a stylesheet, and the interface got quieter.      </p>    </blockquote>    <figcaption class="quote-source">      <span class="avatar"><img class="avatar-image" src="/demo/portrait-3.svg" alt></span>      <span><span class="quote-name">Sam Lee</span>Engineering, <cite>Orbit Review</cite></span>    </figcaption>  </figure></template>

#여러 문단의 인용문

여러 문단의 인용문

<blockquote class="quote max-w(420) mx-auto">  <p class="quote-text">    The first version shipped with eleven components. We thought that was a start.  </p>  <p class="quote-text">It turned out to be most of what an interface needs, most of the time.</p></blockquote>
<blockquote className="quote max-w(420) mx-auto">  <p className="quote-text">    The first version shipped with eleven components. We thought that was a start.  </p>  <p className="quote-text">    It turned out to be most of what an interface needs, most of the time.  </p></blockquote>
<blockquote class="quote max-w(420) mx-auto">  <p class="quote-text">    The first version shipped with eleven components. We thought that was a start.  </p>  <p class="quote-text">It turned out to be most of what an interface needs, most of the time.</p></blockquote>
<template>  <blockquote class="quote max-w(420) mx-auto">    <p class="quote-text">      The first version shipped with eleven components. We thought that was a start.    </p>    <p class="quote-text">It turned out to be most of what an interface needs, most of the time.</p>  </blockquote></template>

#접근성

  • 본문과 분리된 인용문에는 <blockquote>를, 문장 안에 들어가는 인용문에는 <q>를 사용하세요. cite 속성에는 출처 URL을 지정할 수 있습니다.
  • 강조 인용문의 여는 따옴표는 스타일시트가 그리는 장식이며, 스크린 리더가 읽지 않습니다. 강조 인용문의 텍스트에 따옴표를 따로 입력하지 마세요.
  • 인용 출처의 아바타는 옆에 표시된 이름과 같은 정보를 전달하므로 alt를 빈 값으로 두세요.

#클래스

클래스설명
quote인용문은 시작 가장자리에 2px 선을 두어 표시합니다.
quote-lg본문에서 뽑아 강조하는 인용문입니다. 세로선 대신 여는 따옴표를 위에 놓고, 큰 글자의 줄 길이가 고르게 보이도록 배치합니다.적용할 클래스는 quote입니다
quote-body출처가 있는 인용의 blockquote입니다. 이때 인용 전체는 figure가 되고, 출처는 이 파트 뒤의 figcaption에 인용문 바깥에 둡니다.
quote-text인용문의 한 문단입니다.
quote-source누가 한 말인지와 출처를 표시합니다. 이름 옆에 아바타를 넣을 수 있으며, 출처는 강조를 낮춰 한 줄로 표시합니다.
quote-name이름은 별도의 한 줄에 강조 글자색으로 표시합니다

#소스

@master/ui/components/quote.css
/* * Quote: someone else's words, set apart from yours. * A quotation in running text hangs from a soft rail at its start. A large one is a pull quote: the words * carry it, balanced over their lines, under an opening mark. The source follows, quiet, with a name in ink. * A source is not part of the quotation, so a quote with one is a <figure>: the words in a <blockquote> with * quote-body, the source after it in a <figcaption>. A quote with no source is the <blockquote> itself. */@layer components.ui {  .quote {    position: relative;    display: grid;    gap: .75rem;    min-width: 0;    margin: 0;    padding-block: .125rem;    padding-inline: 1.125rem 0;    color: var(--color-text-strong);    font-size: .9375rem;    line-height: 1.6;    /* The rail: two pixels of line with round ends. It is drawn, not a border, so it never ends in a corner. */    &::before {      content: '';      position: absolute;      inset-block: 0;      inset-inline-start: 0;      width: 2px;      border-radius: 999px;      background: var(--color-line-strong);    }    /* Large: a pull quote. The rail gives way to an opening mark, and the words are balanced. */    &.quote-lg {      gap: 1.25rem;      padding: 0;      font-size: 1.375rem;      line-height: 1.4;      letter-spacing: -.015em;      &::before {        position: static;        width: 1.75rem;        height: 1.25rem;        border-radius: 0;        background: var(--color-line-mark);        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 20'%3E%3Cpath d='M0 20v-7.2C0 5.9 3.5 1.4 10.4 0l1.3 2.8C8.2 4 6.4 6.3 6.2 9.6H12V20zm16 0v-7.2C16 5.9 19.5 1.4 26.4 0l1.3 2.8C24.2 4 22.4 6.3 22.2 9.6H28V20z'/%3E%3C/svg%3E") center / contain no-repeat;      }      &:dir(rtl)::before {        scale: -1 1;      }      /* Han, kana and Hangul are not drawn tighter: tracking set for Latin capitals would crowd them. */      &:is(:lang(zh), :lang(ja), :lang(ko)) {        letter-spacing: 0;      }      .quote-text {        text-wrap: balance;      }    }    @media (forced-colors: active) {      &::before {        background: CanvasText;      }    }  }  /* The <blockquote> inside a quote that is a <figure>: it holds the paragraphs, spaced as the quote spaces them. */  .quote-body {    display: grid;    gap: inherit;    min-width: 0;    margin: 0;  }  /* A paragraph of the quotation. */  .quote-text {    margin: 0;    text-wrap: pretty;    overflow-wrap: anywhere;    hanging-punctuation: first;  }  /* Who said it, and where: an avatar, a name in ink and a quiet line, in the <figcaption>. Put the title of a work in <cite>. */  .quote-source {    display: flex;    align-items: center;    gap: .625rem;    min-width: 0;    color: var(--color-text-muted);    font-size: .8125rem;    font-style: normal;    line-height: 1.4;    letter-spacing: 0;    /* A source may be a long address: it breaks inside the row rather than pushing out of the quote. */    overflow-wrap: anywhere;  }  .quote-name {    display: block;    color: var(--color-text-strong);    font-weight: var(--font-weight-control);  }}