shinbun-components

<shinbun-paper>

Outer frame of a page: writing mode, theme and the page grid settings.

Example

紙面の外枠

段数は4、1段は8字。縦組みで、右から左へ読む。

<shinbun-paper dan="4" chars="8" font-size="0.8rem" theme="light">
  <shinbun-page>
    <shinbun-article span="4">
      <shinbun-headline size="m">紙面の外枠</shinbun-headline>
      <p>段数は4、1段は8字。縦組みで、右から左へ読む。</p>
    </shinbun-article>
  </shinbun-page>
</shinbun-paper>

Attributes

NameTypeDescription
writing"vertical"|"horizontal"Writing mode (default: vertical)
theme"light"|"dark"|"auto"Color scheme
preset"15dan"|"12dan"Column preset (15 or 12 columns)
debugbooleanOutline the placed items
responsivenumberSwitch to horizontal below this viewport width in px (default: 768)
auto-tcybooleanWrap two-digit numbers for tate-chu-yoko
dannumberColumns per page in vertical writing
dan-hnumberColumns per page in horizontal writing
charsnumberCharacters per column in vertical writing
linesnumberLines in the coordinate grid
font-sizestringBody font size, e.g. 0.8rem

Properties

NameTypeDescription
writingWriting
themeTheme | null

Methods

NameReturnsDescription
applyTcy()numberWraps two-digit numbers in `sb-tcy` spans. Returns the number of spans added.
overflow()Element[]Returns articles in the coordinate grid whose text overflows the box.

Slots

NameDescription
(default)shinbun-page, nameplate, folio

CSS custom properties

NameDescription
--sb-paperPaper color
--sb-inkText color
--sb-accentAccent color
--sb-font-bodyBody font
--sb-gapGap between columns and articles