shinbun-components

<shinbun-photo>

Photo or figure with an optional caption. Spans all columns inside an article; as a direct child of the page it can be placed with `span`, `y`, `x`, `w`. In vertical writing the image height is the column length, so `ratio` sets the width relative to it.

Example

写真の説明(写真は架空)

写真は記事の全段にまたがる。

<shinbun-paper dan="4" chars="8" font-size="0.8rem">
  <shinbun-page>
    <shinbun-article span="4">
      <shinbun-photo ratio="4 / 3">
        <img alt="" />
        <figcaption>写真の説明(写真は架空)</figcaption>
      </shinbun-photo>
      <p>写真は記事の全段にまたがる。</p>
    </shinbun-article>
  </shinbun-page>
</shinbun-paper>

Attributes

NameTypeDescription
ratiostringAspect ratio (width / height), e.g. `10 / 11`
spannumberNumber of columns when placed in the page (1-15)
ynumberStart column when placed in the page (1-15)
xnumberStart position on the line axis when placed in the page (1-60)
wnumberLines occupied when placed in the page (1-60)

Properties

None

Methods

None

Slots

NameDescription
(default)img and figcaption

CSS custom properties

NameDescription
--sb-photo-bgBackground color before the image loads
--sb-photo-ratioAspect ratio (also set by `ratio`)