From 8c509c815fd59af2d2ed09eda7169a9f11333f7b Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Tue, 30 Nov 2021 01:04:30 +0900 Subject: CSS グリッドレイアウトのリファレンスの変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/grid-template/index.html | 209 ------------------------------ 1 file changed, 209 deletions(-) delete mode 100644 files/ja/web/css/grid-template/index.html (limited to 'files/ja/web/css/grid-template/index.html') diff --git a/files/ja/web/css/grid-template/index.html b/files/ja/web/css/grid-template/index.html deleted file mode 100644 index c80fd2a006..0000000000 --- a/files/ja/web/css/grid-template/index.html +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: grid-template -slug: Web/CSS/grid-template -tags: - - CSS - - CSS Grid - - CSS Property - - Reference -translation_of: Web/CSS/grid-template ---- -

grid-template CSS プロパティは、{{glossary("grid column", "grid columns")}} および {{glossary("grid rows", "rows")}}、{{glossary("grid areas", "areas")}} を定義するための 短縮 プロパティです。

- -
{{EmbedInteractiveExample("pages/css/grid-template.html")}}
- - - - - -

作者は、次の個別のプロパティの値で設定することもできます: {{cssxref("grid-template-rows")}}, {{cssxref("grid-template-columns")}}, {{cssxref("grid-template-areas")}}

- -

構文

- - -
/* キーワード値 */
-grid-template: none;
-
-/* grid-template-rows / grid-template-columns の値 */
-grid-template: 100px 1fr / 50px 1fr;
-grid-template: auto 1fr / auto 1fr auto;
-grid-template: [linename] 100px / [columnname1] 30% [columnname2] 70%;
-grid-template: fit-content(100px) / fit-content(40%);
-
-/* grid-template-areas grid-template-rows / grid-template-column の値 */
-grid-template: "a a a"
-               "b b b";
-grid-template: "a a a" 20%
-               "b b b" auto;
-grid-template: [header-top] "a a a"     [header-bottom]
-                 [main-top] "b b b" 1fr [main-bottom]
-                            / auto 1fr auto;
-
-/* グローバル値 */
-grid-template: inherit;
-grid-template: initial;
-grid-template: unset;
-
- -

- -
-
none
-
3 個すべてのプロパティの値に none を設定します。これは明示的なグリッドが無いことを意味します。名前付きグリッド領域はありません。行と列は暗黙的に生成されます。これらのサイズは {{cssxref("grid-auto-rows")}} および {{cssxref("grid-auto-columns")}} プロパティによって決定されます。
-
<'grid-template-rows'> / <'grid-template-columns'>
-
{{cssxref("grid-template-rows")}} および {{cssxref("grid-template-columns")}} に特定の値を設定し、{{cssxref("grid-template-areas")}} の値に none を設定します。
-
[ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?
-
{{cssxref("grid-template-areas")}} にリストの文字列を設定し、{{cssxref("grid-template-rows")}} にリストの各文字列に従ったトラックサイズを設定します (サイズ指定の足りない部分には auto が設定されます)。さらに、各サイズの前後で定義された名前付きラインをつなぎ、{{cssxref("grid-template-columns")}} にトラックリストのスラッシュ記号の後で指定されたサイズを設定します (指定されていない場合は none が設定されます)。
- -

注記: これらのトラックリストに {{cssxref("repeat")}} 関数を使うことはできません。トラックは “ASCII アート” 内の行列と一対一の関係で視覚的に並んでいるためです。

-
-
- -

注記: {{cssxref("grid")}} 短縮プロパティは同じ構文を受け入れますが、暗黙的な grid プロパティをその初期値にリセットしてしまいます。これらの値が別々にカスケードされないようにするには、(grid-template とは対照的に、) grid を使用してください。

- -

正式な構文

- -{{csssyntax}} - -

- -

CSS

- -
#page {
-  display: grid;
-  width: 100%;
-  height: 200px;
-  grid-template: [header-left] "head head" 30px [header-right]
-                 [main-left]   "nav  main" 1fr  [main-right]
-                 [footer-left] "nav  foot" 30px [footer-right]
-                 / 120px 1fr;
-}
-
-header {
-  background-color: lime;
-  grid-area: head;
-}
-
-nav {
-  background-color: lightblue;
-  grid-area: nav;
-}
-
-main {
-  background-color: yellow;
-  grid-area: main;
-}
-
-footer {
-  background-color: red;
-  grid-column: foot;
-}
- -

HTML

- -
<section id="page">
-  <header>Header</header>
-  <nav>Navigation</nav>
-  <main>Main area</main>
-  <footer>Footer</footer>
-</section>
- -

描画結果

- -

{{EmbedLiveSample("Examples", "100%", "200px")}}

- -

仕様

- - - - - - - - - - - - - - - - -
仕様書策定状況備考
{{SpecName("CSS3 Grid", "#propdef-grid-template", "grid-template")}}{{Spec2("CSS3 Grid")}}初期定義
- -

{{cssinfo}}

- -

ブラウザーの実装状況

- -

- - - -

{{Compat("css.properties.grid-template")}}

- -

- -

関連情報

- - - - -- cgit v1.2.3-54-g00ecf