ナビゲーション

v2.1.0
サイト内のページ

ページ

ヘッダー、メイン領域、フッターを、ビューポート以上の高さを持つフレームに収めます。

ページは、ヘッダー、メイン領域、フッターで構成する文書のフレームです。文書全体がひとまとまりとしてスクロールします。レイアウトクラス page でフレームの最小の高さをビューポートに合わせ、残りはユーティリティで整えます。

ページ

<div class="page bg-surface-base fg-text-body text-sm">  <a class="skip" href="#page-main">Skip to content</a>  <header class="navbar" style="--navbar-padding-x: max(1.5rem, calc(50% - 21rem))">    <a class="navbar-brand" href="#">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <circle cx="8" cy="8" r="6" /><path d="M8 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" />      </svg>Atlas    </a>    <nav class="navbar-nav" aria-label="Main">      <a class="navbar-link" href="#">Product</a>      <a class="navbar-link" href="#">Pricing</a>      <a class="navbar-link" href="#">Docs</a>      <a class="navbar-link" href="#" aria-current="page">Changelog</a>    </nav>    <div class="navbar-end">      <a class="btn btn-sm" href="#">Sign in</a>      <button type="button" class="btn btn-quiet btn-square btn-sm navbar-toggle" popovertarget="page-menu" aria-label="Open the menu">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M3 5.5L13 5.5" /><path d="M3 10.5L13 10.5" />        </svg>      </button>      <div class="menu menu-end" id="page-menu" popover>        <a class="menu-item" href="#">Product</a>        <a class="menu-item" href="#">Pricing</a>        <a class="menu-item" href="#">Docs</a>        <a class="menu-item" href="#" aria-current="page">Changelog</a>      </div>    </div>  </header>  <main class="grow(1) w-full max-w(720) mx-auto px-lg py-2xl" id="page-main" tabindex="-1">    <p class="eyebrow">Changelog</p>    <h1 class="heading heading-2xl mt-xs">What shipped this month</h1>    <p class="lead mt-md">      Every change to Atlas, newest first. Subscribe to the feed to hear about them as they land.    </p>    <div class="flex flex-col gap-xl mt-2xl">      <article class="flex flex-col gap-xs">        <p class="m(0) text-xs fg-text-muted">          <span class="badge badge-sm">4.2</span>          <time class="ml-xs" datetime="2026-10-28">28 October</time>        </p>        <h2 class="heading">Faster cold builds</h2>        <p class="m(0) leading-md">          Dependency caches are now restored before the install step, which removes about forty seconds from a cold build. Nothing to configure.        </p>      </article>      <article class="flex flex-col gap-xs">        <p class="m(0) text-xs fg-text-muted">          <span class="badge badge-sm">4.1</span>          <time class="ml-xs" datetime="2026-10-14">14 October</time>        </p>        <h2 class="heading">Preview comments</h2>        <p class="m(0) leading-md">          Leave a comment on any preview deployment, pinned to the element you clicked. Comments follow the element between deployments.        </p>      </article>      <article class="flex flex-col gap-xs">        <p class="m(0) text-xs fg-text-muted">          <span class="badge badge-sm">4.0</span>          <time class="ml-xs" datetime="2026-10-01">1 October</time>        </p>        <h2 class="heading">A new dashboard</h2>        <p class="m(0) leading-md">          Projects, domains and usage now live on one page, and every list can be filtered from the keyboard.        </p>      </article>    </div>  </main>  <footer class="bt(1) bt-solid b-line-hair">    <div class="flex flex-wrap items-center justify-between gap-sm w-full max-w(720) mx-auto px-lg py-lg text-xs fg-text-muted">      <span>© 2026 Atlas Labs</span>      <nav class="flex flex-wrap gap-lg" aria-label="Footer">        <a class="link link-quiet" href="#">Privacy</a>        <a class="link link-quiet" href="#">Terms</a>        <a class="link link-quiet" href="#">Status</a>      </nav>    </div>  </footer></div>
import ContrastIcon from '@master/icons-react/native/16/soft/contrast'import MenuIcon from '@master/icons-react/native/16/soft/menu'<div className="page bg-surface-base fg-text-body text-sm">  <a className="skip" href="#page-main">Skip to content</a>  <header className="navbar" style={{ '--navbar-padding-x': 'max(1.5rem, calc(50% - 21rem))' } as React.CSSProperties}>    <a className="navbar-brand" href="#"><ContrastIcon className="icon" />Atlas</a>    <nav className="navbar-nav" aria-label="Main">      <a className="navbar-link" href="#">Product</a>      <a className="navbar-link" href="#">Pricing</a>      <a className="navbar-link" href="#">Docs</a>      <a className="navbar-link" href="#" aria-current="page">Changelog</a>    </nav>    <div className="navbar-end">      <a className="btn btn-sm" href="#">Sign in</a>      <button type="button" className="btn btn-quiet btn-square btn-sm navbar-toggle" popoverTarget="page-menu" aria-label="Open the menu">        <MenuIcon className="icon" />      </button>      <div className="menu menu-end" id="page-menu" popover="">        <a className="menu-item" href="#">Product</a>        <a className="menu-item" href="#">Pricing</a>        <a className="menu-item" href="#">Docs</a>        <a className="menu-item" href="#" aria-current="page">Changelog</a>      </div>    </div>  </header>  <main className="grow(1) w-full max-w(720) mx-auto px-lg py-2xl" id="page-main" tabIndex={-1}>    <p className="eyebrow">Changelog</p>    <h1 className="heading heading-2xl mt-xs">What shipped this month</h1>    <p className="lead mt-md">      Every change to Atlas, newest first. Subscribe to the feed to hear about them as they land.    </p>    <div className="flex flex-col gap-xl mt-2xl">      <article className="flex flex-col gap-xs">        <p className="m(0) text-xs fg-text-muted">          <span className="badge badge-sm">4.2</span>          <time className="ml-xs" dateTime="2026-10-28">28 October</time>        </p>        <h2 className="heading">Faster cold builds</h2>        <p className="m(0) leading-md">          Dependency caches are now restored before the install step, which removes about forty seconds from a cold build. Nothing to configure.        </p>      </article>      <article className="flex flex-col gap-xs">        <p className="m(0) text-xs fg-text-muted">          <span className="badge badge-sm">4.1</span>          <time className="ml-xs" dateTime="2026-10-14">14 October</time>        </p>        <h2 className="heading">Preview comments</h2>        <p className="m(0) leading-md">          Leave a comment on any preview deployment, pinned to the element you clicked. Comments follow the element between deployments.        </p>      </article>      <article className="flex flex-col gap-xs">        <p className="m(0) text-xs fg-text-muted">          <span className="badge badge-sm">4.0</span>          <time className="ml-xs" dateTime="2026-10-01">1 October</time>        </p>        <h2 className="heading">A new dashboard</h2>        <p className="m(0) leading-md">          Projects, domains and usage now live on one page, and every list can be filtered from the keyboard.        </p>      </article>    </div>  </main>  <footer className="bt(1) bt-solid b-line-hair">    <div className="flex flex-wrap items-center justify-between gap-sm w-full max-w(720) mx-auto px-lg py-lg text-xs fg-text-muted">      <span>© 2026 Atlas Labs</span>      <nav className="flex flex-wrap gap-lg" aria-label="Footer">        <a className="link link-quiet" href="#">Privacy</a>        <a className="link link-quiet" href="#">Terms</a>        <a className="link link-quiet" href="#">Status</a>      </nav>    </div>  </footer></div>
<script>  import ContrastIcon from '@master/icons-svelte/native/16/soft/contrast'  import MenuIcon from '@master/icons-svelte/native/16/soft/menu'</script><div class="page bg-surface-base fg-text-body text-sm">  <a class="skip" href="#page-main">Skip to content</a>  <header class="navbar" style="--navbar-padding-x: max(1.5rem, calc(50% - 21rem))">    <a class="navbar-brand" href="#"><ContrastIcon class="icon" />Atlas</a>    <nav class="navbar-nav" aria-label="Main">      <a class="navbar-link" href="#">Product</a>      <a class="navbar-link" href="#">Pricing</a>      <a class="navbar-link" href="#">Docs</a>      <a class="navbar-link" href="#" aria-current="page">Changelog</a>    </nav>    <div class="navbar-end">      <a class="btn btn-sm" href="#">Sign in</a>      <button type="button" class="btn btn-quiet btn-square btn-sm navbar-toggle" popovertarget="page-menu" aria-label="Open the menu">        <MenuIcon class="icon" />      </button>      <div class="menu menu-end" id="page-menu" popover>        <a class="menu-item" href="#">Product</a>        <a class="menu-item" href="#">Pricing</a>        <a class="menu-item" href="#">Docs</a>        <a class="menu-item" href="#" aria-current="page">Changelog</a>      </div>    </div>  </header>  <main class="grow(1) w-full max-w(720) mx-auto px-lg py-2xl" id="page-main" tabindex="-1">    <p class="eyebrow">Changelog</p>    <h1 class="heading heading-2xl mt-xs">What shipped this month</h1>    <p class="lead mt-md">      Every change to Atlas, newest first. Subscribe to the feed to hear about them as they land.    </p>    <div class="flex flex-col gap-xl mt-2xl">      <article class="flex flex-col gap-xs">        <p class="m(0) text-xs fg-text-muted">          <span class="badge badge-sm">4.2</span>          <time class="ml-xs" datetime="2026-10-28">28 October</time>        </p>        <h2 class="heading">Faster cold builds</h2>        <p class="m(0) leading-md">          Dependency caches are now restored before the install step, which removes about forty seconds from a cold build. Nothing to configure.        </p>      </article>      <article class="flex flex-col gap-xs">        <p class="m(0) text-xs fg-text-muted">          <span class="badge badge-sm">4.1</span>          <time class="ml-xs" datetime="2026-10-14">14 October</time>        </p>        <h2 class="heading">Preview comments</h2>        <p class="m(0) leading-md">          Leave a comment on any preview deployment, pinned to the element you clicked. Comments follow the element between deployments.        </p>      </article>      <article class="flex flex-col gap-xs">        <p class="m(0) text-xs fg-text-muted">          <span class="badge badge-sm">4.0</span>          <time class="ml-xs" datetime="2026-10-01">1 October</time>        </p>        <h2 class="heading">A new dashboard</h2>        <p class="m(0) leading-md">          Projects, domains and usage now live on one page, and every list can be filtered from the keyboard.        </p>      </article>    </div>  </main>  <footer class="bt(1) bt-solid b-line-hair">    <div class="flex flex-wrap items-center justify-between gap-sm w-full max-w(720) mx-auto px-lg py-lg text-xs fg-text-muted">      <span>© 2026 Atlas Labs</span>      <nav class="flex flex-wrap gap-lg" aria-label="Footer">        <a class="link link-quiet" href="#">Privacy</a>        <a class="link link-quiet" href="#">Terms</a>        <a class="link link-quiet" href="#">Status</a>      </nav>    </div>  </footer></div>
<script setup>import ContrastIcon from '@master/icons-vue/native/16/soft/contrast'import MenuIcon from '@master/icons-vue/native/16/soft/menu'</script><template>  <div class="page bg-surface-base fg-text-body text-sm">    <a class="skip" href="#page-main">Skip to content</a>    <header class="navbar" style="--navbar-padding-x: max(1.5rem, calc(50% - 21rem))">      <a class="navbar-brand" href="#"><ContrastIcon class="icon" />Atlas</a>      <nav class="navbar-nav" aria-label="Main">        <a class="navbar-link" href="#">Product</a>        <a class="navbar-link" href="#">Pricing</a>        <a class="navbar-link" href="#">Docs</a>        <a class="navbar-link" href="#" aria-current="page">Changelog</a>      </nav>      <div class="navbar-end">        <a class="btn btn-sm" href="#">Sign in</a>        <button type="button" class="btn btn-quiet btn-square btn-sm navbar-toggle" popovertarget="page-menu" aria-label="Open the menu">          <MenuIcon class="icon" />        </button>        <div class="menu menu-end" id="page-menu" popover>          <a class="menu-item" href="#">Product</a>          <a class="menu-item" href="#">Pricing</a>          <a class="menu-item" href="#">Docs</a>          <a class="menu-item" href="#" aria-current="page">Changelog</a>        </div>      </div>    </header>    <main class="grow(1) w-full max-w(720) mx-auto px-lg py-2xl" id="page-main" tabindex="-1">      <p class="eyebrow">Changelog</p>      <h1 class="heading heading-2xl mt-xs">What shipped this month</h1>      <p class="lead mt-md">        Every change to Atlas, newest first. Subscribe to the feed to hear about them as they land.      </p>      <div class="flex flex-col gap-xl mt-2xl">        <article class="flex flex-col gap-xs">          <p class="m(0) text-xs fg-text-muted">            <span class="badge badge-sm">4.2</span>            <time class="ml-xs" datetime="2026-10-28">28 October</time>          </p>          <h2 class="heading">Faster cold builds</h2>          <p class="m(0) leading-md">            Dependency caches are now restored before the install step, which removes about forty seconds from a cold build. Nothing to configure.          </p>        </article>        <article class="flex flex-col gap-xs">          <p class="m(0) text-xs fg-text-muted">            <span class="badge badge-sm">4.1</span>            <time class="ml-xs" datetime="2026-10-14">14 October</time>          </p>          <h2 class="heading">Preview comments</h2>          <p class="m(0) leading-md">            Leave a comment on any preview deployment, pinned to the element you clicked. Comments follow the element between deployments.          </p>        </article>        <article class="flex flex-col gap-xs">          <p class="m(0) text-xs fg-text-muted">            <span class="badge badge-sm">4.0</span>            <time class="ml-xs" datetime="2026-10-01">1 October</time>          </p>          <h2 class="heading">A new dashboard</h2>          <p class="m(0) leading-md">            Projects, domains and usage now live on one page, and every list can be filtered from the keyboard.          </p>        </article>      </div>    </main>    <footer class="bt(1) bt-solid b-line-hair">      <div class="flex flex-wrap items-center justify-between gap-sm w-full max-w(720) mx-auto px-lg py-lg text-xs fg-text-muted">        <span>© 2026 Atlas Labs</span>        <nav class="flex flex-wrap gap-lg" aria-label="Footer">          <a class="link link-quiet" href="#">Privacy</a>          <a class="link link-quiet" href="#">Terms</a>          <a class="link link-quiet" href="#">Status</a>        </nav>      </div>    </footer>  </div></template>
ページをスクロールしてコンテンツがナビゲーションバーの背後に入ると、バーの質感が切り替わります。

#構成

  • フレームに page を指定します。 縦方向に並べ、最小の高さを 100dvh に設定します。動的ビューポート単位はスマートフォンのツールバーの表示・非表示に追従するため、フレームの最小の高さがその時点の表示領域に合います。この構成でユーティリティだけでは記述できないのは、この指定だけです。
  • メイン領域に grow(1) を指定します。 メイン領域が残りの高さを埋めるため、コンテンツが少ないページでもフッターは下端に収まります。
  • 領域全体の幅は保ち、コンテンツの幅をそろえます。 ヘッダーとフッターは全幅に広げます。メイン領域とフッター内のコンテンツには同じ幅指定 max-w(720) mx-auto px-lg を使って左右の端をそろえます。ナビゲーションバーは --navbar-padding-x: max(1.5rem, calc(50% - 21rem)) で同じ端にそろえます。中央から幅の半分だけ外側の位置です。一覧ページでは幅を広げ、読み物のページではこの幅を使います。
  • 面はコンポーネントで作ります。 バーには、それ自体がスティッキー配置になるナビゲーションバーを使います。フッター上端の細い線は、ボーダーのユーティリティで引きます。

#コンテンツが少ないページ

コンテンツがビューポートより短くても、メイン領域が残りの高さを埋め、フッターは下端に収まります。少量のコンテンツを中央に配置するには、メイン領域に flex items-center justify-center を指定します。

コンテンツが少ないページ

<div class="page bg-surface-base fg-text-body text-sm">  <a class="skip" href="#page-main-short">Skip to content</a>  <header class="navbar" style="--navbar-padding-x: 1.5rem">    <a class="navbar-brand" href="#">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <circle cx="8" cy="8" r="6" /><path d="M8 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" />      </svg>Atlas    </a>    <nav class="navbar-nav" aria-label="Main">      <a class="navbar-link" href="#">Product</a>      <a class="navbar-link" href="#">Pricing</a>      <a class="navbar-link" href="#">Docs</a>      <a class="navbar-link" href="#" aria-current="page">Changelog</a>    </nav>    <div class="navbar-end">      <a class="btn btn-sm" href="#">Sign in</a>      <button type="button" class="btn btn-quiet btn-square btn-sm navbar-toggle" popovertarget="page-menu-short" aria-label="Open the menu">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M3 5.5L13 5.5" /><path d="M3 10.5L13 10.5" />        </svg>      </button>      <div class="menu menu-end" id="page-menu-short" popover>        <a class="menu-item" href="#">Product</a>        <a class="menu-item" href="#">Pricing</a>        <a class="menu-item" href="#">Docs</a>        <a class="menu-item" href="#" aria-current="page">Changelog</a>      </div>    </div>  </header>  <main class="grow(1) flex items-center justify-center p-lg" id="page-main-short" tabindex="-1">    <div class="empty">      <div class="icon-frame empty-media" aria-hidden="true">        <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M10 1.6667C5 5.8333 4.5833 10.8333 7.0833 15.4167H12.9167C15.4167 10.8333 15 5.8333 10 1.6667Z" /><circle cx="10" cy="8.3333" r="1" fill="currentColor" stroke="none" /><path d="M12.5059 15.4167Q12.6134 15.5471 12.7721 15.6266L15.7283 17.1047A0.8249 0.8249 0 0 0 16.9109 16.5023L17.6842 11.8631A0.8257 0.8257 0 0 0 17.4914 11.1839L14.9083 8.2317A0.8274 0.8274 0 0 0 14.1839 7.9561C14.3744 8.793 14.4431 9.6377 14.3995 10.4832L14.5438 9.7135L16.4181 11.8557L15.7727 15.7292L13.6179 14.6519L13.9005 13.1446C13.6551 13.9094 13.3247 14.6686 12.9167 15.4167H12.5059ZM5.8161 7.9561A0.8199 0.8199 0 0 0 5.0917 8.2318L2.5086 11.1839A0.8257 0.8257 0 0 0 2.3158 11.8631L3.089 16.5023A0.825 0.825 0 0 0 4.2717 17.1047L7.2279 15.6266Q7.3866 15.5471 7.4941 15.4167H7.0833C6.6753 14.6686 6.3449 13.9094 6.0995 13.1446L6.3821 14.6519L4.2274 15.7292L3.5818 11.8557L5.4562 9.7135L5.6005 10.4832C5.5569 9.6377 5.6256 8.793 5.8161 7.9561Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M8.3333 18.75L11.6667 18.75" />        </svg>      </div>      <h1 class="empty-title">Nothing has shipped yet</h1>      <p class="empty-description">The first entry appears here with the first release.</p>      <div class="empty-actions">        <button type="button" class="btn btn-sm">Subscribe to the feed</button>      </div>    </div>  </main>  <footer class="bt(1) bt-solid b-line-hair">    <div class="flex flex-wrap items-center justify-between gap-sm w-full max-w(720) mx-auto px-lg py-lg text-xs fg-text-muted">      <span>© 2026 Atlas Labs</span>      <nav class="flex flex-wrap gap-lg" aria-label="Footer">        <a class="link link-quiet" href="#">Privacy</a>        <a class="link link-quiet" href="#">Terms</a>        <a class="link link-quiet" href="#">Status</a>      </nav>    </div>  </footer></div>
import ContrastIcon from '@master/icons-react/native/16/soft/contrast'import MenuIcon from '@master/icons-react/native/16/soft/menu'import RocketIcon from '@master/icons-react/native/20/soft/rocket'<div className="page bg-surface-base fg-text-body text-sm">  <a className="skip" href="#page-main-short">Skip to content</a>  <header className="navbar" style={{ '--navbar-padding-x': '1.5rem' } as React.CSSProperties}>    <a className="navbar-brand" href="#"><ContrastIcon className="icon" />Atlas</a>    <nav className="navbar-nav" aria-label="Main">      <a className="navbar-link" href="#">Product</a>      <a className="navbar-link" href="#">Pricing</a>      <a className="navbar-link" href="#">Docs</a>      <a className="navbar-link" href="#" aria-current="page">Changelog</a>    </nav>    <div className="navbar-end">      <a className="btn btn-sm" href="#">Sign in</a>      <button type="button" className="btn btn-quiet btn-square btn-sm navbar-toggle" popoverTarget="page-menu-short" aria-label="Open the menu">        <MenuIcon className="icon" />      </button>      <div className="menu menu-end" id="page-menu-short" popover="">        <a className="menu-item" href="#">Product</a>        <a className="menu-item" href="#">Pricing</a>        <a className="menu-item" href="#">Docs</a>        <a className="menu-item" href="#" aria-current="page">Changelog</a>      </div>    </div>  </header>  <main className="grow(1) flex items-center justify-center p-lg" id="page-main-short" tabIndex={-1}>    <div className="empty">      <div className="icon-frame empty-media" aria-hidden="true">        <RocketIcon className="icon" />      </div>      <h1 className="empty-title">Nothing has shipped yet</h1>      <p className="empty-description">The first entry appears here with the first release.</p>      <div className="empty-actions">        <button type="button" className="btn btn-sm">Subscribe to the feed</button>      </div>    </div>  </main>  <footer className="bt(1) bt-solid b-line-hair">    <div className="flex flex-wrap items-center justify-between gap-sm w-full max-w(720) mx-auto px-lg py-lg text-xs fg-text-muted">      <span>© 2026 Atlas Labs</span>      <nav className="flex flex-wrap gap-lg" aria-label="Footer">        <a className="link link-quiet" href="#">Privacy</a>        <a className="link link-quiet" href="#">Terms</a>        <a className="link link-quiet" href="#">Status</a>      </nav>    </div>  </footer></div>
<script>  import ContrastIcon from '@master/icons-svelte/native/16/soft/contrast'  import MenuIcon from '@master/icons-svelte/native/16/soft/menu'  import RocketIcon from '@master/icons-svelte/native/20/soft/rocket'</script><div class="page bg-surface-base fg-text-body text-sm">  <a class="skip" href="#page-main-short">Skip to content</a>  <header class="navbar" style="--navbar-padding-x: 1.5rem">    <a class="navbar-brand" href="#"><ContrastIcon class="icon" />Atlas</a>    <nav class="navbar-nav" aria-label="Main">      <a class="navbar-link" href="#">Product</a>      <a class="navbar-link" href="#">Pricing</a>      <a class="navbar-link" href="#">Docs</a>      <a class="navbar-link" href="#" aria-current="page">Changelog</a>    </nav>    <div class="navbar-end">      <a class="btn btn-sm" href="#">Sign in</a>      <button type="button" class="btn btn-quiet btn-square btn-sm navbar-toggle" popovertarget="page-menu-short" aria-label="Open the menu">        <MenuIcon class="icon" />      </button>      <div class="menu menu-end" id="page-menu-short" popover>        <a class="menu-item" href="#">Product</a>        <a class="menu-item" href="#">Pricing</a>        <a class="menu-item" href="#">Docs</a>        <a class="menu-item" href="#" aria-current="page">Changelog</a>      </div>    </div>  </header>  <main class="grow(1) flex items-center justify-center p-lg" id="page-main-short" tabindex="-1">    <div class="empty">      <div class="icon-frame empty-media" aria-hidden="true"><RocketIcon class="icon" /></div>      <h1 class="empty-title">Nothing has shipped yet</h1>      <p class="empty-description">The first entry appears here with the first release.</p>      <div class="empty-actions">        <button type="button" class="btn btn-sm">Subscribe to the feed</button>      </div>    </div>  </main>  <footer class="bt(1) bt-solid b-line-hair">    <div class="flex flex-wrap items-center justify-between gap-sm w-full max-w(720) mx-auto px-lg py-lg text-xs fg-text-muted">      <span>© 2026 Atlas Labs</span>      <nav class="flex flex-wrap gap-lg" aria-label="Footer">        <a class="link link-quiet" href="#">Privacy</a>        <a class="link link-quiet" href="#">Terms</a>        <a class="link link-quiet" href="#">Status</a>      </nav>    </div>  </footer></div>
<script setup>import ContrastIcon from '@master/icons-vue/native/16/soft/contrast'import MenuIcon from '@master/icons-vue/native/16/soft/menu'import RocketIcon from '@master/icons-vue/native/20/soft/rocket'</script><template>  <div class="page bg-surface-base fg-text-body text-sm">    <a class="skip" href="#page-main-short">Skip to content</a>    <header class="navbar" style="--navbar-padding-x: 1.5rem">      <a class="navbar-brand" href="#"><ContrastIcon class="icon" />Atlas</a>      <nav class="navbar-nav" aria-label="Main">        <a class="navbar-link" href="#">Product</a>        <a class="navbar-link" href="#">Pricing</a>        <a class="navbar-link" href="#">Docs</a>        <a class="navbar-link" href="#" aria-current="page">Changelog</a>      </nav>      <div class="navbar-end">        <a class="btn btn-sm" href="#">Sign in</a>        <button type="button" class="btn btn-quiet btn-square btn-sm navbar-toggle" popovertarget="page-menu-short" aria-label="Open the menu">          <MenuIcon class="icon" />        </button>        <div class="menu menu-end" id="page-menu-short" popover>          <a class="menu-item" href="#">Product</a>          <a class="menu-item" href="#">Pricing</a>          <a class="menu-item" href="#">Docs</a>          <a class="menu-item" href="#" aria-current="page">Changelog</a>        </div>      </div>    </header>    <main class="grow(1) flex items-center justify-center p-lg" id="page-main-short" tabindex="-1">      <div class="empty">        <div class="icon-frame empty-media" aria-hidden="true"><RocketIcon class="icon" /></div>        <h1 class="empty-title">Nothing has shipped yet</h1>        <p class="empty-description">The first entry appears here with the first release.</p>        <div class="empty-actions">          <button type="button" class="btn btn-sm">Subscribe to the feed</button>        </div>      </div>    </main>    <footer class="bt(1) bt-solid b-line-hair">      <div class="flex flex-wrap items-center justify-between gap-sm w-full max-w(720) mx-auto px-lg py-lg text-xs fg-text-muted">        <span>© 2026 Atlas Labs</span>        <nav class="flex flex-wrap gap-lg" aria-label="Footer">          <a class="link link-quiet" href="#">Privacy</a>          <a class="link link-quiet" href="#">Terms</a>          <a class="link link-quiet" href="#">Status</a>        </nav>      </div>    </footer>  </div></template>

#このフレームで作るページ

サイトのほとんどのページは、このフレームのメイン領域に別のものを入れたものです。

ページメイン領域の中身
記事、ブログ記事、変更履歴はみ出しレイアウト。画像や表がはみ出せる本文カラムです
目次を横に置いた長い記事ドキュメントページ。ナビゲーションと目次が加わります
検索、リソースの一覧検索結果ページ。絞り込み条件を、見つかったものの横に置きます
ランディングページブロックを順に並べます。ヒーロー、機能紹介、料金、行動の呼びかけなどです
ログイン、エラー中央に置いた 1 枚のカード。中央配置ページです

#アクセシビリティ

  • ランドマークには <header>、<main>、<footer> をそれぞれ 1 つずつ使い、すべての <nav> にラベルを付けます。
  • ページの先頭には、メイン領域へのスキップリンクを置きます。メイン領域に tabindex="-1" を指定すると、リンクで移動したときにフォーカスも移ります。キーボード操作では、キーを 1 回押すだけでヘッダーを飛ばせます。
  • スティッキーヘッダーはページ上端に重なります。見出しへのリンクで移動したときに見出しが隠れないよう、ルートの scroll-padding-top にヘッダーの高さを指定します。リンク先の見出しに flash を指定すれば、見出しごとに重なりを避けられます。

#クラス

クラス説明
pageフレームは縦並びで、最小の高さは dvh で測ったビューポートの高さです。フレーム自体は何も描画しません。

#ソース

@master/ui/layouts/page.css
/* * Page: the frame of a document that scrolls as a whole. A header, the main region and a footer stack in it. * The frame is at least as tall as the viewport, measured in dvh, so the toolbars a phone shows and hides * neither leave a gap under the footer nor push it out of reach. Give the main region `grow(1)` and it takes * the room that is left, which keeps the footer at the foot of a short page. * A page draws nothing: its surfaces come from components. */@layer components.ui {  .page {    display: flex;    flex-direction: column;    min-width: 0;    /* vh for engines without dynamic viewport units; dvh replaces it where it is known. */    min-height: 100vh;    min-height: 100dvh;  }}