1. 序論
~INFORMATIVECSS Level 1/2 では、~textの整列は `text-align$p を介して, 塊の整列は `auto^v ~marginで釣り合せることで,可能にしていた。 しかしながら、~table~cell内を除き,縦方向~整列は可能でなかった。 ~CSSには,更に能力が追加されているため、~boxたちを種々の次元で整列する能は、より~~重要度が増している。 この~moduleは、~CSS全体を通して共有される,統合的かつ共通的な~box整列~modelを創出しようと試みるものである。 ◎ CSS Levels 1 and 2 allowed for the alignment of text via text-align and the alignment of blocks by balancing auto margins. However, except in table cells, vertical alignment was not possible. As CSS adds further capabilities, the ability to align boxes in various dimensions becomes more critical. This module attempts to create a cohesive and common box alignment model to share among all of CSS.
注記: [ ~text/`行内level$ ]内容の整列は、 `CSS-TEXT-3$r, `CSS-INLINE-3$r にて定義される。 ◎ Note: The alignment of text and inline-level content is defined in [CSS-TEXT-3] and [CSS-INLINE-3].
注記: この仕様は、ここに定義される各種~propが初期値に設定されているときには, CSS2.1 にて定義される挙動を変更しようと意図するものではない。 何らかの不一致に気付かれた方は、その誤りを CSSWG に報告されたし。 ◎ Note: This specification is not intended to change any of the behavior defined in CSS2.1 when the properties defined here are set to their initial values. If implementors or anyone else notices a discrepancy, please report this to the CSSWG as an error.
1.1. ~module間の相互作用
この~moduleは、いくつかの新たな整列~能力を塊~layout~model( `CSS2$r 視覚~整形~model, 視覚~整形~modelの詳細 )に追加し、これらの~propと[ `vertical-align$p を利用することによる~table~cell内容の整列( `CSS2$r ~tableの高さ ) ]との相互作用を定義する。 ◎ This module adds some new alignment capabilities to the block layout model described in [CSS2] chapters 9 and 10 and defines the interaction of these properties with the alignment of table cell content using vertical-align, as defined in [CSS2] chapter 17.
これらの~propと[ 格子~layout `CSS-GRID-1$r / ~flex~layout `CSS-FLEXBOX-1$r ]との相互作用は、それらの~moduleにて定義される。 ここでの~prop定義は、 `CSS-FLEXBOX-1$r によるそれに取って代わる(そこでの とり得る値は,ここでの値の部分集合である)。 ◎ The interaction of these properties with Grid Layout [CSS-GRID-1] and Flexible Box Layout [CSS-FLEXBOX-1] is defined in their respective modules. The property definitions here supersede those in [CSS-FLEXBOX-1] (which have a smaller, earlier subset of permissible values).
この~moduleにおけるどの~propも `first-line^pe / `first-letter^pe 疑似要素には適用されない。 ◎ No properties in this module apply to the ::first-line or ::first-letter pseudo-elements.
1.2. 値
【 この節の内容は CSS 日本語訳 共通ページ に委譲 】
1.3. 部分的~実装
この~moduleにおける特色機能の~supportは、[ それに影響される種々の~layout~modelに対応する様々な実装~段階の下で,配備されることになる ]と予期されるので、[ 未~supportの~keywordを無効として扱うよう要求する 部分的~実装のための規則 ]は,次に該当する整列~keyword 【, および それを値にとる~prop,の組】 にも適用されることをここに明確化しておく ⇒ 実装が~supportする~layout~moduleのうち,次に該当するものが一つでもある ⇒ その~layoutにおいて、当の~keywordを値にとる~propを一般には~supportするが,その~propに対する当の~keywordによる特色機能は ~supportしていない。 ◎ Since it is expected that support for the features in this module will be deployed in stages corresponding to the various layout models affected, it is hereby clarified that the rules for partial implementations that require treating as invalid any unsupported feature apply to any alignment keyword which is not supported across all layout modules to which it applies for layout models in which the implementation supports the property in general.
例えば実装が[ 格子 `CSS-GRID-1$r, ~flex `CSS-FLEXBOX-1$r ]に対しては `align-self$p を~supportしているとする。 このとき,例えば~keyword `start^v について:
- 実装は、格子, ~flex両~容器にて `start^v を~supportしていない限り,それを無効と扱わ~MUST。
- 同じ実装が塊level要素に対しては `align-self$p を全く~supportしていない — したがって,それらに対する `start^v の実装を欠いてる — 場合でも,格子, ~flexに対する `start^v を無効と扱うことは要求されない。
2. 各種 整列~propの概観
~CSSにおける `~box整列~prop@ は、下の一覧に示される 6 種の~propからなり,~box内における~~子~boxたちの整列を制御する。 これらは、 2 つの~~独立な~~側面について述べることができる: ◎ The box alignment properties in CSS are a set of 6 properties that control alignment of boxes within other boxes. They can be described along two axises:
- `主-軸$/`行内-軸$ か, それとも `交叉-軸$/`塊-軸$ か,いずれの次元に適用されるのか。 ◎ which dimension they apply to (main/inline vs. cross/block), and
- ~boxの[ 親~boxの中での位置 ]か,それとも ~boxの中の[ ~box内容の位置 ]か,いずれを制御するのか。 ◎ whether they control the position of the box within its parent, or the box’s content within itself.
注記: この仕様は、[ 主, 行内 ]次元の整列に対しては,用語 “justify”、 [ 交叉, 塊 ]次元の整列に対しては,用語 “align” を利用して判別する。 この選択は いくぶん恣意的であるが、この 2 つの用語により,~CSSの~layout~model全体を通して,命名の枠組みが一貫するようになる( ~CSS~flex~layoutの~box~modelと各種用語 も含め)。 ◎ Note: This specification uses the terms “justify” and “align” to distinguish between alignment in the main/inline and cross/block dimensions, respectively. The choice is somewhat arbitrary, but having the two terms allows for a consistent naming scheme that works across all of CSS’s layout models (including CSS Flexbox 1 §2 Flex Layout Box Model and Terminology)
【 “justify”, “align” の使い分けは、実際には,ほぼ~prop名に限られ、地の文の中では,ほぼ後者(この訳では “整列-” と記される)しか用いられていない(前者に対しては “分布-( distribute )” という語も用いられている)。 】
次の一覧に、各種`~box整列~prop$が[ 適用し得る軸, 整列-対象, 適用し得る`表示型$ ]を要約する。 ◎ The following table summarizes the box alignment properties and the display types they can apply to.
~prop◎ Common | 軸◎ Axis | 整列-対象◎ Aligns | 概念図 | 適用-対象◎ Applies to |
---|---|---|---|---|
`justify-content$p | `主-軸$/`行内-軸$ ◎ main/inline | 要素の中の内容 (実質的に~paddingを調整する) ◎ content within element (effectively adjusts padding) | `content-example-s^dgm | `塊~容器$, `~flex容器$, `格子~容器$ ◎ block containers, flex containers, and grid containers |
`align-content$p | `交叉-軸$/`塊-軸$ ◎ cross/block | |||
`justify-self$p | `行内-軸$ ◎ inline | 親の中の要素 (実質的に~marginを調整する) ◎ element within parent (effectively adjusts margins) | `self-example-s^dgm | `塊level$の要素, 絶対位置された~box, `格子~駒$ ◎ block-level boxes, absolutely-positioned boxes, and grid items |
`align-self$p | `交叉-軸$/`塊-軸$ ◎ cross/block | 絶対位置された~box, `~flex駒$, `格子~駒$ ◎ absolutely-positioned boxes, flex items, and grid items | ||
`justify-items$p | `行内-軸$ ◎ inline | ~boxの内側の各~駒 (子に対する既定の `*-self^p 値を与える) ◎ items inside box (controls child items’ justify-self: auto) | `items-example-s^dgm | `塊~容器$, `格子~容器$ ◎ block containers and grid containers |
`align-items$p | `交叉-軸$/`塊-軸$ ◎ cross/block | `~flex容器$, `格子~容器$ ◎ flex containers and grid containers |
【 `justify-self$p, `align-self$p の適用-対象は、どの種類の整形~文脈に関与するかを表す。 他の~propの適用-対象は、そのような整形~文脈を与える`内縁~表示型$を表す。 】
注記: `*-items^p ~propは、要素~自身には影響しない。 容器に設定されたときは、その容器~要素の各~子の `*-self^p ~propに対する `auto^v 値の解釈を指定する。 ◎ Note: The *-items properties don’t affect the element itself. When set on a container, they specify the interpretation of any *-self: auto used on children of the container element.
3. 整列の各種用語
この~moduleは、~CSSにおけるすべての~layout~modeに対する各種 整列~propを定義するので、抽象的な各種用語を導入する: ◎ Since this module defines alignment properties for all layout modes in CSS, some abstract terminology is introduced:
- `整列対象@
-
`整列対象$とは、~propにより整列されるもの(たち)である — 以下、 %~box は当の~propが設定されている~boxを表すとするとき:
- [ `justify-self$p / `align-self$p ]~propに対する`整列対象$は、 %~box の`~margin~box$になる。
- [ `justify-content$p / `align-content$p ]~propに対する`整列対象$は、各~layout~modeごとに, %~box の内容の何らかの側面を指すように定義される。
いずれにせよ、整列対象の`書字mode$は, %~box のそれと`見做す$。
【 “`書字mode$は 〜 と `見做す@ ( assume / assuming)” — この仕様の以降にも現れるこの句は、[ そう見做す下で,対象になる軸を決定する ]こと, および[ この仕様に定義される整列の目的に限って,そう見做す ]ことを表すものと思われる(明示的に そう述べられてはいないが)。 】
◎ The alignment subject is the thing or things being aligned by the property. For justify-self and align-self, the alignment subject is the margin box of the box the property is set on, and assumes the writing mode of that box. For justify-content and align-content, the alignment subject is defined by the layout mode and refers to some aspect of its contents; it also assumes the writing mode of the box the property is set on. - `整列~容器@
- `整列~容器$は、その中で`整列対象$が整列される矩形である。 これは,各~layout~modeごとに定義されるが、通例的には: `整列対象$の`包含塊$になることに加え,整列~容器の`書字mode$は `包含塊$を確立している~boxのそれと`見做す$。 ◎ The alignment container is the rectangle that the alignment subject is aligned within. This is defined by the layout mode, but is usually the alignment subject’s containing block, and assumes the writing mode of the box establishing the containing block.
- `~fallback整列@
- 整列~法によっては、充足できる状況が限られたり,消費できる空間が制限されることもある。 例えば,`整列対象$が 0 個の場合、 `space-between$v は演算できない。 また,基底線~整列は、充足された時点で,余った空間すべてを吸収するには不十分かもしれない。 このような事例では、~fallback整列が(下に定義されるように)効果を~~発揮し,余った空間を全部的に消費する。 ◎ Some alignments can only be fulfilled in certain situations or are limited in how much space they can consume; for example, space-between can only operate when there is more than one alignment subject, and baseline alignment, once fulfilled, might not be enough to absorb all the excess space. In these cases a fallback alignment takes effect (as defined below) to fully consume the excess space.
4. 整列~keyword
すべての整列~propは、以下に定義される~keyword値の集合を共通して利用する。 これらの~keywordは次の 3 種に大別される: ◎ All of the alignment properties use a common set of keyword values, which are defined in this section. Keywords fall into three categories:
- `位置的~整列$
- これらの~keywordは、`整列~容器$の中での絶対的な位置として,整列を定義する。 ◎ These keywords define alignment as an absolute position within the alignment container.
- `基底線~整列$
- これらの~keywordは、同じ`整列~文脈$を共有する`整列対象$たちの基底線どうしの関係性として,整列を定義する。 ◎ These keywords define alignment as a relationship among the baselines of multiple alignment subjects within an alignment context.
- `分布型の整列$
- これらの~keywordは、`整列対象$たちどうしの分布として,整列を定義する。 ◎ These keywords define alignment as a distribution of space among alignment subjects.
4.1. 位置的~整列: `center^v, `start^v, `end^v, `self-start^v, `self-end^v, `flex-start^v, `flex-end^v, `left^v, `right^v ~keyword
各種 `位置的~整列@ ~keywordは、`整列対象$の位置を,その`整列~容器$を基準に指定する。 ◎ The positional alignment keywords specify a position for an alignment subject with respect to its alignment container.
各種~値の意味は、値を利用する~propが対象にしている軸~沿いにおいて: ◎ Values have the following meanings:
- `center@v
- `整列対象$を,その`整列~容器$の中で中央寄せにする。 ◎ Centers the alignment subject within its alignment container.
- `start@v
- `整列対象$が `整列~容器$の始端~辺に接合されるように整列する。 ◎ Aligns the alignment subject to be flush with the alignment container’s start edge in the appropriate axis.
- `end@v
- `整列対象$が `整列~容器$の終端~辺に接合されるように整列する。 ◎ Aligns the alignment subject to be flush with the alignment container’s end edge in the appropriate axis.
- `self-start@v
- `*-content^p ~propには利用できない。
- `整列対象$の始端~辺が `整列~容器$の同じ側の辺に接合されるように整列する。 ◎ Aligns the alignment subject to be flush with the edge of the alignment container corresponding to the alignment subject’s start side in the appropriate axis.
- `self-end@v
- `*-content^p ~propには利用できない。
- `整列対象$の終端~辺が `整列~容器$の同じ側の辺に接合されるように整列する。 ◎ Aligns the alignment subject to be flush with the edge of the alignment container corresponding to the alignment subject’s end side in the appropriate axis.
- `flex-start@v
- `flex-end@v
- これらの値が利用されるのは、~flex~layoutに限られる。 `CSS-FLEXBOX-1$r ◎ Only used in flex layout. [CSS-FLEXBOX-1]\
-
`整列~容器$ — すなわち`~flex容器$ — の各~辺のうち[ 次に与える側にあって,~propが対象にする軸~沿いにある方 ]に,`整列対象$が接合されるように整列する:
- `flex-start$v に対しては、`主-始端$, または`交叉-始端$
- `flex-end$v に対しては、`主-終端$, または`交叉-終端$
[ `flex-start$v / `flex-end$v ]値が~flex整形~文脈の外側で利用されたとき — すなわち、次に該当するとき — の挙動は[ `start$v / `end$v ]と同じになる:
- ~flex駒でない~box(または、~flex容器の子であって絶対位置された~boxの静的位置を決定するときなど,~flex駒を装う~box)上で,`自己-整列~prop$に利用されたとき
- ~flex容器でない~box上で,`内容-分布~prop$に利用されたとき
- `left@v
- `right@v
-
`整列~容器$の各~辺のうち[ 次に与える側にあって,適切な軸にある方 ]に,`整列対象$が接合されるように整列する:
- `left$v に対しては、`行-左端$, または(物理的)`左端$
- `right$v に対しては、`行-右端$, または(物理的)`右端$
~propが対象にする軸が 左端↔右端 軸と平行でない場合、これらの値は `start$v と同じに挙動する。
◎ Aligns the alignment subject to be flush with the alignment container’s line-left or physical left edge, whichever is in the appropriate axis. ◎ If the property’s axis is not parallel with either left↔right axis, this value behaves as start. ◎ right ◎ Aligns the alignment subject to be flush with the alignment container’s line-right or physical right edge, whichever is in the appropriate axis. ◎ If the property’s axis is not parallel with either left↔right axis, this value behaves as start.
これらの値の一部は、次の 2 つの文法~項を利用して表現される: ◎ Two grammar terms are used to denote certain subsets of these values:
- `self-position$t
-
この集合は、[ `justify-self$p / `align-self$p ]から利用され、~boxをその`整列~容器$の中で整列する。 加えて、 `justify-items$p / `align-items$p からも( `justify-self$p / `align-self$p に対する既定の値を指定するために)利用される。 ◎ This set is used by justify-self and align-self to align the box within its alignment container, and also by justify-items and align-items (to specify default values for justify-self and align-self).
`self-position@t = `center$v | `start$v | `end$v | `self-start$v | `self-end$v | `flex-start$v | `flex-end$v;
- `content-position$t
-
この集合は、[ `justify-content$p / `align-content$p ]から利用され、~boxの中で~box自身の内容を整列する。 ◎ This set is used by justify-content and align-content to align the box’s contents within itself.
`content-position@t = `center$v | `start$v | `end$v | `flex-start$v | `flex-end$v;
注記: [ `left$v, `right$v ]は、[ `self-position$t, `content-position$t ]からは除外される — これらは[ `justify-content$p / `justify-self$p / `justify-items$p ]用の妥当な位置的~整列~値であるが, `align-*^p には許容されないので。 これらの値は、代わりに `justify-*^p ~propの文法に明示的に含められている。 ◎ Note: left and right are excluded from <self-position> and <content-position>, despite being valid positional alignment values for justify-content/justify-self/justify-items, because they are not allowed in the align-* properties. They are instead explicitly included in the justify-* properties’ grammars.
注記: ほとんどの~layout~model(塊, ~table, 格子, 等々)においては、常に,各種[ `justify-*^p ~propは`行内-軸$ / `align-*^p ~propは`塊-軸$ ]において対象を整列する。 ◎ For most layout models (block, table, grid, etc), the justify-* properties always align things in the inline axis, while the align-* properties always align things in the block axis.
他方~flexboxは、[ `justify-*^p は`主-軸$ / `align-*^p は`交叉-軸$ ]において対象を整列する。 これは `flex-direction$p の値に依存する: その値が `row$v または `row-reverse$v ならば,他の~layout~modeに合致する([ `justify-*^p は`行内-軸$ / `align-*^p は`塊-軸$ ]において対象を整列する)一方、 `column$v または `column-reverse$v ならば,この対応は反対になる。 ◎ Flexbox, on the other hand, has justify-* align things in the main axis and align-* align things in the cross axis. This depends on the value of flex-direction: when flex-direction is row or row-reverse, it matches the other layout modes (inline axis with justify-*, block axis with align-*); when flex-direction is column or column-reverse, it has the opposite correspondence.
`直交~flow$の下での `start$v, `end$v と縦横 両~軸の~~関係をもっと解りやすくする。 ◎ Make it easier to understand the dual-axis nature of "start" and "end" wrt orthogonal flows.
4.2. 基底線の整列: `baseline^v ~keywordと `first^v/`last^v 改変子
`CSS-WRITING-MODES-3$r の 基底線 — 序論 も見よ。 ◎ See CSS Writing Modes 3 §4.1 Introduction to Baselines.
各種 `基底線~整列@ は、同じ`整列~文脈$を共有する複数の`整列対象$たち(同じ~rowの中の各~cellなど)を[ 互いの`整列~基底線$が合致するように整列させる ]ような,位置的~整列の一種である。 `基底線共有~group$における`整列対象$の位置が`基底線~整列$により全部的に拘束されない場合(すなわち,当の`整列~容器$の中で,`基底線~整列$は保守しつつ,ズラすこともできる)、それらの整列対象は、各自の`基底線~整列$を保全しつつ,可能な限り`~fallback整列-$される。 ◎ Baseline alignment is a form of positional alignment that aligns multiple alignment subjects within a shared alignment context (such as cells within a row) by matching up their alignment baselines. If the position of the alignment subjects within a baseline-sharing group is not fully constrained by baseline alignment (i.e., they could be shifted within their respective alignment containers while maintaining baseline-alignment), they are fallback-aligned insofar as possible while preserving their baseline alignment.
各種 `基底線~整列$~keywordは、文法においては `baseline-position$t で表現される: ◎ The baseline alignment keywords are represented with the <baseline-position> grammar term:
`baseline-position@t = [ `first$v | `last$v ]? `baseline$v
値[ `first$v / `last$v ]は、~boxの【~propが対象にする軸における】 `基底線~整列~選好@ を与え、省略時の既定は `first^v になる。 ◎ The first and last values give a box a baseline alignment preference: either “first” or “last”, respectively, defaulting to “first”.
各種~値の意味は、値を利用する~propが対象にしている軸~沿いにおいて: ◎ Values have the following meanings:
- `baseline@v
- 下に定義する `first baseline$v に算出される。 ◎ Computes to first baseline, defined below.
- `first baseline@v
- ~boxが `最初の基底線による整列@ に関与するよう,指定する: [ ~boxの`最初の基底線~集合$の`整列~基底線$ ]と[ ~boxが属する`基底線共有~group$の対応する基底線 ]とが,整列されることになる。 詳細は、`基底線による~boxたちの整列-法$を見よ。 ◎ Specifies participation in first-baseline alignment: aligns the alignment baseline of the box’s first baseline set with the corresponding baseline of its baseline-sharing group. See §9.3 Aligning Boxes by Baseline for more details.
- この値に対する`~fallback整列$は `start$v とする。 ◎ The fallback alignment for first baseline is start.
- `last baseline@v
- ~boxが `最後の基底線による整列@ に関与するよう,指定する: [ ~boxの`最後の基底線~集合$の`整列~基底線$ ]と[ ~boxが属する`基底線共有~group$の対応する基底線 ]とが,整列されることになる。 詳細は、`基底線による~boxたちの整列-法$を見よ。 ◎ Specifies participation in last-baseline alignment: aligns the alignment baseline of the box’s last baseline set with the corresponding baseline of its baseline-sharing group. See §9.3 Aligning Boxes by Baseline for more details.
- この値に対する`~fallback整列$は `safe end^v とする。 ◎ The fallback alignment for last baseline is safe end.
これらの値が `align-content$p に指定された場合、`基底線による内容-整列$を誘発する — すなわち、内容~boxの中で~boxの内容をズラすことに加え,~box自身の~sizingにも影響し得る。 基底線による内容-整列 節を見よ。 ◎ When specified for align-content, these values trigger baseline content-alignment, shifting the content of the box within its content box, and may also affect the sizing of the box itself. See §5.4 Baseline Content-Alignment.
これらの値が `align-self$p / `justify-self$p に指定された場合、`基底線による自己-整列$を誘発する — すなわち、~box全体をその容器の中でズラすことに加え,その容器の~sizingにも影響し得る。 基底線による自己-整列 節を見よ。 ◎ When specified for align-self/justify-self, these values trigger baseline self-alignment, shifting the entire box within its container, which may affect the sizing of its container. See §6.4 Baseline Self-Alignment.
同じ~box上の同じ軸に対し[ `基底線による内容-整列$と`基底線による自己-整列$ ]の 両者とも指定された場合、その軸においては,`基底線による自己-整列$のみが尊守され、 その軸における内容-整列は `start$v として扱われ~MUST。 ◎ If both baseline content-alignment and baseline self-alignment are specified in the same axis on the same box, only baseline self-alignment is honored in that axis; the content-alignment in that axis must be treated as start.
画像による例を追加する必要あり。 ◎ Add example images here.
属する`整列~文脈$がない~boxに対しては、`~fallback整列$が利用される。 例えば、塊~boxの `align-content$p に `baseline$v が指定された場合、 `start^v による整列に~fall-backする。 `~fallback整列$は、`整列~容器$の中で`基底線共有~group$を整列するためにも利用される。 ◎ If a box does not belong to a shared alignment context, then the fallback alignment is used. For example, align-content: baseline on a block box falls back to start alignment. The fallback alignment is also used to align the baseline-sharing group within its alignment container.
注記: CSSOM は `first baseline$v を `baseline$v に直列化する — これら等価であり, 後者の方が短いので。 CSSOM による ~CSS値の直列化-法 を見よ。 ◎ Note: Because they are equivalent, and baseline is shorter, the CSSOM serializes first baseline as baseline. See CSSOM 1 §5.7.2 Serializing CSS Values.
注記: ある面で関係する `vertical-align$p ~propに対しては、 CSS2.1 による一貫性のない設計に因り, `baseline$v は `first baseline$v と等価でない — 行内level~boxの`基底線~整列~選好$は `display$p に依存するので(例えば `inline-block$v は,最後の基底線を既定で利用する一方で、 `inline-table$v は,最初の基底線を既定で利用する)。 ◎ Note: For the somewhat-related vertical-align property, due to inconsistent design decisions in CSS2.1, baseline is not equivalent to first baseline as an inline-level box’s baseline alignment preference depends on display. (E.g., inline-block uses its last baseline by default, while inline-table uses its first baseline by default.)
4.3. 分布型の整列: `stretch^v, `space-between^v, `space-around^v, `space-evenly^v ~keyword
各種 `分布型の整列@ 値は、容器の余分の空間を`整列対象$たちに分散するために, `justify-content$p / `align-content$p にて利用される。 ◎ The distributed alignment values are used by justify-content and align-content to disperse a container’s extra space among its alignment subjects.
空間をこの仕方で配分できない場合、これらの値は その`~fallback整列$に従って挙動する。 各 分布~値には、既定の`~fallback整列$が結付けられる。 (この~moduleの将来~levelでは、`~fallback整列$を明示的に指定することも許容され得る。) ◎ When space cannot be distributed in this way, these values behave as their fallback alignment. Each distribution value an associated default fallback alignment. (A future level of this module may allow the fallback alignment to be specified explicitly.)
- `space-between@v
- `整列対象$たちは、`整列~容器$内で均等に分布される。 最初最後の`整列対象$は,`整列~容器$の同じ側の辺に接合されるように置かれ、残りの`整列対象$たちは,隣接するどの 2 つの`整列対象$の合間も同じアキになるように分布される。 ◎ The alignment subjects are evenly distributed in the alignment container. The first alignment subject is placed flush with the start edge of the alignment container, the last alignment subject is placed flush with the end edge of the alignment container, and the remaining alignment subjects are distributed so that the spacing between any two adjacent alignment subjects is the same.
- この値に対する既定の`~fallback整列$は `flex-start$v とする。 ( ~flex~layout以外の~layout~mode下では、 `flex-start$v は `start$v に一致する。 ) ◎ The default fallback alignment for this value is flex-start. (For layout modes other than flex layout, flex-start is identical to start.)
- `space-around@v
- `整列対象$たちを、最初最後の`整列対象$の[ 前/後 ]に,他の整列対象の合間の半分の空間を与えることを除いて, `space-between$v のときと同様に分布させる。 ◎ The alignment subjects are evenly distributed in the alignment container, with a half-size space on either end. The alignment subjects are distributed so that the spacing between any two adjacent alignment subjects is the same, and the spacing before the first and after the last alignment subject is half the size of the other spacing.
- この値に対する既定の`~fallback整列$は `center$v とする。 ◎ The default fallback alignment for this value is center.
- `space-evenly@v
- `整列対象$たちを、最初最後の`整列対象$の[ 前/後 ]に,他の整列対象の合間と同じ空間を与えることを除いて, `space-between$v のときと同様に分布させる。 ◎ The alignment subjects are evenly distributed in the alignment container, with a full-size space on either end. The alignment subjects are distributed so that the spacing between any two adjacent alignment subjects, before the first alignment subject, and after the last alignment subject is the same.
- この値に対する既定の`~fallback整列$は `center$v とする。 ◎ The default fallback alignment for this value is center.
- `~stretchAC@v
- `整列対象$たちの合計~sizeが`整列~容器$の~sizeより小さい場合に、合計~sizeが`整列~容器$を正確に埋めるように,[ `整列対象$たちのうち,~sizeが `auto^v にされているもの ]の~sizeを,その[ `max-height$p / `max-width$p ](あるいは等価な機能性)により課される拘束は守りつつ,等しく増やす(比例的にではなく)。 ◎ If the combined size of the alignment subjects is less than the size of the alignment container, any auto-sized alignment subjects have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container.
- この値に対する既定の`~fallback整列$は `flex-start$v とする。 ( ~flex~layout以外の~layout~modeの下では `flex-start$v は `start$v と一致する。 ) ◎ The default fallback alignment for this value is flex-start. (For layout modes other than flex layout, flex-start is identical to start.)
これらの値は、文法においては `content-distribution$t で表現される: ◎ These values are represented with the <content-distribution> grammar term:
`content-distribution@t = `space-between$v | `space-around$v | `space-evenly$v | `~stretchAC$v
4.4. ~overflow時の整列: `safe^v, `unsafe^v ~keyword と~scroll安全用の制限-
`整列対象$が`整列~容器$より大きい場合,容器を~overflowすることになる。 整列~modeによっては、この状況でも その~modeを尊守すると,~access不能な部分が生じかねない: 例えば、中央寄せにされている~sidebarの内容が,その容器の中で~overflowする場合、~boxの一部が,表示域の始端~辺を過ぎて~scrollできない所に はみ出るかもしれない。 ◎ When the alignment subject is larger than the alignment container, it will overflow. Some alignment modes, if honored in this situation, may cause data loss: for example, if the contents of a sidebar are centered, when they overflow they may send part of their boxes past the viewport’s start edge, which can’t be scrolled to.
この状況を制御するため,~overflow時に~access不能な部分が生じる際の `~overflow整列@ ~mode( `overflow-position$t )を明示的に指定できる:
- “安全でない” 整列( `unsafe$v )は、指定された整列~modeを尊守する。
- “安全な” 整列( `safe$v )は、~overflowを避けるべく整列~modeを変更する。
- 既定の挙動【値を指定しなかった場合】では、`整列対象$を~scroll可能な区画の中に包含する — これを書いている時点では、この安全用の特色機能はまだ実装されていないが。
`overflow-position@t = `unsafe$v | `safe$v
- `safe@v
- `整列対象$の~sizeが`整列~容器$を~overflowする場合、`整列対象$は,整列~modeが `start$v であったかのように整列される。 ◎ If the size of the alignment subject overflows the alignment container, the alignment subject is instead aligned as if the alignment mode were start.
- `unsafe@v
- `整列対象$の[ `整列~容器$に対する相対的な~size ]に関わらず,所与の整列~値は尊守される。 ◎ Regardless of the relative sizes of the alignment subject and alignment container, the given alignment value is honored.
- (値が指定されていない場合) ◎ (no value specified)
-
`~overflow整列$が明示的に指定されていない場合の “既定の~mode” は、 `safe$v と `unsafe$v の融合になり,`整列対象$は:
- その`整列~容器$を~overflowすることは許容されるが、
- その最も近い先祖の`~scroll容器$の`~scroll可能な~overflow領域$も~overflowする(すなわち, “~scroll不能な” 領域まで拡がる)ことになる場合は、その方向における~overflowは,残りの~overflowを反対~側へ偏らせることにより制限される。
“賢い” 既定の挙動の実装は,~web互換に(そうなることを希望し,およそそうなると見込まれるが)ならないかもしれないので、~UAは,この点について何かあれば,WG まで~feedbackを寄せるべきである。 “賢い” 既定の挙動を実装していない~UAは、 `unsafe$v のように挙動することが要求される。 ◎ It may not be Web-compatible to implement the “smart” default behavior (though we hope so, and believe it to be likely), so UAs should pass any feedback on this point to the WG. UAs that have not implemented the “smart” default behavior must behave as unsafe.
下の例に、 `safe^v と `unsafe^v による中央寄せの相違を,~col~flexboxを利用して図示する: ◎ The figure below illustrates the difference in "safe" versus "unsafe" centering, using a column flexbox as an example:
5. 内容の分布: ~boxの中での内容の整列-法
内容-分布は、~boxの内容に対する内容~boxの中での整列を制御する。 それは、各種 `内容-分布~prop@ — `align-content$p, `justify-content$p (および,対応する `place-content$p 略式~prop)— により指定される。 ◎ Content-distribution controls alignment of the box’s content within its content box. It is specified by the content-distribution properties align-content and justify-content (and their place-content shorthand).
5.1. 内容の分布: `align-content^p, `justify-content^p ~prop
◎名 `align-content@p ◎値 `~normalJC$v | `baseline-position$t | `content-distribution$t | `overflow-position$t? `content-position$t ◎初 `~normalJC$v ◎適 `塊~容器$, `複柱~容器$, `~flex容器$, `格子~容器$ ◎ block containers, multicol containers, flex containers, and grid containers ◎継 されない ◎百 受容しない ◎算 指定値 ◎順 文法に従う ◎ア 不可 ◎表終 ◎名 `justify-content@p ◎値 `~normalJC$v | `content-distribution$t | `overflow-position$t? [ `content-position$t | `left$v | `right$v ] ◎初 `~normalJC$v ◎適 `複柱~容器$, `~flex容器$, `格子~容器$ ◎ multicol containers, flex containers, and grid containers ◎継 されない ◎百 受容しない ◎算 指定値 ◎順 文法に従う ◎ア 不可 ◎表終~box内容を,それ一体として(`整列対象$として) ~box自身(`整列~容器$)の中で,ある~~基準に整列させる:
- `justify-content$p に対しては、~boxの[ 行内/~row/主 ]軸~沿いに。
- `align-content$p に対しては、~boxの[ 塊/~col/交叉 ]軸~沿いに。
`~normalJC@v 以外の値は、`整列~keyword$ 節にて定義される。
◎ Aligns the contents of the box as a whole (as the alignment subject) within the box itself (as the alignment container): along the inline/row/main axis of the box (for justify-content) or the block/column/cross axis of the box (for align-content). Values other than normal are defined in §4 Alignment Keywords, above.どの~layout~modeにおいても,`整列対象$と`整列~容器$の`書字mode$は、これらの `*-content^p ~propが設定された~boxのそれと`見做す$。 ◎ For all layout modes, the alignment subject and alignment container both assume the writing mode of the box the *-content property is set on.
5.1.1. 塊~容器(~table~cellも含む)
- `整列~容器$
- `塊~容器$の内容~box。 ◎ The block container’s content box.
- `整列対象$(たち)
- 一体としての塊の内容。 ◎ The entire contents of the block, as a unit.
- `align-content$p 軸
- `塊-軸$。 `content-distribution$t が指定されている場合、代わりに その`~fallback整列$が利用される。 ◎ The block axis. If a <content-distribution> is specified its fallback alignment is used instead.
- `justify-content$p 軸
- ~propは適用されず,`塊~容器$に対する効果はない。 ただし、絶対位置された要素には影響する — 絶対位置された~boxの静的位置を見よ。 ◎ Does not apply to and has no effect on block containers except insofar as it affects absolutely-positioned elements, see §5.1.2 Static Position of Absolutely-Positioned Boxes.
- `~normalJC$v の挙動
- ~table~cellに対しては、 `vertical-align$p `CSS2$r の算出値に応じて,次と同じに挙動する ⇒# `top^v ならば `start$v / `middle^v ならば `center$v / `bottom^v ならば `end$v / ~ELSE_ `baseline$v ◎ All values other than normal force the block container to establish an independent formatting context. ◎ For table cells, the behavior of the normal depends on the computed value of vertical-align: top makes it behave as start, middle makes it behave as center, bottom makes it behave as end, and all other values make it behave as baseline. [CSS2]
- 他の塊~容器に対しては、 `start$v と同じに挙動する。 ◎ normal otherwise behaves as start.
- `~normalJC$v 以外のどの値も、塊~容器に`独立な整形~文脈を確立する$よう強制する。 ◎ ↑↑
5.1.2. 絶対位置された~boxの静的位置
絶対位置された要素~用の~layout規則( `CSS2$r による,[ 絶対位置された, 置換されない要素の横幅 / 絶対位置された, 置換される要素の横幅 ])を適用するときに[ 要素の`静的位置~用の包含塊$の `direction$p ~prop ]が参照される所では、代わりに,[[ `justify-content$p, `align-content$p ]~propのうち静的位置~用の包含塊の`行内-軸$に適用されるものと定義される方 ]の値を参照する — `~normalJC$v は `start$v に, `分布型の整列$を与える値は`~fallback整列$に扱う下で。 例えば、[ `direction$p は `ltr$v, `justify-content$p は `end^v ]にされているときは, `direction$p: `rtl^v 用の規則を適用する /[ `direction$p は `rtl$v, `justify-content$p は `space-between$v ]にされているときは, `direction$p: `rtl^v 用の規則を適用する,等々。 ◎ When applying the layout rules for absolutely-positioned elements (Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification §abs-non-replaced-width and Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification §abs-replaced-width) wherever the direction property of the static-position containing block is referenced, instead reference the value of its justify-content or align-content property (whichever is defined to apply to the static-position containing block’s inline axis), treating normal as start and any distributed alignment value as its fallback alignment. For example, when direction is ltr and justify-content is end, apply the rules for direction: rtl; when direction is rtl and justify-content is space-between, apply the rules for direction: rtl; etc.
【以下、この節の内容は未訳(原文には、まだ暗黙の情報が多過ぎて,はっきりしない部分が多い)。】 ◎ For the case of center (or its equivalent), split the difference: when both inset-inline-start and inset-inline-end (left and right in horizontal LTR writing modes) are auto, set each to its static position, and if the resulting “shrink-to-fit” inline size conflicts, re-solve the equation for inset-inline-end. ◎ Note: What this means is that, instead of always sizing an absolutely-positioned element within the available space between its inline-start static position and its inline-end containing block edge, the author can choose to instead use the space between its inline-start containing block edge and inline-end static position or between its inline-start and inline-end static positions by changing the static-position containing block’s content-distribution properties.
5.1.3. 複柱~容器
- `整列~容器$
- `複柱~容器$の内容~box。 ◎ The multi-column container’s content box.
- `整列対象$(たち)
- `柱~box$たち — それらの合間に挿入されたアキは、関連する`柱~gap$に追加される。 ◎ The column boxes, with any spacing inserted between column boxes added to the relevant column gaps.
- `align-content$p 軸
- `塊-軸$ — ここで、`柱~box$ (および `柱~spanning要素$)は, singular unit 【単独の単位?】として扱う。 `content-distribution$t が指定されている場合、代わりに その`~fallback整列$が利用される。 ◎ The block axis, treating the column boxes (and any column-spanning elements), as a singular unit. If a <content-distribution> is specified its fallback alignment is used instead.
- `justify-content$p 軸
- `行内-軸$。 ◎ The inline axis.
- `~normalJC$v の挙動
- `~stretchAC$v と同じに挙動する。 両者とも `CSS-MULTICOL-1$r の柱~sizing規則にて定義され,述べられている。 【その仕様には、これらの値については,それらしき言及は見当たらない。 複柱~容器の~sizingは、定義されているが。】 ◎ normal behaves as stretch; both are defined as described in the column-sizing rules of [CSS-MULTICOL-1].
- `column-width$p が非 `auto^v 値にされた`複柱~容器$に対しては、 `justify-content$p に `~normalJC$v, `~stretchJS$v 以外の値が指定された場合、`柱~box$は — 容器を埋めるように伸張されることなく — `column-width$p の指定値にされてから, `justify-content$p の指定値に従って整列される。 ◎ In the case of multi-column containers with a non-auto column-width, justify-content values other than normal or stretch cause the columns to take their specified column-width rather than stretching to fill the container. The column boxes are then aligned as specified by justify-content.
5.1.4. ~flex容器
- `整列~容器$
- `~flex容器$の内容~box。 ◎ The flex container’s content box.
- `整列対象$(たち)
- `justify-content$p に対しては、各`~flex~line$内の`~flex駒$たち。 ◎ For justify-content, the flex items in each flex line.
- `align-content$p に対しては、`~flex~line$たち。 これが効果を及ぼすのは、`複line$の`~flex容器$に限られることに注意。 ◎ For align-content, the flex lines. Note, this only has an effect on multi-line flex containers.
- `align-content$p 軸
- `交叉-軸$。 ◎ The cross axis.
- `justify-content$p 軸
- `justify-content$p ~propは`主-軸$沿いに適用されるが,`主-軸$における伸張-法は `flex$p ~propが制御するので、 `~stretchAC$v は `flex-start$v と同じに挙動する。 ◎ The justify-content property applies along the main axis, but since stretching in the main axis is controlled by flex, stretch behaves as flex-start.
- `~normalJC$v の挙動
- `~stretchAC$v と同じに挙動する。 ◎ normal behaves as stretch.
詳細は `CSS-FLEXBOX-1$r を見よ。 ◎ See [CSS-FLEXBOX-1] for details.
5.1.5. 格子~容器
- `整列~容器$
- `格子~容器$の内容~box。 ◎ The grid container’s content box.
- `整列対象$(たち)
- 適切な軸~沿いの`格子~筋$たちと,それらの合間に挿入された関連する`側溝$に追加されたアキ。 `畳まれた側溝$は、単独の空間~挿入~機会として扱われる。 ◎ The grid tracks in the appropriate axis, with any spacing inserted between tracks added to the relevant gutters, and treating collapsed gutters as a single opportunity for space insertion.
- `align-content$p 軸
- `塊-軸$(~col軸) — `格子~row$たちが整列される。 ◎ The block (column) axis, aligning the grid rows.
- `justify-content$p 軸
- `行内-軸$(~row軸) — `格子~col$たちが整列される。 ◎ The inline (row) axis, aligning the grid columns.
- `~normalJC$v の挙動
- `~stretchAC$v と同じに挙動する。 ◎ normal behaves as stretch.
詳細は `CSS-GRID-1$r を見よ。 ◎ See [CSS-GRID-1] for details.
5.2. 内容-分布 略式:`place-content$p ~prop
◎名 `place-content@p ◎値 `align-content$tp `justify-content$tp? ◎初 `~normalJC$v ◎適 `塊~容器$, `~flex容器$, `格子~容器$ ◎ block containers, flex containers, and grid containers ◎継 されない ◎百 受容しない ◎算 個々の~propを見よ ◎順 文法に従う ◎ア 不可 ◎表終この`略式~prop$は、 `align-content$p, `justify-content$p 両~propを単独の宣言で設定する。 2 個の値は、順に前者, 後者の~propにあてがわれる。 2 個目の値が省略された場合、後者の~propには[ 1 個目の値が `baseline-position$t ならば `start$v / ~ELSE_ 1 個目の値 ]があてがわれる。 ◎ This shorthand property sets both the align-content and justify-content properties in one declaration. The first value is assigned to align-content. The second value is assigned to justify-content; if omitted, it is copied from the first value, unless that value is a <baseline-position> in which case it is defaulted to start.
5.3. ~overflowと~scroll位置
`~scroll容器$を~overflowする内容は、~scroll可能でない容器~内の内容と正確に同じ様に整列される。 しかしながら,`~scroll容器$上に`内容-分布~prop$が設定されたときは — 内容が~scroll不能な領域の中へズラされるのを防止するため — 容器の`~scroll可能な~overflow領域$の~zero座標(すなわち、その地点を超えた内容は,到達-不能になる)は,`整列対象$の左上隅に設定され、実質的に`初期~scroll位置$は変更される。 ◎ Content that overflows a scroll container is aligned exactly like content in a non-scrollable container. However, to prevent content from being shifted into the unscrollable region, when the content-distribution properties are set on a scroll container, the zero coordinate of its scrollable overflow region (that is, the point beyond which content is unreachable) is set to the top left corner of the alignment subject, effectively changing the initial scroll position.
例えば、~scroll可能な`~flex容器$の `justify-content$p が `flex-end^v (あるいは, `flex-flow$p が `row-reverse$v にされている下では `flex-start^v )に設定されている場合、初期~時には,~scroll可能な区画の`主-終端$~辺まで~scrollされて表示されることになり、容器の内容は,容器の`主-始端$を~overflowする。 ◎ For example, if a scrollable flex container is set to justify-content: flex-end (or justify-content: flex-start with flex-flow: row-reverse), it will be initially displayed scrolled all the way to the main-end edge of the scrollable area, and its content will appear to overflow its main-start edge.
5.4. 基底線による内容-整列
~rowを連ねる様な~layout文脈に関与している(同じ`整列~文脈$を共有する)~boxたちの内容は、互いに基底線整列できる。 `基底線による内容-整列@ は、それらが属する`基底線共有~group$内の,各~boxの内容の`整列~基底線$を互いに整列するときに、実質的に~boxの~paddingを増やす。 ◎ The content of boxes participating in row-like layout contexts (shared alignment contexts) can be baseline-aligned to each other. Baseline content-alignment effectively increases the padding on the box to align the alignment baseline of its contents with that of other baseline-aligned boxes in its baseline-sharing group.
最初最後の`基底線による内容-整列$に関与する~boxたちの集合は、~layout~modelに依存する(以下, “/” は同順): ◎ The set of boxes that participate in baseline content-alignment depends on the layout model:
- ~table~cell:◎ Table Cells:
-
次をいずれも満たすような~table~cellたち:
- ~spanする最も[ 始端/終端 ]側の~rowは、互いに同じである
- ~cellの`行内-軸$は~tableのそれと平行である
- `align-content$p の算出値は[ `first baseline$v / `last baseline$v ]
- 注記: 同じ~colを共有する~cellどうしの`基底線による内容-整列$は、~supportされない。 しかしながら,将来~levelでは、十分な需要と実装者からの関心があれば,追加され得る。 ◎ Note: Baseline content-alignment of cells sharing a column is not supported; however this may be added in a future level if there is sufficient demand and implementer interest.
- `~flex駒$:
-
次をいずれも満たすような`~flex駒$たち:
- 互いに同じ`~flex~line$内にある
- `align-content$p の算出値は[ `first baseline$v / `last baseline$v ]
- `行内-軸$は`主-軸$に平行である
- `格子~駒$:
-
次をいずれも満たすような`格子~駒$たち:
- ~spanする最も[ 始端/終端 ]側の`格子~筋$ — `行内-軸$に平行な方 — は、互いに同じである
- `align-content$p の算出値は[ `first baseline$v / `last baseline$v ]
加えて,ある軸において~boxに`自己-整列$が適用される場合、~boxがその軸における`基底線による内容-整列$に関与するためには、【基底線による内容-整列と】~boxの `自己-整列~選好は協調して@ い~MUST — すなわち,~boxは、その軸に関連する`自己-整列~prop$ %P に関して,次を満たしてい~MUST: ◎ Additionally, if self-alignment applies to the box in an axis, in order to participate in baseline content-alignment in that axis it must also have a coordinated self-alignment preference; that is:
- %P の算出値は、~boxの`基底線~整列~選好$に応じて[ `first^v ならば `stretch^v か `self-start$v / `last^v ならば `stretch^v か `self-end$v ]である — ただし,この目的においては、値[ `start$v / `end$v / `flex-start$v / `flex-end$v ]は[ `self-start$v, `self-end$v ]のうち等価になる方を与えているものと扱われる。 ◎ If its baseline alignment preference is “first” (“last”), the relevant computed self-alignment property is either 'align-self/stretch or self-start (self-end''). For this purpose, the start, end, flex-start, and flex-end values are treated as either self-start or self-end, whichever they end up equivalent to.
- %P の使用値は、~boxの`~overflow整列$により影響されない(すなわち, %P の使用値は、`~overflow整列$が `unsafe$v であるときに得られる結果になる)。 ◎ Its used self-alignment is not affected by its overflow alignment. (That is, the used self-alignment is what would result from an unsafe overflow alignment.)
他の場合、~boxの`~fallback整列$を採るものとする。 ◎ It otherwise takes its fallback alignment.
正確な詳細は、`基底線による~boxたちの整列-法$を見よ。 `基底線による内容-整列$は、~boxの内在的~sizeを増やすこともある。 ◎ See §9.3 Aligning Boxes by Baseline for exact details. Baseline content-alignment can increase the intrinsic size of the box.
6. 自己-整列: 親の中における ~boxの整列-法
自己-整列は、~boxの`包含塊$の中における,~boxの整列を制御する。 それは、各種 `自己-整列~prop@ — `align-self$p / `justify-self$p (および,対応する `place-self$p 略式~prop)— により指定される。 ◎ Self-alignment controls alignment of the box within its containing block. It is specified by the self-alignment properties align-self and justify-self (and their place-self shorthand).
6.1. 行内-軸/主-軸 沿いの整列: `justify-self^p ~prop
◎名 `justify-self@p ◎値 `auto$v | `~normalJS$v | `~stretchJS$v | `baseline-position$t | `overflow-position$t? [ `self-position$t | `left$v | `right$v ] ◎初 `auto^v ◎適 `塊level$の~box, 絶対位置された~box, `格子~駒$ ◎ block-level boxes, absolutely-positioned boxes, and grid items ◎継 されない ◎百 受容しない ◎算 指定値 ◎順 文法に従う ◎ア 不可 ◎表終~box(`整列対象$)を その包含塊(`整列~容器$)の中で `整列~容器$の[ `行内-軸$/~row軸/`主-軸$ ]沿いに,両端揃えにする — すなわち,~boxの`外縁~辺$は、`整列~容器$の中で,`整列~keyword$ 節にて述べたように整列される。 各種~値の意味は: ◎ Justifies the box (as the alignment subject) within its containing block (as the alignment container) along the inline/row/main axis of the alignment container: the box’s outer edges are aligned within its alignment container as described by its alignment value. Values have the following meanings:
- `auto@v
- [ 親がない~boxに対しては / 絶対位置された~boxの実際の位置を決定するときは ] `~normalJS$v と同じに挙動する。 他の場合(絶対位置された~boxの静的位置を決定するときも含め)、親~boxの `justify-items$p の算出値(から `legacy$v ~keywordを(もし在れば)除いたもの)と同じに挙動する。 ◎ Behaves as normal if the box has no parent, or when determining the actual position of an absolutely positioned box. It behaves as the computed justify-items value of the parent box (minus any legacy keywords) otherwise (including when determining the static position of an absolutely positioned box).
- `~normalJS@v
- ~layout~modeに対する “既定の” 整列を表現する。 その挙動は、下に述べるように,~layout~modeに依存する。 ◎ Represents the “default” alignment for the layout mode. Its behavior depends on the layout mode, as described below.
- `~stretchJS@v
-
対象の軸に応じて:
- 横方向の場合
-
[ ~boxの `width$p の算出値は `auto^v ], かつ[ ~boxの `margin-left^p, `margin-right^p とも非 `~autoS$v ]ならば、~boxの使用~sizeを,次のように設定する:
- `min-width$p, `max-width$p により課される拘束は守りつつ、
- ~boxの外縁~size(横幅)は,`整列~容器$を埋めるに必要とされる長さに可能な限り近くする
- 縦方向の場合
- [ `height$p, `margin-top^p, `margin-bottom^p, `min-height$p, `max-height$p, 縦幅 ]に関して,横方向の場合と同様とする。
- この値に対する既定の`~fallback整列$は、一般には `flex-start$v とするが,`基底線~整列~選好$として[ `最初の基底線~集合$ / `最後の基底線~集合$ ]も~boxに指定されている場合は[ `self-start$v / `self-end$v ]とする。 ◎ Unless otherwise specified, this value falls back to flex-start generally, and to self-start or self-end if the box has also specified first baseline or last baseline baseline content-alignment (respectively) in the same axis.
- 注記: `~stretchJS$v ~keywordは、要素を その容器に収まるように縮短させる。 ◎ Note: The stretch keyword can cause elements to shrink, to fit their container.
- `baseline-position$t
- `基底線による自己-整列$を指示する — 次に挙げる各節に定義されるように: 基底線の整列~値, 基底線による自己-整列, 基底線~整列の詳細 ◎ Indicates baseline self-alignment, as defined in §4.2 Baseline Alignment: the baseline keyword and first/last modifiers, §6.4 Baseline Self-Alignment, and §9 Baseline Alignment Details.
- `overflow-position$t? `self-position$t
- `整列~keyword$ 節にて定義される。 ◎ Defined in §4 Alignment Keywords, above.
`~stretchJS$v 以外の値は、 `width$p/`height$p に対する値 `~autoS$v が `fit-content^v として扱われるようにする。 ◎ Values other than stretch cause a width/height of auto to be treated as fit-content.
注記: ~marginに対する `auto^v は、実質的に~margin区画の~sizeを調整するので, `justify-self$p より優先される。 ◎ Note: auto margins, because they effectively adjust the size of the margin area, take precedence over justify-self.
6.1.1. 塊level~box
- `justify-self$p 軸
- 塊の`包含塊$の`行内-軸$。 ◎ The block’s containing block’s inline axis.
- `整列~容器$
- 塊の`包含塊$。 ただし、[ 塊level, かつ `塊~整形~文脈$を確立する, かつ 浮動体の側方に配置される ]ような要素に対しては、`整列~容器$は,その浮動体が占めている空間だけ差し引かれる — その`書字mode$は 包含塊のそれと`見做して$。 ◎ The block’s containing block, except that for block-level elements that establish a block formatting context and are placed next to a float, the alignment container is reduced by the space taken up by the float, assuming the writing mode of the containing block.
- `整列対象$
- 塊の~margin~box — その`書字mode$は 塊のそれと`見做して$。 ◎ The block’s margin box, assuming the writing mode of the block.
- `~normalJS$v の挙動
- `~stretchJS$v と同じに挙動する。 ◎ Behaves as stretch.
- その他の詳細
- `CSS2$r による塊levelの整形の用語で述べるなら、 10.3.3 節 の “拘束過多時” に対する算出~規則は、ここに指定される整列のふるまいにより~~上書きされるので、拘束過多を正すために各種~margin~propの使用値が調整されることはない。 ◎ In terms of CSS2.1 block-level formatting [CSS2], the rules for “over-constrained” computations in section 10.3.3 are ignored in favor of alignment as specified here and the used value of the margin properties are therefore not adjusted to correct for the over-constraint.
- この~propは、浮動体には適用されない。 ◎ This property does not apply to floats.
これらの規則の効果により、例えば,[ ~sizeが `auto^v にされている`塊level$の~table ]を,その両~側の~marginを依然として持たせつつ整列できる。 ~tableの`最大-内容~size$が、その`包含塊$より:
- 狭小ならば、~tableは その~sizeきっちりに包装され,指定されたように整列される。
- 幅広ならば、その包含塊を埋めた上で、各~marginは,`包含塊$の各~辺から適切なアキを供する。
6.1.2. 絶対位置された~box
この節では、[ 静的に位置されていない,絶対位置された~box ]の~margin~boxを,~boxの(絶対位置決め用の)包含塊を基準にどう位置させるかに関する, `justify-self$p による効果を述べる。 ◎ This section describes the effect of justify-self on how the margin box of an absolutely-positioned box which is not statically-positioned is positioned with respect to its (absolute-positioning) containing block.
- `justify-self$p 軸
- 塊の包含塊の`行内-軸$。 ◎ The block’s containing block’s inline axis.
- `整列~容器$
- ~boxの`包含塊$を各種`~inset~prop$により改変して得られる矩形 — その`書字mode$は 包含塊のそれと`見做して$。 ◎ The box’s containing block, as modified by the inset properties (top/right/bottom/left), assuming the writing mode of the containing block.
- `整列対象$
- ~boxの~margin~box — その`書字mode$は ~boxのそれと`見做して$。 ◎ The box’s margin box, assuming the writing mode of the box.
- `~normalJS$v の挙動
- `置換され$る絶対位置された~boxに対しては、 `start$v と同じに挙動する。 ◎ For replaced absolutely-positioned boxes, the normal keyword behaves as start.
- 他の絶対位置された~boxに対しては、 `~stretchJS$v と同じに挙動する。 加えて、この軸における両`~inset~prop$とも `~auto1$v でない, かつ[ 横組の下では `width$p / 縦組の下では `height$p ]は `~autoS$v にされている場合、~marginに対する `auto^v は, 0 に扱われる。 ◎ For all other absolutely-positioned boxes, normal behaves as stretch. Additionally, if neither inset in this axis is auto, but width (height, for vertical writing modes) is auto, auto margins are treated as zero.
- (非 `normal^v の事例では、~marginに対する `auto^v は,通例通り`自己-整列~prop$より優先されることに注意。) ◎ (In non-normal cases, auto margins are prioritized over the self-alignment properties, as usual.)
- 注記: この,いくぶん奇妙な挙動は、 CSS 2.1 に指定される挙動と互換にするために要求される。 ◎ Note: This somewhat bizarre behavior is required for compat with the behavior specified in CSS 2.1.
- その他の詳細
- `CSS2$r による整形の用語で述べるなら、 10.3.7 節 の “拘束過多時” に対する算出~規則は、ここに指定される整列のふるまいにより~~上書きされ、拘束過多を正すために各種`~inset~prop$の使用値が調整されることはない。 ◎ In terms of CSS2.1 formatting [CSS2], the rules for “over-constrained” computations in section 10.3.7 are ignored in favor of alignment as specified here, and the used value of the inset properties are not adjusted to correct for the over-constraint.
- `~stretchJS$v, `~normalJS$v 以外の値は、 絶対位置された置換されない~box の影響される軸における~sizeに対する `~autoS$v の計算-法に,`内容収納~sizing$を利用させる。 ◎ Values other than stretch or normal cause non-replaced absolutely-positioned boxes to use fit-content sizing for calculating auto sizes in the affected axis.
- 絶対位置された`置換され$る~boxに対する `~stretchJS$v は、[ 置換されないそれ のように伸張して包含塊を埋める ]ことはないことに注意。 ◎ Note that stretch does cause replaced absolutely-positioned boxes to fill their containing block just as non-replaced ones do.
- この軸~沿いのいずれかの`~inset~prop$が `~auto1$v にされている場合、 `justify-self$p による効果はない。 (片方だけ `~auto1$v にされている場合,~boxの~sizeと位置は CSS2, 10.3.7 節 に従って決定され、両方とも `~auto1$v にされている場合,~boxは静的に位置される — 絶対位置された~boxの静的位置 を見よ。) ◎ If either inset property in this dimension is auto, justify-self has no effect. (If only one inset property is auto, the computations in CSS2 section 10.3.7 determine its size and position; if both are auto, then the box is statically-positioned, see §6.1.3 Static Position of Absolutely-Positioned Boxes.)
6.1.3. 絶対位置された~boxの静的位置
この節では、[ 静的に位置されている,絶対位置された~box ]の~margin~boxを,~boxの`静的位置~用の矩形$を基準にどう位置させるかに関する, `justify-self$p による効果を述べる。 ◎ This section describes the effect of justify-self on how the margin box of an absolutely-positioned box which is statically-positioned is positioned with respect to its static-position rectangle.
- `justify-self$p 軸
- ~boxの親~boxの[ 行内/~row/主 ]軸。 ◎ The inline/row/main axis of the box’s parent box.
- `整列~容器$
- ~boxの親の~layout~modeにより定義される,~boxの`静的位置~用の矩形$ — その`書字mode$は 静的位置 `包含塊$のそれと`見做して$。 ◎ The box’s static-position rectangle, as defined by its parent box’s layout mode, assuming the writing mode of the static-position containing block.
- `整列対象$
- ~boxを~lay-outした後の,~boxの~margin~box — この~boxは、整列の目的においては,固定~sizeとして扱われる — その`書字mode$は ~boxのそれと`見做して$。 ◎ The box’s margin box after laying out the box, treated as fixed-size for the purpose of alignment, assuming the writing mode of the box.
- `~normalJS$v の挙動
- `flex-start$v と同じ挙動(固定~sizeの~boxに対する `~stretchJS$v に対する~fallback)になる。 ◎ Behaves as flex-start (the fallback of stretch for fixed-size boxes).
6.1.4. ~table~cell
この~propは、~table~cellには適用されない — その位置と~sizeは、全面的に~table~layoutにより拘束されるので。 ◎ This property does not apply to table cells, because their position and size is fully constrained by table layout.
6.1.5. ~flex駒
この~propは、 `~flex駒$には適用されない — `主-軸$にあり得る駒~数は~~不定なので。 `主-軸$ 整列における伸張-法と `justify-content$p については、 `flex$p を見よ `CSS-FLEXBOX-1$r ◎ This property does not apply to flex items, because there is more than one item in the main axis. See flex for stretching and justify-content for main-axis alignment. [CSS-FLEXBOX-1]
6.1.6. 格子~駒
- `justify-self$p 軸
- 格子の`行内-軸$(~row軸)。 ◎ The grid’s row axis (inline axis).
- `整列~容器$
- `格子~駒$の`格子~区画$ — その`書字mode$は 格子~駒が属する`格子~容器$のそれと`見做して$。 ◎ The grid item’s grid area, assuming the writing mode of the grid container.
- `整列対象$
- `格子~駒$の~margin~box — その`書字mode$は 格子~駒のそれと`見做して$。 ◎ The grid item’s margin box, assuming the writing mode of the grid item.
- `~normalJS$v の挙動
- 内在的~縦横比を[ 伴わない / 伴う ]駒に対しては、実質的に[ `~stretchJS$v / `start$v ]になる。 `CSS-GRID-1$r による`格子~駒の~sizing$を見よ。 結果の~boxは 始端に整列される。 ◎ Effectively stretch for items with no intrinsic aspect ratio, and start for items with an intrinsic aspect ratio: see Grid Item Sizing in [CSS-GRID-1]. The resulting box is start-aligned.
詳細は `CSS-GRID-1$r を見よ。 ◎ See [CSS-GRID-1] for details.
6.2. 塊-軸/交叉-軸 沿いの整列: `align-self^p ~prop
◎名 `align-self@p ◎値 `auto$v | `~normalAS$v | `~stretchAS$v | `baseline-position$t | `overflow-position$t? `self-position$t ◎初 `auto^v ◎適 `~flex駒$, `格子~駒$, 絶対位置された~box ◎ flex items, grid items, and absolutely-positioned boxes ◎継 されない ◎百 受容しない ◎算 指定値 ◎順 文法に従う ◎ア 不可 ◎表終~box(`整列対象$)を その包含塊(`整列~容器$)の中で `整列~容器$の[ `塊-軸$/~col軸/`交叉-軸$ ]沿いに整列する: `整列~keyword$ 節に述べたように、~boxの`外縁~辺$が,その`整列~容器$の中で整列される。 各種~値の意味は: ◎ Aligns the box (as the alignment subject) within its containing block (as the alignment container) along the block/column/cross axis of the alignment container: the box’s outer edges are aligned within its alignment container as described by its alignment value. Values have the following meanings:
- `auto@v
- [ 親がない~boxに対しては / 絶対位置された~boxの実際の位置を決定するときは ] `~normalAS$v と同じに挙動する。 他の場合(絶対位置された~boxの静的位置を決定するときも含め)、親~boxの `align-items$p の算出値(から `legacy$v ~keywordを(もし在れば)除いたもの)と同じに挙動する。 ◎ Behaves as normal if the box has no parent, or when determining the actual position of an absolutely positioned box. It behaves as the computed align-items value of the parent box (minus any legacy keywords) otherwise (including when determining the static position of an absolutely positioned box).
- `~normalAS@v
- 下に定義されるように,~layout~modeに対する “既定の” 整列を表現する。 ◎ Represents the “default” alignment for the layout mode, as defined below.
- `~stretchAS@v
- `justify-self$p ( 行内-軸/主-軸の整列 節)に対するときと同じに定義される。 ◎ As defined for justify-self in §6.1 Inline/Main-Axis Alignment: the justify-self property.
- `baseline-position$t
- `基底線による自己-整列$を指示する — 次に挙げる各節に定義されるように: 基底線の整列~値, 基底線による自己-整列, 基底線~整列の詳細 ◎ Indicates baseline self-alignment, as defined in §4.2 Baseline Alignment: the baseline keyword and first/last modifiers, §6.4 Baseline Self-Alignment, and §9 Baseline Alignment Details.
- `overflow-position$t? `self-position$t
- `整列~keyword$ 節にて定義される。 ◎ Defined in §4 Alignment Keywords, above.
注記: ~marginに対する `auto^v は、実質的に~margin区画の~sizeを調整するので, `align-self$p より優先される。 ◎ Note: auto margins, because they effectively adjust the size of the margin area, take precedence over align-self.
6.2.1. 塊level~box
`align-self$p ~propは、`塊level$の~box(浮動体も含めて)には適用されない — `塊-軸$にあり得る駒~数は~~不定なので。 ◎ The align-self property does not apply to block-level boxes (including floats), because there is more than one item in the block axis.
6.2.2. 絶対位置された~box
この節では、[ 静的に位置されていない,絶対位置された~box ]の~margin~boxを,~boxの(絶対位置決め用の)包含塊を基準にどう位置させるかに関する, `align-self$p による効果を述べる。 ◎ This section describes the effect of align-self on how the margin box of an absolutely-positioned box which is not statically-positioned is positioned with respect to its (absolute-positioning) containing block.
- `align-self$p 軸
- ~boxの`包含塊$の`塊-軸$。 ◎ The box’s containing block’s block axis.
- `整列~容器$
- 各種`~inset~prop$で改変された,~boxの`包含塊$ — その`書字mode$は 包含塊のそれと`見做して$。 ◎ The box’s containing block, as modified by the inset properties (top/right/bottom/left), assuming the writing mode of the containing block.
- `整列対象$
- ~boxの~margin~box — その`書字mode$は ~boxのそれと`見做して$。 ◎ The box’s margin box, assuming the writing mode of the box.
- `~normalAS$v の挙動
- 絶対位置された`置換され$る~boxに対しては、 `start$v と同じに挙動する。 ◎ For replaced absolutely-positioned boxes, the normal keyword behaves as start.
- 他の絶対位置された~boxに対しては、 `~stretchAS$v と同じに挙動する。 加えて、この軸における両`~inset~prop$とも `~auto1$v でない, かつ[ 横組の下では `width$p / 縦組の下では `height$p ]は `~autoS$v にされている場合、~marginに対する `auto^v は, 0 に扱われる。 ◎ For all other absolutely-positioned boxes, normal behaves as stretch. Additionally, if neither inset in this axis is auto, but width (height, for vertical writing modes) is auto, auto margins are treated as zero.
- (非 `normal^v の事例では、~marginに対する `auto^v は,通例通り`自己-整列~prop$より優先されることに注意。) ◎ (In non-normal cases, auto margins are prioritized over the self-alignment properties, as usual.)
- 注記: この,いくぶん奇妙な挙動は、 CSS 2.1 に指定される挙動と互換にするために要求される。 ◎ Note: This somewhat bizarre behavior is required for compat with the behavior specified in CSS 2.1.
- その他の詳細
- `CSS2$r による整形の用語で述べるなら、 10.6.4 節 の “拘束過多時” 対する算出~規則は、ここに指定される整列のふるまいにより~~上書きされ、拘束過多を正すために各種`~inset~prop$の使用値が調整されることはない。 ◎ In terms of CSS2.1 formatting [CSS2], the rules for "over-constrained" computations in section 10.6.4 are ignored in favor of alignment as specified here and the used value of the inset properties are not adjusted to correct for the over-constraint.
- `~stretchAS$v, `~normalAS$v 以外の値は、 絶対位置された置換されない~box の影響される軸における~sizeに対する `~autoS$v の計算-法に,`内容収納~sizing$を利用させる。 ◎ Values other than stretch or normal cause non-replaced absolutely-positioned boxes to use fit-content sizing for calculating auto sizes in the affected axis.
- 絶対位置された`置換され$る~boxに対する `~stretchJS$v は、[ 置換されないそれ に対するときのように伸張して包含塊を埋める ]ことはないことに注意。 ◎ Note that stretch does cause replaced absolutely-positioned boxes to fill their containing block just as non-replaced ones do.
- この軸~沿いのいずれかの`~inset~prop$が `~auto1$v にされている場合、 `align-self$p による効果はない。 (片方だけ `~auto1$v にされている場合,~boxの~sizeと位置は CSS2, 10.6.4 節 に従って決定され、両方とも `~auto1$v にされている場合,~boxは静的に位置される — 絶対位置された~boxの静的位置 を見よ。) ◎ If either inset property in this dimension is auto, align-self has no effect. (If only one inset property is auto, the computations in CSS2 section 10.6.4 determine its size and position; if both are auto, then the box is statically-positioned, see §6.2.3 Static Position of Absolutely-Positioned Boxes.)
6.2.3. 絶対位置された~boxの静的位置
この節では、[ 静的に位置されている,絶対位置された~box ]の~margin~boxを,~boxの`静的位置~用の矩形$を基準にどう位置させるかに関する, `align-self$p による効果を述べる。 ◎ This section describes the effect of align-self on how the margin box of an absolutely-positioned box which is statically-positioned is positioned with respect to its static-position rectangle.
- `align-self$p 軸
- ~boxの親~boxの[ 塊/~col/交叉 ]軸。 ◎ The block/column/cross axis of the box’s parent box.
- `整列~容器$
- 親~boxの~layout~modeにより定義される,~boxの`静的位置~用の矩形$ — その`書字mode$は `静的位置~用の包含塊$のそれと`見做して$。 ◎ The box’s static-position rectangle, as defined by its parent box’s layout mode, assuming the writing mode of the static-position containing block.
- `整列対象$
- ~boxを~lay-outした後の,~boxの~margin~box — この~boxは、整列の目的においては 固定~sizeとして扱われる — その`書字mode$は ~boxのそれと`見做して$。 ◎ The box’s margin box after laying out the box, treated as fixed-size for the purpose of alignment, assuming the writing mode of the box.
- `~normalAS$v の挙動
- `flex-start$v と同じ挙動(固定~sizeの~boxに対する `~stretchAS$v に対する~fallback)になる。 ◎ Behaves as flex-start (the fallback of stretch for fixed-size boxes).
6.2.4. ~table~cell
この~propは、~table~cellには適用されない — その位置と~sizeは、全面的に~table~layoutにより拘束されるので。 ◎ This property does not apply to table cells, because their position and size is fully constrained by table layout.
6.2.5. ~flex駒
- `align-self$p 軸
- `~flex容器$の`交叉-軸$。 ◎ The flex container’s cross axis.
- `整列~容器$
- `~flex駒$が属する`~flex~line$ — その`書字mode$は ~flex駒が属する`~flex容器$のそれと`見做して$。 ◎ The flex line the flex item is in, assuming the writing mode of the flex container.
- `整列対象$
- `~flex駒$の~margin~box — その`書字mode$は ~flex駒のそれと`見做して$。 ◎ The flex item’s margin box, assuming the writing mode of the flex item.
- `~normalAS$v の挙動
- `~stretchAS$v と同じに挙動する。 ◎ Behaves as stretch.
詳細は `CSS-FLEXBOX-1$r を見よ。 ◎ See [CSS-FLEXBOX-1] for details.
6.2.6. 格子~駒
- `align-self$p 軸
- 格子の`塊-軸$(~col軸)。 ◎ The grid’s column axis (block axis).
- `整列~容器$
- `格子~駒$の`格子~区画$ — その`書字mode$は 格子~駒が属する`格子~容器$のそれと`見做して$。 ◎ The grid item’s grid area, assuming the writing mode of the grid container.
- `整列対象$
- `格子~駒$の~margin~box — その`書字mode$は 格子~駒のそれと`見做して$。 ◎ The grid item’s margin box, assuming the writing mode of the grid item.
- `~normalAS$v の挙動
- `置換され$ない駒に対しては `~stretchAS$v と同じに挙動する。 `置換され$る駒に対しては `CSS-GRID-1$r による`格子~駒の~sizing$を見よ。 ◎ Behaves as stretch for non-replaced items. For replaced items, see Grid Item Sizing in [CSS-GRID-1].
6.3. 自己-整列: `place-self^p 略式~prop
◎名 `place-self@p ◎値 `align-self$tp `justify-self$tp? ◎初 `auto^v ◎適 `塊level$の~box, 絶対位置された~box, `格子~駒$ ◎ block-level boxes, absolutely-positioned boxes, and grid items ◎継 されない ◎百 受容しない ◎算 個々の~propを見よ ◎順 文法に従う ◎ア 不可 ◎表終この`略式~prop$は、 `align-self$p, `justify-self$p 両~propを単独の宣言で設定する。 値が 1 個だけ与えられた場合は,その値が両~propにあてがわれ、 2 個~与えられた場合は, 2 個目の値が後者の~propにあてがわれる。 ◎ This shorthand property sets both the align-self and justify-self properties in a single declaration. The first value is assigned to align-self. The second value is assigned to justify-self; if omitted, it is copied from the first value.
6.4. 基底線による自己-整列
~rowを連ねる様な~layout文脈に関与している(同じ`整列~文脈$を共有する)~boxたちは、互いを基底線整列できる。 `基底線による自己-整列@ は、同じ`基底線共有~group$に属する各~boxの内容の`整列~基底線$を互いに整列するため、実質的に,それらの~boxの~marginを増やす。 ◎ Boxes participating in row-like layout contexts (shared alignment contexts) can be baseline-aligned to each other. baseline self-alignment effectively increases the margins on the box to align its alignment baseline with that of other baseline-aligned boxes in its baseline-sharing group.
最初最後の`基底線による自己-整列$に関与する~boxたちの集合は、~layout~modelに依存する(以下, “/” は同順): ◎ The set of boxes that participate in baseline self-alignment depends on the layout model:
- `~flex駒$:
-
次をいずれも満たすような`~flex駒$たち:
- 互いに同じ`~flex~line$内にある
- `align-self$p ~propの算出値は[ `first baseline$v / `last baseline$v ]
詳細は `CSS-FLEXBOX-1$r を見よ。
◎ A flex item participates in first (last) baseline self-alignment in its flex line if its computed align-self is first baseline (last baseline). See [CSS-FLEXBOX-1] for details. - `格子~駒$:
-
次をいずれも満たすような`格子~駒$たち:
- ~spanする最も[ 始端/終端 ]側の`格子~row$は、互いに同じである
- `align-self$p ~propの算出値は[ `first baseline$v / `last baseline$v ]
-
次をいずれも満たすような`格子~駒$たち:
- ~spanする最も[ 始端/終端 ]側の`格子~col$は、互いに同じである
- `justify-self$p ~propの算出値は[ `first baseline$v / `last baseline$v ]
正確な詳細は、`基底線による~boxたちの整列-法$を見よ。 `基底線による自己-整列$は、~boxが供与する内在的~sizeを増やすこともある。 ◎ See §9.3 Aligning Boxes by Baseline for exact details. Baseline self-alignment can increase the intrinsic size contribution of the box.
7. 既定の整列
`align-items$p / `justify-items$p ~prop(および, `place-items$p 略式~prop)は、要素の各~子~boxに対する既定の `align-self$p / `justify-self$p の挙動を設定する。 ◎ The align-items and justify-items properties (and their place-items shorthand) set the default align-self and justify-self behavior of the element’s child boxes.
7.1. 行内-軸/主-軸 沿いの整列: `justify-items^p ~prop
◎名 `justify-items@p ◎値 `normal^v | `stretch^v | `baseline-position$t | `overflow-position$t? [ `self-position$t | `left$v | `right$v ] | `legacy$v | `legacy$v && [ `left$v | `right$v | `center$v ] ◎初 `legacy^v ◎適 すべての要素 ◎継 されない ◎百 受容しない ◎算 指定値 — ただし `legacy^v は除く(注釈文を見よ) ◎ specified value, except for legacy (see prose) ◎順 文法に従う ◎ア 不可 ◎表終この~propは、この~boxの整形~文脈に関与している すべての子~boxたち(匿名~boxも含む)に対する,既定の `justify-self$p を指定する。 各種~値の意味は: ◎ This property specifies the default justify-self for all of the child boxes (including anonymous boxes) participating in this box’s formatting context. Values have the following meanings:
- `legacy@v
- この~keywordは、実質的に,値を子孫の中へ継承させる。 ◎ This keyword causes the value to effectively inherit into descendants.
- この~keywordが[ `left$v / `right$v / `center$v ]~keywordを伴わずに現れた場合、算出値は,[ `justify-items$p の`継承値$が `legacy$v ~keywordを含むならば 継承値 / 他の場合は `normal^v ]になる。 ◎ If the legacy keyword appears on its own (without an accompanying left, right, or center keyword): if the inherited value of justify-items includes the legacy keyword, this value computes to the inherited value; otherwise it computes to normal.
- 他の場合、 `justify-self$p: `auto^v にされた子は,[ `justify-items$p の値から `legacy$v ~keywordを除いた,整列~keyword ]のみを参照する。 これは、[ ~HTMLの[ `center^e 要素/ `align^a 属性 ]による,旧来の整列の挙動 ]を実装するために存在する。 ◎ When justify-self:auto references the value of justify-items, only the alignment keyword, not the legacy keyword, is referenced by it. It exists to implement the legacy alignment behavior of HTML’s <center> element and align attribute.
他の値は、特別に取扱われることなく,そのまま `justify-self$p から参照される。 ◎ Other values have no special handling and are merely referenced by justify-self.
7.2. 塊-軸/交叉-軸 沿いの整列: `align-items^p ~prop
◎名 `align-items@p ◎値 `normal^v | `~stretchJS$v | `baseline-position$t | [ `overflow-position$t? `self-position$t ] ◎初 `normal^v ◎適 すべての要素 ◎継 されない ◎百 受容しない ◎算 指定値 ◎順 文法に従う ◎ア 不可 ◎表終この~propは、この~boxの整形~文脈に関与している すべての子~boxたち(匿名~boxも含む)に対する,既定の `align-self$p を指定する。 ◎ This property specifies the default align-self for all of the child boxes (including anonymous boxes) participating in this box’s formatting context.
この~propの値は、特別に取扱われることなく,そのまま `align-self$p から参照される。 ◎ Values have no special handling and are merely referenced by align-self.
7.3. 自己-整列: `place-items$p 略式~prop
◎名 `place-items@p ◎値 `align-items$tp `justify-items$tp? ◎初 個々の~propを見よ ◎適 すべての要素 ◎継 されない ◎百 受容しない ◎算 個々の~propを見よ ◎順 文法に従う ◎ア 不可 ◎表終この`略式~prop$は、 `align-items$p, `justify-items$p 両~propを単独の宣言で設定する。 値が 1 個だけ与えられた場合は,その値が両~propにあてがわれ、 2 個~与えられた場合は, 2 個目の値が後者の~propにあてがわれる。 ◎ This shorthand property sets both the align-items and justify-items properties in a single declaration. The first value is assigned to align-items. The second value is assigned to justify-items; if omitted, it is copied from the first value.
8. ~box間の~gap
`margin$p / `padding$p を利用すれば,個々の~box周りの視覚的なアキを指定できるが、所与の~layout文脈の中で隣接する各~box間のアキを大域的に指定する方が簡便になることもある — 特に[ 各~box間のアキ ]と[[ 最初の/最後の ]~boxと容器の辺との合間のアキ ]とが異なるときには。 ◎ While margin and padding can be used to specify visual spacing around individual boxes, it’s sometimes more convenient to globally specify spacing between adjacent boxes within a given layout context, particularly when the spacing is different between boxes as opposed to between the first/last box and the container’s edge.
`gap$p ~prop, および その下位prop `row-gap$p, `column-gap$p は、この機能性を[ 複柱~layout / ~flex~layout / 格子~layout ]用に供する。 ◎ The gap property, and its row-gap and column-gap sub-properties, provide this functionality for multi-column, flex, and grid layout.
8.1. ~row/~colの側溝:`row-gap^p / `column-gap^p ~prop
◎名 `row-gap@p, `column-gap@p ◎値 `normal^v | `length-percentage$t ◎初 `normal^v ◎適 `複柱~容器$, `~flex容器$, `格子~容器$ ◎ multi-column containers, flex containers, grid containers ◎継 されない ◎百 内容~区画の対応する寸法を基準にする ◎ refer to corresponding dimension of the content area ◎算 指定値 — ただし, `length$t 値は絶対~化される ◎ as specified, with <length>s made absolute ◎順 文法に従う ◎ア `長さ, 百分率, または calc 式$として ◎ as length, percentage, or calc ◎表終これらの~propは、容器~内の各~駒~間に空間を追加する,固定~長さの `側溝@ を指定する — `内容-分布~prop$の `space-between$v ~keywordのような方式で、ただし残りの空間に対する割合分としてではなく,固定~sizeにより。 `column-gap$p ~propは、容器の`行内-軸$において各~boxを(`行内-軸$ ~marginと同様に)分離するような,各 “~col” 間のアキを指定する。 `row-gap$p ~propは、容器の`塊-軸$において各~boxを分離するような,各 “~row” 間のアキを指定する。 ◎ These properties specify fixed-length gutters between items in the container, adding space between them—in a manner to the space-between keyword of the content-distribution properties, but of a fixed size instead of as a fraction of remaining space. The column-gap property specifies spacing between “columns”, separating boxes in the container’s inline axis similar to inline-axis margin; while row-gap indicates spacing between “rows”, separating boxes in the container’s block axis.
各種 値の意味は: ◎ Values have the following meanings:
- `length-percentage$t
- 各[ “~row” / “~col” ]間の~gapを指定する。 どちらに適用されるかは、~layout~modeにより定義される — 詳細は以下の各 下位節を見よ。 ◎ Specifies a gap between “rows” or “columns”, as defined by the layout modes to which it applies; see subsections below for details.
- 負の値は無効。 ◎ Negative values are invalid.\
- `CSS-SIZING-3$r による 最小~size~prop, ~margin/~padding のときと同じく, 百分率は、内在的~size供与を決定するときには 0 を基準に解決されるが,~boxの内容を~lay-outするときには~boxの内容~boxを基準に解決される。 ◎ As in the min size properties and margins/paddings [CSS-SIZING-3], percentages resolve against zero for determining intrinsic size contributions, but resolve against the box’s content box when laying out the box’s contents.
- `normal@v
- `複柱~容器$上では、使用値 `1em^v を表現する。 他のすべての文脈においては、使用値は `0px^v になる。 ◎ The normal represents a used value of 1em on multi-column containers, and a used value of 0px in all other contexts.
側溝による効果は各~駒~間の最小アキであり、[ `justify-content$p / `align-content$p ]によるアキも追加され得る。 そのような追加の空間は、実質的に,`側溝$の~sizeを増やす。 ◎ Gutters effect a minimum spacing between items: additional spacing may be added by justify-content/align-content. Such additional space effectively increases the size of these gutters.
これらの~propの正確な取扱いは、~layout容器に応じて変わる: ◎ The exact handling of these properties varies by layout container:
- `複柱~容器$
- `column-gap$p は、隣接する `柱~box$間の`側溝$を指定する。 これが複柱~容器の~layoutにどう影響するかの詳細は `CSS-MULTICOL-1$r を見よ。 `row-gap$p は現在~適用されない。 ◎ column-gap specifes the gutter between adjacent column boxes. See [CSS-MULTICOL-1] for details on how this affects the layout of multicol elements. row-gap does not currently apply.
- `~flex容器$
- `主-軸$に適用されるときは(例: `flex-direction$p が `row$v にされた`~flex容器$に対する `column-gap$p )、各~駒~間の最小アキを指示する(同じ~line内にある隣接する`~flex駒$の合間に固定~sizeの~marginが追加で挿入されるかのように)。 ◎ When applied to the main axis (e.g. column-gap in a row flex container), indicates minimum spacing between items (as if an additional fixed-size margin were inserted between adjacent flex items in a single line).
- `交叉-軸$に適用されるときは(例: `flex-direction$p が `row$v にされた`~flex容器$に対する `row-gap$p )、隣接する各`~flex~line$間の最小アキを指示する。 ◎ When applied to the cross axis (e.g. row-gap in a row flex container), indicates minimum spacing between adjacent flex lines.
- `格子~容器$
- [ `row-gap$p / `column-gap$p ]~propが`格子~容器$に指定されたときは、各[ `格子~row$ / `格子~col$ ]間の`側溝$を定義する。 精確な詳細は、 `CSS-GRID$r の 各種 側溝~prop 節を見よ。 ◎ The row-gap and column-gap properties, when specified on a grid container, define the gutters between grid rows and grid columns, respectively. See CSS Grid Layout 1 §10.1 Gutters: the row-gap, column-gap, and gap properties for precise details.
注記: ~table~boxにおいては、 `gap$p ~propを利用しても,各~cell間の分離を指定することはない。 代わりに `border-spacing$p ~propを利用する: その機能性は少し異なり、継承されることに加え,最も外側の~cellと~tableの~borderとの合間にも追加のアキを指定する( `space-between$v よりも `space-evenly$v に似る)。 ◎ Note: Table boxes do not use the gap properties to specify separation between their cells. Instead, they use the border-spacing property, which has slightly different functionality: it inherits, and it also specifies the additional spacing between the outermost cells and the border of the table (similar to space-evenly rather than space-between).
8.2. ~gap略式~prop: `gap^p
◎名 `gap@p ◎値 `row-gap$tp `column-gap$tp? ◎初 個々の~propを見よ。 ◎適 `複柱~容器$, `~flex容器$, `格子~容器$ ◎ multi-column containers, flex containers, grid containers ◎継 されない ◎百 内容~区画の対応する寸法を基準にする ◎ refer to corresponding dimension of the content area ◎算 個々の~propを見よ。 ◎順 文法に従う ◎ア `長さ, 百分率, または calc 式$として ◎ as length, percentage, or calc ◎表終この~propは、[ `row-gap$p, `column-gap$p ]を 1 個の宣言で設定する`略式~prop$である。 `column-gap$tp が省略された場合、 `row-gap$tp と同じ値が設定される。 ◎ This property is a shorthand that sets row-gap and column-gap in one declaration. If <‘column-gap’> is omitted, it’s set to the same value as <‘row-gap’>.
注記: 各~box間の可視の “側溝” を成す成分は `gap$p ~prop一つだけだが、[ ~margin / ~padding / `分布型の整列$ ]の利用は, `grid-gap$p に指定されるものを超えて,各~格子~駒~間に可視の分離を増やし得る。 ◎ Note: The gap property is only one component of the visible “gutter” or “alley” created between boxes. Margins, padding, or the use of distributed alignment may increase the visible separation between boxes beyond what is specified in gap.
8.3. 旧来の~gap~prop: `grid-row-gap$p, `grid-column-gap$p, `grid-gap$p
Grid Layout ~moduleは、元々,自前の各種 `側溝$~propを備えていた — それらの~prop名が,既存の `row-gap$p / `column-gap$p に統一されるまでは。 旧来の内容との互換性のため、それらの旧来の~prop名も,別名として~supportされ~MUST: ◎ The Grid Layout module was originally written with its own set of gutter properties, before all such properties were unified into the existing row-gap/column-gap naming. For compatibility with legacy content, those legacy property names must be supported as aliases:
- [ `grid-row-gap@p, `grid-column-gap@p, `grid-gap@p ]は、順に[ `row-gap$p, `column-gap$p, `gap$p ]用の略式~propとして扱われ~MUST。 ◎ grid-row-gap must be treated as a shorthand for the row-gap property ◎ grid-column-gap must be treated as a shorthand for the column-gap property ◎ grid-gap must be treated as a shorthand for the gap property
- これらの旧来の~propは、それぞれが別名としている~propと同じ文法をとり,値を 単にその~propに “転送-” し~MUST。 ◎ In all three cases, the legacy properties must take the same grammar as the property they are aliasing, and just "forward" the value to their aliased property.
9. 基底線~整列の詳細
`基底線共有~group$内の~boxたちは、それぞれの`整列~基底線$を利用して互いに整列される。 例えば,横組の下では、同じ~row内の~table~cellたちの `align-content$p に `baseline$v を指定した場合、それぞれの`整形される最初の行l$の基底線が 互いに整列されることになる。 この節では、基底線~整列がどう遂行されるかを正確に定義する — 国際化された現代の~CSSに存在する多種の基底線と`書字mode$も考慮しつつ。 ◎ Boxes in a baseline-sharing group are aligned to each other using their alignment baselines. For example, in horizontal writing modes, specifying align-content: baseline on table cells in the same row will align the baselines of their first formatted lines. This section defines exactly how baseline alignment is performed in consideration of the myriad baselines and writing modes that exist in internationalized modern CSS.
`基底線~集合@ は、共通の基底線~tableに結付けられた,何種かの基底線( `alphabetic^v, `central^v, 等々)からなる。 伝統的な植字では,概して これらのうち一つだけ利用されるが、利用される基底線は書記体系に応じて異なるため、複数の書記体系が混在している場合,同じ行lに複数の基底線が利用され得ることになる。 基底線と書字modeについての更なる情報は、 `CSS-WRITING-MODES-3$r の 基底線 — 序論 節にある。 ◎ A baseline set is a set of baselines (alphabetic, central, etc.) associated with a common baseline table. Typically, a typesetting tradition will use only one of these, but different writing systems use different baselines, and mixing writing systems can result in using more than one within a single line. Refer to CSS Writing Modes 3 §4.1 Introduction to Baselines for more information on baselines and writing modes.
9.1. ~boxの基底線~集合の決定-法
各~boxには、その中の~textの[ 最初最後の行l ]の`基底線~集合$に~~代表として対応する,[ `最初の基底線~集合@ / `最後の基底線~集合@ ]がある — これは、各 軸ごとに定義される。 `整列~基底線@ は,この集合から~~選ばれる一つであり、通例的には,`共有~整列~文脈$に結付けられている`支配的~基底線$がそれになる( `CSS-INLINE-3$r の `alignment-baseline$p, `dominant-baseline$p を見よ)。 ◎ Each box, for a given axis, has a first baseline set (and last baseline set) that nominally corresponds to the baseline set of the first (last) line of text within the box. The alignment baseline is one of these, usually the dominant baseline associated with the shared alignment context. (See the dominant-baseline and alignment-baseline properties in [CSS-INLINE-3].)
所与の軸における,~boxの最初最後の`基底線~集合$は、~layout~modelごとに異なり,次に従って決定される(以下, “/” は同順): ◎ The first and last baseline sets of a box are determined differently based on the layout model, as follows:
- `塊~容器$
-
`基底線~集合$は、次のうち最初最後に来る方になる: ◎ The first (last) baseline set of a block container is\
- `塊~容器$内の,`~flow内$にある最初最後の行l~boxの,最初最後の`支配的~基底線$から`生成-$されるもの。 ◎ generated from the dominant first (last) baseline of the first (last) in-flow line box in the block container,\
- `塊~容器$内の,`~flow内$にある[ `塊level$の子であって, 最初最後の基底線~集合を供与するもの ]のうち,最初最後のものから得られるもの。 【最初最後の塊levelの子であって, 最初最後の基底線~集合も供与するもの… とも読めるが、どうもはっきりしない。】 ◎ or is taken from the first (last) in-flow block-level child in the block container that contributes a set of first (last) baselines, whichever comes first (last).
そのような行l~boxや子が無い場合、`基底線~集合$は無い。 ◎ If there is no such line box or child, then the block container has no baseline set.
- `複柱~容器$
-
最初の`基底線~集合$は、次のうち最初に来る方になる: ◎ The first baseline set of a multi-column container is\
- 最初の`柱~box$内の,`~flow内$にある最初の行l~boxの,最初の`支配的~基底線$から`生成-$されるもの。 ◎ generated from the dominant first baseline of the first in-flow line box in the first column box,\
- `~flow内$にある[ `塊level$の子であって, 最初の基底線~集合を供与するもの ]のうち,最初のものから得られるもの。 【最初の塊levelの子であって, 最初の基底線~集合も供与するもの… とも読めるが、どうもはっきりしない。】 ◎ or is taken from the first in-flow block-level child that contributes a set of first baselines, whichever comes first.\
そのような行l~boxや子が無い場合、最初の`基底線~集合$は無い。 ◎ If there is no such line box or child, then the multi-column container has no first baseline set.
- `複柱~容器$には、最後の`基底線~集合$は無い。 ◎ Multi-column containers have no last baseline set.
- ~table
- `基底線~集合$は、~tableの最初最後の~rowの,最初最後の`基底線~集合$になる。 ◎ The first (last) baseline set of a table box is the first (last) baseline set of its first (last) row.
- `行内-塊$の最初最後の`基底線~集合$を見出すときは、~table~boxから供与される基底線は,すべて飛ばされ~MUST(これは、 `CSS2$r による旧来の挙動との過去互換のためにある)。 ◎ When finding the first (last) baseline set of an inline-block, any baselines contributed by table boxes must be skipped. (This quirk is a legacy behavior from [CSS2].)
- ~table~row
- 最初最後の基底線~集合は、~row内に,~row軸~沿いの[ `first baseline$v / `last baseline$v ]整列に関与する~cellがある場合は、それらの整列が遂行された上で,[ それらの~cellが共有する`整列~基底線$と, ~rowにて`可用な最初の~font$ ]から`生成-$される。 他の場合、[ ~row内の各~cellの内容~辺の中で[ 最も低い, 最も高い ]もの ]から`合成-$される `CSS2$r ◎ If any cells in the row participate in first baseline (last baseline) alignment along the row axis, the first (last) baseline set of the row is generated from their shared alignment baseline and the row’s first available font, after alignment has been performed. Otherwise, the first (last) baseline set of the row is synthesized from the lowest and highest content edges of the cells in the row. [CSS2]
- `~flex容器$
- `CSS-FLEXBOX-1$r の ~flex基底線 を見よ。 ◎ See Flex Baselines in [CSS-FLEXBOX-1].
- `格子~容器$
- `CSS-GRID-1$r の 格子~基底線 を見よ。 ◎ See Grid Baselines in [CSS-GRID-1].
~boxに対し,所与の単独の基底線 %基底線 から `基底線たちを生成する@ ときは、[ ~font設定群からの基底線~table, および その~boxにて`可用な最初の~font$ ]を利用して得られる基底線~集合を, %基底線 に整列する。 ◎ To generate baselines for a box from a single baseline, use the baseline table from the font settings and first available font of that box, and align that baseline set to the given single baseline.
[ 矩形 / 2 本の平行~線 ]から `基底線を合成-@ するときは、`行-下面$の線から `alphabetic^v 基底線を合成し,[ 矩形の対~辺 / 2 本の平行~線 ]の位置の平均から `central^v 基底線を合成する。 追加の基底線を合成するための規則は、 `CSS-INLINE-3$r による 基底線の合成-法 を見よ。 ◎ To synthesize baselines from a rectangle (or two parallel lines), synthesize the alphabetic baseline from the line-under line, and the central baseline by averaging the positions of the two edges or lines. See CSS Inline Layout 3 § Synthesizing Baselines for rules on synthesizing additional baselines.
注記: ~boxから`基底線を合成-$するときに利用される辺は、それが関与する`整形~文脈$に依存する:
- 行内level~boxは、~margin辺から`合成-$する。 `CSS-INLINE-3$r
- ~table~cellは、内容~辺から`合成-$する。 `CSS2$r
- 格子~駒/~flex駒は、~border辺から`合成-$する。 `CSS-GRID-1$r `CSS-FLEXBOX-1$r
合成~用に[ `行-下面$, `行-上面$ ]辺を決定するときには、一般に,[ ~boxの`書字mode$, 図形, その他の整列されている~obj ]が利用される。 しかしながら,`書字mode$の`塊~flow方向$が`整列~文脈$の軸に平行なときは、軸に互換な方の`書字mode$と見做され~MUST: ◎ In general, the writing mode of the box, shape, or other object being aligned is used to determine the line-under and line-over edges for synthesis. However, when that writing mode’s block flow direction is parallel to the axis of the alignment context, an axis-compatible writing mode must be assumed:
- `整列~文脈$を確立している~box %B の`塊~flow方向$が,`整列~文脈$の軸に直交する場合、 %B の`書字mode$を利用する。 ◎ If the box establishing the alignment context has a block flow direction that is orthogonal to the axis of the alignment context, use its writing mode.
- 他の場合、 `writing-mode$p は[[ `horizontal-tb$v, `vertical-lr$v ]のうち,~boxの自前の `writing-mode$p に直交する方 ]と見做す。 ◎ Otherwise, assume either horizontal-tb or vertical-lr writing-mode, whichever is orthogonal to the box’s own writing-mode.
~boxの基底線を見出す目的においては、[ ~box, および ~boxの子孫のうち`~flow内$にあるもの ]のうち,~scroll用の仕組み( `overflow$p ~propを見よ)を伴うものは、その原点~位置に~scrollされていたかのように見なされ~MUST。 加えて,~boxは`~scroll容器$である事例では、結果の最初最後の基底線の位置が~boxの[ 終端/始端 ]~border辺を過ぎる場合には,~border辺まで寄せられるとする。 ◎ For the purposes of finding the baselines of a box, it and all its in-flow descendants with a scrolling mechanism (see the overflow property) must be considered as if scrolled to their origin. Furthermore, if, in the case of a scroll container box, the resulting position of a first (last) baseline is past a box’s end (start) border edge, its position is clamped to that border edge.
9.2. 基底線~整列の~group分け
基底線~整列に一緒に関与するような~boxたちは、 `基底線共有~group@ を成すものとされる。 ~boxたちは、次の両~条件とも満たす場合に限り,そのような~groupを成し得る: ◎ A baseline-sharing group is composed of boxes that participate in baseline alignment together. This is possible only if they
- それらが基底線整列されている軸に垂直な軸~沿いに,同じ`整列~文脈$を共有する。 (例えば, `align-self$p が `baseline^v にされた格子~駒は、格子の塊-軸~沿いに基底線整列するので,同じ~row内の他の駒とともに関与する。) ◎ Share an alignment context along an axis perpendicular to the axis they’re being baseline-aligned in. (For example, grid items with align-self: baseline are baseline-aligning along the grid’s block axis, and therefore participate with other items in their row.)
- それらの`基底線~整列~選好$は`互換$である(すなわち,整列させたい基底線は、それらが共有する整列~文脈の同じ側にある)。 ◎ Have compatible baseline alignment preferences (i.e., the baselines that want to align are on the same side of the alignment context).
次のいずれかに該当する~boxたちは、特定0の軸~沿いに,特定0の~boxにより確立される `整列~文脈@ を共有するとされる: ◎ Boxes share an alignment context, along a particular axis, and established by a particular box, when they are:
~boxたち | 軸 | `整列~文脈$を確立する~box |
---|---|---|
同じ~row内にある~table~cellたち | `行内-軸$(~row軸) | ~row~box |
同じ格子~row内にある`格子~駒$たち | `行内-軸$(~row軸) | `格子~容器$ |
同じ格子~col内にある`格子~駒$たち | `塊-軸$(~col軸) | `格子~容器$ |
同じ`~flex~line$内にある`~flex駒$たち | `主-軸$ | `~flex容器$ |
注記: 概念的には、行l~box内の行内level~boxたちも,自己-整列~文脈を共有し, 基底線共有~groupに関与するが、それらの基底線~整列に関わるのは `vertical-align$p に限られ,この~moduleに定義される各種~propは関わらない。 `CSS-INLINE-3$r を見よ。 ◎ Note: Conceptually, the inline-level boxes in a line box also share a self-alignment context and participate in a baseline-sharing group; however they only baseline-align in response to the vertical-align property, not any of the properties defined in this module. See [CSS-INLINE-3].
~boxが 複数の`共有~整列~文脈$にまたがる場合、それらのうち,当の軸~沿いの最も[ 始端/終端 ]側の整列~文脈のみに関与するものとする。 例えば, 3 本の~rowに~spanしている~table~cellは、それが~spanする最も[ 始端/終端 ]側の~row内にある~table~cellたちの[ `最初の基底線による整列$ / `最後の基底線による整列$ ]に関与する。 ◎ If a box spans multiple shared alignment contexts, then it participates in first (last) baseline alignment within its start-most (end-most) shared alignment context along that axis. For example, a table cell spanning three rows participates in first-baseline alignment with the table cells in the first row that it spans, or alternatively in last-baseline alignment with the table cells in the last row that it spans.
2 つの~boxの`基底線~整列~選好$は、互いの[ `塊~flow方向$, `基底線~整列~選好$ ]が両方とも同じか,両方とも反対ならば, `互換@ とされる。 ◎ The baseline alignment preferences of two boxes in a baseline-sharing group are compatible if they have: ◎ • the same block flow direction and baseline alignment preference ◎ • opposite block flow direction and opposite baseline alignment preference
9.3. 基底線による~boxたちの整列-法
同じ`基底線共有~group$ %~group に所属する[ `整列対象$たち, および それらの基底線~集合 ]が与えられた下で、`整列対象$たちは,次に従って基底線整列される: ◎ Given a set of alignment subjects and their baselines that all belong to a single baseline-sharing group, the alignment subjects are baseline-aligned as follows:
- 先ず、 %~group の`整列~文脈$にて`可用な最初の~font$から %~group の基底線~tableを生成する。 加えて、この~tableとその鏡像とを,互いの `central^v 基底線が整列するように重層する。 これらが,`整列対象$たちが整列されることになる基底線 “格子” になる。 ◎ First, generate the baseline-sharing group’s baseline table from the first available font of the group’s alignment context and overlay also the mirror of this baseline table by aligning their central baselines. These are the baseline “grids” to which the alignment subjects will align.
-
次に、各 `整列対象$に対し,`整列対象$に指定されている`整列~基底線$と[ %~group の[ 基底線~tableまたは その鏡像(`整列対象$の`行l方位$に合致する方) ]]【の中の同種の基底線】とを整列する†。 `整列対象$の`整列~基底線$は、他から指定されない限り(例えば `alignment-baseline$p ~propを介して),整列~文脈の`支配的~基底線$†【と同種の基底線】とする。
【† 例えば、~boxに指定されている整列~基底線が `alphabetic^v ならば、~boxは,基底線~tableの中の `alphabetic^v 基底線と整列される。 支配的~基底線は、 `dominant-baseline$p で明示的に指定することもできる。 】
◎ Next, align each alignment subject by its specified alignment baseline to the group’s baseline table or its mirror, whichever matches the alignment subject’s line orientation. Unless otherwise specified (e.g. via the alignment-baseline property), the alignment baseline is the dominant baseline of the alignment context. - 指定された`基底線~整列~選好$に結付けられている`~fallback整列$に則って,当の`基底線共有~group$を`整列~容器$の中で位置させる。 最初最後の`基底線による内容-整列$に対しては、`整列~容器$の[ 始端/終端 ]内容~辺と`整列対象$の辺の合間に,[ `整列~文脈$内のすべての`整列~容器$の[ 始端/終端 ]~margin辺を整列する ]ために必要とされる,最小限空間を追加する — `基底線共有~group$の中での基底線~整列は保守しながら。 ◎ Position the aligned baseline-sharing group within the alignment container according to the fallback alignment associated with the specified baseline alignment preference. For first (last) baseline content-alignment, then add the minimum necessary extra space between the alignment container’s start (end) content edge and the alignment subject’s edge to align the start (end) margin edges of all the alignment containers in the alignment context while maintaining baseline alignment within the baseline-sharing group.
10. 変更点
2017 年 9 月 6 日 作業草案 からの変更点は: ◎ Changes since the 6 September 2017 Working Draft include:
- 説明図をさらに追加した。 難しい図式~化の仕事をされた `Melanie Richards^en 氏に感謝する。 ◎ Added more illustrations! Many thanks to Melanie Richards for working through a difficult diagramming problem.
- `gap$p 略式の~prop定義~表の誤りを修正した。 ◎ Fixed errors in property definition table of gap shorthand.
- 包含塊の~sizeが~gapに依存するとき、百分率~gapは 0 に解決するものと定義した `509$issue `2297$issue ◎ Defining percentage gaps to resolve to zero when the containing block’s size depends on the gaps. (Issue 509, Issue 2297)
- 文法~内の `left^v, `right^v の取扱いにおける誤りを修正した。 ◎ Fixed errors in handling left and right in the grammars.
- `space-align^v ~fallback整列における不一致を修正した。 `2316$issue ◎ Fixed discrepency in space-align fallback alignment. (Issue 2316)
- ~boxの辺が整列しない事例における基底線~整列の取扱いを整備した。 `1556$issue `1611$issue ◎ Tightened up handling of baseline alignment in cases where the box edges don’t align. (Issue 1556, Issue 1611)
- 諸々の明確化。 ◎ Miscellaneous clarifications.
2017 年 7 月 20 日付 作業草案 からの~~主な変更点は: ◎ Changes since the 20 July 2017 Working Draft include:
- `row-gap$p, `column-gap$p ~prop, および `gap$p 略式~propを追加した。 これらは、[ `格子~layout$, `~flex~layout$ ]両者に適用されるよう,格子~layoutに特有の[ `grid-row-gap$p / `grid-column-gap$p / `grid-gap$p ]~propを置換する。 ◎ Added the row-gap and column-gap properties and gap shorthand, applying them to both grid layout and flex layout to replace the grid-specific grid-row-gap/grid-column-gap/grid-gap properties.
2017 年 5 月 15 日付 作業草案 からの~~主な変更点は: ◎ Changes since the 15 May 2017 Working Draft include:
- `align-self$p / `align-content$p のとり得る値から ~keyword `left^v, `right^v を落とした。 それらは、需要があれば後の~levelに再~導入され得る。 `1403^issue ◎ Dropped the left and right keywords from align-self and align-content. They may be re-introduced in a later level if there is demand. (Issue 1403)
- 最後の`基底線による内容-整列$と組み合わされる事例では、 `~stretchAS$v の~fallback整列に `end$v をあてがった。 ◎ Assigned end fallback alignment to stretch cases when combined with last baseline content-alignment.
- 実装の複雑さに因り、~table~col内の~cellどうしの基底線~整列は不能化した。 ◎ Disabled baseline alignment across cells in a table column, due to implementation complexity.
- David Baron 氏から,多数の小さな訂正と明確化が報告された。 ◎ A large number of minor corrections and clarifications reported by David Baron.
2017 年 4 月 7 日付 作業草案 からの~~主な変更点は: ◎ Changes since the 7 April 2017 Working Draft include:
- 部分的~実装における取扱いを明確化する節を追加した。 `1167^issue ◎ Adding a section to clarify handling of partial implementations. (Issue 1167)
- `justify-content$p から `baseline-position$t 値を落とした — それは何ら~~効果がないので。 `1184^issue ◎ Dropped <baseline-position> value of justify-content since it can’t do anything anyway. (Issue 1184)
- ~fallback整列を指定する能は、 Level 4 へ先送りした。 ( Issue 1002 ) ◎ Deferred ability to specify fallback alignments to Level 4. (Issue 1002)
- `overflow-position$t と `content-position$t の~~順序を修正した。 `1001^issue ◎ Fixed position of <overflow-position> wrt <content-position>. (Issue 1001)
- 塊-軸に整列されている,基底線整列された~box用の取扱い規則を修正した。 `1038^issue ◎ Fixed rules for handling baseline-aligned boxes being aligned along their block axis. (Issue 1038)
- `justify-items$p に対する `auto^v を `legacy^v に改称した。 `1318^issue ) ◎ Renamed justify-items: auto to justify-items: legacy. (Issue 1318)
- ~scroll可能な~boxの基底線は、~margin辺ではなく~border辺までに切り詰めるようにした。 `766^issue ◎ Clamped baselines of scrollable boxes to the border edge, rather than margin edge. (Issue 766)
11. ~privacy/~security上の考慮点
この仕様は単純な~layout仕様であり、新たな ~privacy/~security 上の考慮点を導入するものではない。 ◎ As a simple layout spec, this introduces no new privacy or security considerations.
謝辞
次の方々に特別な謝意を:
Special thanks goes to David Baron, Javier Fernandez, Markus Mielke, Alex Mogilevsky, and the participants in the CSSWG’s March 2008 F2F alignment discussions for their contributions to the alignment model described herein, and to Melanie Richards for her illustrations of the various alignment keywords.