1. 序論
この~moduleに定義される各種~propは、 `~border区画$の装飾を処する。 この~moduleは、 ~boxに適用できる装飾も定義する。 ◎ The properties of this module deal with the decoration of the border area. It also defines decorations that can be applied to the box.
1.1. ~module間の相互作用
この仕様は、 `CSS3BG$r の~borderと~box装飾に関係する各部を拡張すると伴に, 次に挙げるものも供する: ◎ This specification extends the parts related to borders and box decorations of CSS Backgrounds and Borders Module Level 3 [CSS3BG]. ◎ It provides\
- 追加された各種[ `corner-*-shape$p, `border-shape$p ]~prop用の仕様 ◎ specifications for the added corner-*-shape and border-shape properties,\
 - 各種[ `border-*-radius$p, `box-shadow-*$p ]下位prop用の論理-`略式~prop$ ◎ as well as logical shorthands for border-*-radius, box-shadow-* longhands,\
 - [ `border-limit$p, `border-*-clip^p ]~prop介した部分的な~border ◎ and partial borders via the border-limit and border-*-clip properties.
 
この~moduleにおけるすべての~propは、 `first-letter$pe 疑似要素 `CSS2$r にも適用される。 ◎ All properties in this module apply to the ::first-letter pseudo-element.\
`first-line$pe 疑似要素 `CSS2$r に対しては、 ~UAは:
- 各種 `border-*-radius$p ~propを適用するモノトスル。
 - 各種[ `border-image-*$p / `box-shadow-*$p ]~propを適用してもヨイ【! (but is not required to)】。
 - 各種[ `border-*-color$p / `border-*-style$p / `border-*-width$p ]~propを適用しないモノトスル。
 
1.2. 値~定義
【 この節の他の内容は、 `~CSS日本語訳 共通~page@~CSScommon#values$ に移譲。 】
…これらの値~型の定義は、 他の~CSS~moduleとの組合nで拡張され得る。 例えば, `CSS-IMAGES-3$r と組合せることで、 `background-image$p や `border-image$p の値として,~CSS~gradientを利用することも許容される。 ◎ … Combination with other CSS modules may expand the definitions of these value types. For example, combining with CSS Images allows for using CSS gradients as background-image or border-image values. [CSS-IMAGES-3]
【この訳に特有な表記規約】
“`example-property-*^p” や “`example-*-property^p” などの `*^c の入った表記は、[ 略式~prop `example-property^p, その下位~propたち ]の総称を表す。
◎表記記号2. ~border
`~border$には、[ 定義済みな`~style$bD(実線, 二重線, 点線, 立体的な線, 等々)/画像 ]を与えれる。 画像でない場合、 様々な~propにより,~borderの[ `~style$bD( `border-style$p ), `色$bD( `border-color$p ), `幅$bD(太さ)( `border-width$p ) ]が定義される。 ◎ The border can either be a predefined style (solid line, double line, dotted line, pseudo-3D border, etc.) or it can be an image. In the former case, various properties define the style (border-style), color (border-color), and thickness (border-width) of the border.
2.1. 線の色: `border-*-color^p ~prop
これらの~propは、 `~border色@ — 各種 `border-*-style$p ~propにより指定された~borderの前景~色 — を設定する。 ◎ These properties set the foreground color of the border specified by the border-style properties.
これらのうち名前に[ `start^css / `end^css ]を伴うものは`~flow相対$な~propであり, 他は`物理的$な~propである。 前者と後者の対応付けは、 当の要素の[ `writing-mode$p, `direction$p, `text-orientation$p ]に依存する。 ◎ ↓
その値の構文は:
`line-color@t = `color$t | `image-1D$t
【 この生成規則 `line-color$t は、 他所を集約するための,この訳による追加。 】
`image-1D$t により定義される縞は、[ 当の~propが適用される側における~borderの形状 ]が成す帯において[ `~padding辺$から開始して外方へ進捗する ]よう描かれる。 辺~上の各~点における~border幅が当の点における縞の %総~幅 【 `image-1D$t を見よ】を定義する。 ◎ The stripes defined by <image-1D> follow the shape of the border on the side to which they apply, and are drawn in bands starting from the padding edge and progressing outwards. The border width at each point defines the total width of the stripes at that point.
各~側に異なる色を利用している例: ◎ Using multiple colors for each side:
.foo {
  border: 30px solid;
  border-color: stripes(`dodgerblue^swatch dodgerblue, `skyblue^swatch skyblue) stripes(`yellow^swatch yellow, `gold^swatch gold) stripes(`lightgreen^swatch lightgreen, `limegreen^swatch limegreen) stripes(`indianred^swatch indianred, `orange^swatch orange);
}
見本~描画: ◎ Sample rendering:
`multicolor-border^dgm同じ~border色たちを利用するが、 `border-style$p は `dotted$v とるときの見本~描画: ◎ The same border colors with border-style: dotted:
`multicolor-border-dotted^dgm`border-color$p は、 4 個の物理的な `border-*-color^p ~prop用の`略式~prop$である — 所与の値たちが成す~listは、 これら各~側の下位propを`時計回りに設定する$。 ◎ border-color is a shorthand property for the four physical border-*-color properties. The four values set the top, right, bottom and left border, respectively. A missing left is the same as right, a missing bottom is the same as top, and a missing right is also the same as top. This is resolved individually for each list item. ◎ ↑ The flow-relative properties border-block-start-color, border-block-end-color, border-inline-start-color, and border-inline-end-color correspond to the physical properties border-top-color, border-bottom-color, border-left-color, and border-right-color. The mapping depends on the element’s writing-mode, direction, and text-orientation.
これらは、 ~flow相対な `border-*-color^p ~prop用の`略式~prop$である:
- `border-block-color$p は、[ `border-block-start-color$p, `border-block-end-color$p ]を設定する。
 - `border-inline-color$p は、[ `border-inline-start-color$p, `border-inline-end-color$p ]を設定する。
 
どちらも、 2 個の値は,順に[ `始端$, `終端$ ]側の色を表現する — 値が 1 個だけ与えられた場合、 それが終端~側にも適用される。 ◎ The first value represents the start side color, and the second value represents the end side color. If only one value is given, it applies to both the start and end sides.
2.2. 線の~pattern: `border-*-style^p ~prop
これらの~propは、[ `~border$が現れるかどうか ]および[ 現れる(かつ`~border画像@#border-images$で上書きされない)場合は, どの `~border~style@ で描かれるか ]を制御する。 ◎ These properties control whether a border appears, and if it does what style it’s drawn in (if it is not overridden by a border image).
これらのうち名前に[ `start^css / `end^css ]を伴うものは`~flow相対$な~propであり, 他は`物理的$な~propである。 前者と後者の対応付けは、 当の要素の[ `writing-mode$p, `direction$p, `text-orientation$p ]に依存する。 ◎ The flow-relative properties border-block-start-style, border-block-end-style, border-inline-start-style, and border-inline-end-style correspond to the physical properties border-top-style, border-bottom-style, border-left-style, and border-right-style. The mapping depends on the element’s writing-mode, direction, and text-orientation.
これらは、 ~flow相対な `border-*-style^p ~prop用の`略式~prop$である:
- `border-block-style$p は、[ `border-block-start-style$p, `border-block-end-style$p ]を設定する。
 - `border-inline-style$p は、[ `border-inline-start-style$p, `border-inline-end-style$p ]を設定する。
 
どちらも、 2 個の値は,順に[ `始端$, `終端$ ]側の~styleを表現する — 値が 1 個だけ与えられた場合、 それが終端~側にも適用される。 ◎ The first value represents the start side style, and the second value represents the end side style. If only one value is given, it applies to both the start and end sides.
`border-style$p は、 4 個の物理的 `border-*-style^p ~prop用の`略式~prop$である。 所与の値たちが成す~listは、 これら各~側の下位propを`時計回りに設定する$。 ◎ border-style is a shorthand property for the four physical border-*-style properties. The four values set the top, right, bottom and left border, respectively. A missing left is the same as right, a missing bottom is the same as top, and a missing right is also the same as top. This is resolved individually for each list item.
その値の構文は: ◎ The style is specified as a <line-style> keyword, where
`line-style@t = `none$v | `hidden$v | `dotted$v | `dashed$v | `solid$v | `double$v | `groove$v | `ridge$v | `inset$v | `outset$v
各種 値の意味は: ◎ Values have the following meanings:
- `none@v
 - ~borderは無い。 ~borderの`色$bDと`幅$bDは無視される (すなわち,~borderの`幅$bDは 0 になる)。 その結果、[ `border-image-width$p の初期~値も 0 に解決される ]ようになることに注意。 ◎ No border. Color and width are ignored (i.e., the border has width 0). Note this means that the initial value of border-image-width will also resolve to zero.
 - `hidden@v
 - `none$v と同じ — ただし、 `border-collapse$p が `collapse^v にされた~table `CSS2$r に対しては,`~borderの競合-解決$の規則における挙動が異なる。 ◎ Same as none, but has different behavior in the border conflict resolution rules for border-collapsed tables [CSS2].
 - `dotted@v
 - 点線 — 小丸の並び。 ◎ A series of round dots.
 - `dashed@v
 - 端が角ばった破線。 ◎ A series of square-ended dashes.
 - `solid@v
 - 一重の実線。 ◎ A single line segment.
 - `double@v
 - 二重線。 各~線の太さは指定されないが、 全体的な太さは `border-width$p に等しくなるモノトスル。 ◎ Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal border-width.)
 - `groove@v
 - ~canvasに彫られたかのような見かけ (この効果は、 概して,指定された `border-color$p より少し明るい線と暗い線で “影” を形成することにより達成される)。 ◎ Looks as if it were carved in the canvas. (This is typically achieved by creating a “shadow” from two colors that are slightly lighter and darker than the specified border-color.)
 - `ridge@v
 - ~canvasから盛り上げられたかのような見かけ。 ◎ Looks as if it were coming out of the canvas.
 - `inset@v
 - ~borderの内側が~canvasから沈降したかのような見かけ。 `~borderの縮約~model$ `CSS2$r においては `ridge$v として扱われる。 ◎ Looks as if the content on the inside of the border is sunken into the canvas. Treated as ridge in the collapsing border model. [CSS2]
 - `outset@v
 - ~borderの内側が~canvasから隆起したかのような見かけ。 `~borderの縮約~model$ `CSS2$r においては `groove$v として扱われる。 ◎ Looks as if the content on the inside of the border is raised out of the canvas. Treated as groove in the collapsing border model. [CSS2]
 
【 [ `groove^v / `ridge^v / `inset^v / `outset^v ]の見かけは、 背景や~borderの色によっては真逆に見えるかもしれない。 】
~borderは、 要素の背景の手前に描かれるが,(重合する所では)要素の内容の背後に描かれる。 ◎ Borders are drawn in front of the element’s background, but behind the element’s content (in case it overlaps).
注記: 黒や白に近い~border色は、[ `groove$v / `ridge$v / `inset$v / `outset$v ]に要求される “立体” 効果を作成するためには,中間~色とは異なる色の計算が必要になる。 ◎ Note: Border colors close to black or white may need different color calculations than colors in between in order to create the required “3D” effect of groove, ridge, inset, or outset.
注記: [ 点線を成す小丸の間隔 ]や[ 破線を成す各~線分の間隔や長さ ]を制御するすべは無い。 実装には、 隅の所で対称になるよう間隔を選ぶことが奨励される。 ◎ Note: There is no control over the spacing of the dots and dashes, nor over the length of the dashes. Implementations are encouraged to choose a spacing that makes the corners symmetrical.
2.3. 線の太さ: `border-*-width^p ~prop
これらの~propは、 `~border幅@ — `~border$の【当の~propに対応する側の】太さ — を指定する。 その構文は: ◎ These properties specify the thickness of the border, i.e. the border width. Where
`line-width@t = `length [0,∞]$t | `thin$v | `medium$v | `thick$v
負な値は妥当でない。 ~keyword[ `thin@v は `1px^v / `medium@v は `3px^v / `thick@v は `5px^v ]と等価になるとする。 ◎ Negative values are invalid. The thin, medium, and thick keywords are equivalent to 1px, 3px, and 5px, respectively.
これらの~propのうち名前に[ `start^css / `end^css ]を伴うものは`~flow相対$な~propであり, 他は`物理的$な~propである。 前者と後者の対応付けは、 当の要素の[ `writing-mode$p, `direction$p, `text-orientation$p ]に依存する。 ◎ The flow-relative properties border-block-start-width, border-block-end-width, border-inline-start-width, and border-inline-end-width correspond to the physical properties border-top-width, border-bottom-width, border-left-width, and border-right-width. The mapping depends on the element’s writing-mode, direction, and text-orientation.
これらは、 ~flow相対な `border-*-width^p ~prop用の`略式~prop$である:
- `border-block-width$p は、[ `border-block-start-width$p, `border-block-end-width$p ]を設定する。
 - `border-inline-width$p は、[ `border-inline-start-width$p, `border-inline-end-width$p ]を設定する。
 
どちらも、 2 個の値は,順に[ `始端$, `終端$ ]側の幅を表現する — 値が 1 個だけ与えられた場合、 それが終端~側にも適用される。 ◎ The first value represents the start side width, and the second value represents the end side width. If only one value is given, it applies to both the start and end sides.
`border-width$p は、 4 個の物理的 `border-*-width^p ~prop用の`略式~prop$である。 所与の値たちが成す~listは、 これら各~側の下位propを`時計回りに設定する$。 ◎ border-width is a shorthand property for the four physical border-*-width properties. The four values set the top, right, bottom and left border, respectively. A missing left is the same as right, a missing bottom is the same as top, and a missing right is also the same as top. This is resolved individually for each list item.
注記: `~border幅$の`初期~値$は `medium$v であるが、 【他が指定されない限り】その`使用~値$【!used initial width】は,`~border~style$の初期~値が `none$v なので `0^v になる。 ◎ Note: Although the initial width is medium, the initial style is none; therefore the used initial width is 0.
2.4. ~borderの略式~prop
【 原文は `line-color$t を `color$t として指定しているが、 各種 `border-*-color$p と一貫するためには, `line-color^t にする必要があろう。 】
これらの~propは、 ~boxの`~border$を成す ある側を成す[ `border-*-width$p, `border-*-color$p, `border-*-style$p ]を設定する`略式~prop$である。 値が省略された~propは、 各自の`初期~値$に設定される。 ◎ These shorthand properties set the border-width, border-color, and border-style of one side of the borders of a box. Omitted values are set to their initial values.
これらのうち名前に[ `start^css / `end^css ]を伴うものは`~flow相対$な~propであり, 他は`物理的$な~propである。 前者と後者の対応付けは、 当の要素の[ `writing-mode$p, `direction$p, `text-orientation$p ]に依存する。 ◎ The flow-relative properties border-block-start, border-block-end, border-inline-start, and border-inline-end correspond to the physical properties border-top, border-bottom, border-left, and border-right. The mapping depends on the element’s writing-mode, direction, and text-orientation.
これらは、 ~flow相対な `border-*^p ~prop用の`略式~prop$である:
- `border-block$p は、[ `border-block-start$p, `border-block-end$p ]をどちらも同じ~styleに設定する。
 - `border-inline$p は、[ `border-inline-start$p, `border-inline-end$p ]をどちらも同じ~styleに設定する。
 
【 原文は `line-color$t を `color$t として指定しているが、 各種 `border-*-color$p と一貫するためには, `line-color^t にする必要があろう。 】
`border$p ~propは、 ~boxの[ 上端, 右端, 下端, 左端 ]`~border$を すべて同じ[ `border-width$p, `border-color$p, `border-style$p ]に設定するための`略式~prop$である。 略式~prop[ `margin$p, `padding$p ]と違って、 `border$p ~propは、 これら各側の~borderに異なる値を設定できない — そのためには、 他の `border-*^p ~propを利用する必要がある。 ◎ The border property is a shorthand property for setting the same border-width, border-color, and border-style for all four borders of a box. Unlike the shorthand margin and padding properties, the border property cannot set different values on the four borders. To do so, one or more of the other border properties must be used.
`border$p 略式~propは、 `border-image$p も,その初期~値に設定し直す。 作者には、 より前に現れている【~cascadeにおいて より優先される】~border設定群を上書きする際には,[ 他の略式~propや個々の~propではなく,この略式~prop ]を利用することが推奨される。 これは、[ 新たな~styleの効果が~~発揮されるよう `border-image$p も設定し直す ]ことを確保する。 ◎ The border shorthand also resets border-image to its initial value. It is therefore recommended that authors use the border shorthand, rather than other shorthands or the individual properties, to override any border settings earlier in the cascade. This will ensure that border-image has also been reset to allow the new styles to take effect.
注記: ~CSS~WGは、 ~CSSの将来~levelにおいても,[ `border$p 略式~propは, 他のすべての `border-*^p ~propを設定し直す ]ものと意図している。 仮に,~glyphによる~borderを許容する `border-characters^p ~propが導入されたなら、 `border$p 略式~propは,それも設定し直すことになる。 作者は, `border$p 略式~propを利用して~borderを設定し直すことにより、 将来にどの~propが導入されようが, “白紙状態” に戻されることが保証される。 ◎ Note: The CSS Working Group intends for the border shorthand to reset all border properties in future levels of CSS as well. For example, if a border-characters property is introduced in the future to allow glyphs as borders, it will also be reset by the border shorthand. By using the border shorthand to reset borders, authors can be guaranteed a “blank canvas” no matter what properties are introduced in the future.
例えば,次の 1 個目の規則は、 2 個目の規則を成す 5 個の規則~群と等価になる。 ◎ For example, the first rule below is equivalent to the set of five rules shown after it:
p { border: solid red }
p {
  border-top: solid red;
  border-right: solid red;
  border-bottom: solid red;
  border-left: solid red;
  border-image: none;
}
これらの~propは,機能性が重合している部分があるので、 規則を指定する順序も重要になる。 ◎ Since, to some extent, the properties have overlapping functionality, the order in which the rules are specified is important.
次の例を考える: ◎ Consider this example:
blockquote {
  border-color: red;
  border-left: double;
  color: black;
}
上の例では、 左端~borderだけ`色$bDを `black^v (黒)にして,他は `red^v (赤)にする。 これは `border-left$p がその[ `幅$bD, `~style$bD, `色$bD ]を設定することに因る。 `border-left$p ~propには,`色$bD用の値が与えられていないので、 `color$p ~propが `border-left$p ~propより後の所で設定されていても, 左端~borderの`色$bDは `color^p ~propから得られることになる。 ◎ In the above example, the color of the left border is black, while the other borders are red. This is due to border-left setting the width, style, and color. Since the color value is not given by the border-left property, it will be taken from the color property. The fact that the color property is set after the border-left property is not relevant.
3. 隅
`~padding辺$(~borderの内縁)の半径は、 ~borderの外縁の半径から,対応する~borderの太さを引いたものになる。 この結果が負になる場合、 内縁の半径は 0 にされる (そのような場合、 ~borderの[ 内縁な曲線の中心, 外縁な曲線の中心 ]は,一致しなくなる)。 同様に、 `内容~辺$の半径は,`~padding辺$の半径から対応する`~padding$の太さを引いてから 0 以上に切り上げた結果になる。 よって、 連接している 2 本の~borderの太さが異なる隅では、 曲った領域における~borderと~paddingの太さは、 それらを補間することにより得られ,滑らかに遷移することになる。 ◎ The padding edge (inner border) radius is the outer border radius minus the corresponding border thickness. In the case where this results in a negative value, the inner radius is zero. (In such cases the center of the border’s inner curve might not coincide with that of its outer curve.) Likewise the content edge radius is the padding edge radius minus the corresponding padding, or if that is negative, zero. The border and padding thicknesses in the curved region are thus interpolated from the adjoining sides, and when two adjoining borders are of different thicknesses the corner will show a smooth transition between the thicker and thinner borders.
~border~style( `solid$v, `dotted$v, `inset$v, 等々)は,何であれ、 ~borderの曲線をなぞる。 ◎ All border styles (solid, dotted, inset, etc.) follow the curve of the border.
注記: ある隅の外縁を成す曲線の中心が隅の対角において`~padding辺$を超える (すなわち,対角において`~border区画$内に入る) 場合、 内縁を成す曲線は,全部的な四分~楕円にならなくなる。 ◎ Note: If the center of a corner’s outer curve is past an opposite padding edge (in the border area of a side opposite the corner), the inner curve will not be a full quarter ellipse.
p {
  width: 70px;
  height: 70px;
  border: solid 30px;
  border-color: orange orange silver silver;
  border-top-right-radius: 100%;
}
曲げられた隅は、 左上~隅から,右上~隅を通り過ぎ,右下~隅にかけて軌跡を~~描き,四分~楕円の弧を成すが、 対辺~側には~borderの太さがあるので,~padding辺を成す曲線の端点は、 外縁~弧の端点より縦横とも内に入った所から開始する。 ◎ The curved corner is an arc from the top left corner sweeping across the top right corner to the bottom right corner, describing a quarter-ellipse; but since the opposite sides have a border thickness the padding edge curve starts inward from the outer arc's endpoints.
`~border辺$の外側にある`~margin辺$の各~隅の各 半径は、 `~border半径$ %R に,対応する~marginの太さ %w を加算して計算される。 ただし、 %R が小さいときには,隅をより角張らせる — すなわち,比率[ %r = %R ~DIV %w ]が 1 より小さいときは, %w に[ 1 ~MINUS `pow^op( 1 ~MINUS %r, 3 ) ]を乗算して調整する(丸まった隅から角張った隅への連続性を確保するため)。 ◎ The margin edge, being outside the border edge, calculates its radius by adding the corresponding margin thickness to each border radius. However, in order to create a sharper corner when the border radius is small (and thus ensure continuity between round and sharp corners), when the border radius is less than the margin, the margin is multiplied by the proportion 1 + (r-1)3, where r is the ratio of the border radius to the margin, in calculating the corner radii of the margin box shape.
【 ~marginの丸ngは、 `ある種の~layoutに効果を及ぼす@#_margin-radius_$。 】
3.1. 隅における切取n法
`border-radius$p は,`~border画像$【!#border-image】には影響しないが、 塗ngや~eventの取扱いを[ `~border辺$/`~padding辺$/`内容~辺$ ]で切取るような他の効果は,当の辺に対応する曲線で切取るモノトスル。 例えば: ◎ Although border images are not affected by border-radius, other effects that clip painting or event handling to the border, padding, or content edge must clip to their respective curves. For example,\
- 背景は、 `background-clip$p により指定された曲線で切取る。 ◎ backgrounds clip to the curve specified by background-clip,\
 - `overflow$p に対する `visible@~CSSOVERFLOW3#valdef-overflow-visible$v 以外の値は ( `overflow^p が両~軸とも `visible^v でないときは)、 曲った`~padding辺$で切取る。 ◎ overflow values other than visible to the curved padding edge (when overflow on both axes is not visible),\
 - `置換され$る要素の内容は、 曲った`内容~辺$で切取る。 ◎ replaced element content to the curved content edge,\
 - ~pointer~eventは、 曲った`~border辺$で切取る。 ◎ pointer events to the curved border edge, etc.
 
注記: `border-radius$p は,要素とヤリトリありな面積を削減するので、 作者は,残りの面積が[ ~targetにする~platformに推奨される下限 ]に適合することを~~確保するべきである。 特に, `border-radius$p を利用するときは、 推奨される最小な~touch~target~sizeに適合するために,より大きい[ 横幅/縦幅 ]が要求され得る。 ◎ Note: As border-radius reduces the interactive area of an element authors should make sure the remaining interactive area conforms to recommended minima for the platforms they target; in particular, conforming to recommended minimum touch target sizes may require larger widths and heights when border-radius is used.
適切な~paddingを追加して,内容が隅を~overflowしないようにする例。 背景の隅は、 ~borderが無くても,丸められることになる。 ◎ This example adds appropriate padding, so that the contents do not overflow the corners. Note that there is no border, but the background will still have rounded corners.
div {
  background: black;
  color: white;
  border-radius: 1em;
  padding: 1em;
}
3.2. ~borderの色と~styleの遷移
~borderにおいて[ `色$bD/`~style$bD ]が遷移する区間は、[ ~borderの両~半径, および内縁~曲線の中心 ]を包含する,最~小な矩形に入るモノトスル (いずれかの~border半径が対応する`~border幅$以下になる場合、 内縁な曲線は直角になり,中心は`~padding辺$の隅に来る)。 ◎ Color and style transitions must be contained within the segment of the border that intersects the smallest rectangle that contains both border radii as well as the center of the inner curve (which may be a point representing the corner of the padding edge, if the border radii are smaller than the border width).
隅で出会う~borderのうち一方の`幅$bDが 0 の場合、 他方の~borderが遷移区間の全体を占める。 他の場合、 これら連接している~borderの合間における[ `色$bD/`~style$bD ]に対する遷移の中点は,[ 連続的かつ単調な[ 2つの `border-*-width$p の比率 ]の関数 ]から得られる,曲線~上の一点に来る。 しかしながら、[ これらの遷移の外見/ この比率から曲線~上の点に対応付ける関数 ]は,定義されない。 ◎ If one of these borders is zero-width, then the other border takes up the entire transitional area. Otherwise, the center of color and style transitions between adjoining borders is a point along the curve that is a continuous monotonic function of the ratio of the border widths. However it is not defined what these transitions look like or what function maps from this ratio to a point on the curve.
3.3. 曲線が重合する場合
~UAは、 辺の両端にある 2 隅の合間で隣接する曲線が重合しないようにするモノトスル: それらの曲線の~border半径の和が`~border~box$の~sizeを超過するときは、 4 隅における~border半径の使用~値を[ そのどれもが重合しなくなる所まで,一様な倍率で削減する ]モノトスル。 そうするための~algoは: ◎ Corner curves must not overlap: When the sum of any two adjacent border radii exceeds the size of the border box, UAs must proportionally reduce the used values of all border radii until none of them overlap. The algorithm for reducing radii is as follows:
- %係数【!f】 ~LET 無限大
 - 
~boxの ~EACH( 辺 %辺 ) に対し:
- %除数 ~LET %辺 の両端にある 2 隅の[ %辺 と平行な軸の半径 ]の総和
 - %係数 ~SET `min^op( %係数, %辺 の長さ【!平行な方向の~boxの~size】 ~DIV %除数 )
 
 - ~IF[ %係数 ~LT 1 ] ⇒ ~boxの各~隅に対し,その各~半径に %係数 を乗算する
 
注記: この公式は、 四分~円を四分~円のままに保ち,各~隅の半径どうしの~~大小関係も保つが、 すでに十分~小さい半径も削減させ得るので, 同じ外見が保たれるべき~border【!?of nearby elements 】の外見も変え得る。 ◎ Note: This formula ensures that quarter circles remain quarter circles and large radii remain larger than smaller ones, but it may reduce corners that were already small enough, which may make borders of nearby elements that should look the same look different.
曲線が~scrollbarなどの~UI要素に干渉する場合、 ~UAは更に,影響される隅の半径に限り,その使用~値を必要な分だけ削減してもヨイ。 ◎ If the curve interferes with UI elements such as scrollbars, the UA may further reduce the used value of the affected border radii (and only the affected border radii) as much as necessary, but no more.
例えば,次の~styleからは: ◎ For example, the borders A of the figure below might be the result of
box-sizing: border-box; width: 6em; height: 2.5em; border-radius: 0.5em 2em 0.5em 2em
下図 A のような~borderが得られるであろう。 縦幅( `2.5em^v )は、 指定された半径( `0.5em^v ~PLUS `2.0em^v )に十分であるが、 次のように縦幅が `2em^v しかない場合: ◎ The height (2.5em) is enough for the specified radii (0.5em plus 2.0em). However, if the height is only 2em,
box-sizing: border-box; width: 6em; height: 2em; border-radius: 0.5em 2em 0.5em 2em
それらを収めるためには、 すべての隅について,係数 0.8 で削減される必要がある。 よって,~border半径の使用~値は、 図の B のように[ ( `0.5em^v, `2em^v に代えて) `0.4em^v, `1.6em^v ]になる。 ◎ all corners need to be reduced by a factor 0.8 to make them fit. The used border radii thus are 0.4em (instead of 0.5em) and 1.6em (instead of 2em). See borders B in the figure.
4 隅のうち対角に位置する 2 隅が小さく丸められ,残りの 2 隅が大きく丸められた矩形 ◎ rectangle with two tiny rounded corners and two very large ones, on opposite corners
3.4. ~tableに対する効果
~tableにおいては、 その `border-collapse$p に応じて: ◎ ↓
- `separate^v (~borderが分離される~mode)の場合 ⇒ `border-*-radius$p ~propは、[ `table@~CSSDISP#valdef-display-table$v / `inline-table@~CSSDISP#valdef-display-inline-table$v / `table-cell@~CSSDISP#valdef-display-table-cell$v ]~boxにも適用される。 ◎ The border-radius properties do apply to table, inline-table, and table-cell boxes in separated borders mode (border-collapse: separate).\
 - `collapse^v の場合 ⇒ `border-*-radius$p ~propの効果は無い。 ◎ When border-collapse is collapse, they have no effect.
 
3.5. 隅の~sizing: `border-*-*-radius^p ~prop
これら各~propの値を成す 2 個の `length-percentage$t は、 `~border半径@ — 順に,四分~楕円の[ 横, 縦 ]半径 — を定義することにより, `~border辺$の外縁の隅~形状(下の図式を見よ)を定義する。 2 個目の値が省略された場合、 1 個目の値から複製される。 どちらかの長さが 0 の場合、 隅は丸められず,直角になる。 [ 横/縦 ]半径に対する百分率は,`~border~box$の[ 横幅/縦幅 ]に相対的になる。 ◎ The two <length-percentage> values of the border-*-radius properties define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge (see the diagram below). The first value is the horizontal radius, the second the vertical radius. If the second value is omitted it is copied from the first. If either length is zero, the corner is square, not rounded. Percentages for the horizontal radius refer to the width of the border box, whereas percentages for the vertical radius refer to the height of the border box.\
負な値は妥当でない。 ◎ Negative values are invalid.
~~想定される楕円を表す図式 ◎ Diagram of the inscribed ellipse
次の例は、 ~~幅 `15em^v, ~~高さ `10em^v の~~楕円状に描く。 ◎ This example draws ovals of 15em wide and 10em high:
div.standout {
  width: 13em;
  height: 8em;
  border: solid black 1em;
  border-radius: 7.5em 5em;
}
これらのうち名前に[ `start^css / `end^css ]を伴うものは`~flow相対$な~propであり, 他は`物理的$な~propである。 前者と後者の対応付けは、 当の要素の[ `writing-mode$p, `direction$p, `text-orientation$p ]に依存する — 各~flow相対な~prop名を成す[ `start^css / `end^css ]のうち[ 1 個目は塊-軸, 2 個目は行内-軸 ]の[ 始端/終端 ]側を表すことに基づいて。 ◎ The flow-relative properties border-start-start-radius, border-start-end-radius, border-end-start-radius, and border-end-end-radius correspond to the physical properties border-top-left-radius, border-bottom-left-radius, border-top-right-radius, and border-bottom-right-radius. The mapping depends on the element’s writing-mode, direction, and text-orientation, with the first start/end giving the block axis side, and the second the inline-axis side (i.e. patterned as 'border-block-inline-radius').
3.6. 隅の~sizing略式: `border-radius^p, `border-*-radius^p 略式~prop
3.6.1. ある側を成す隅たちの~sizing: `border-*-radius^p 略式~prop
これらの略式~propは、 次の表tに挙げるとおり, 関係する側を成す 2 個の `border-*-*-radius$p 下位propを設定する。 ~slashを挟んで[ 前/後 ]にある各[ 2 個の値 ]は、 次の表tの 2 列目, 3 列目に挙げる順序で対応する下位propの[ 横/縦 ]半径を設定する:
- ~slashが無い場合、[ 横, 縦 ]両~半径を等しく設定する。
 - 2 個目の値が省略された場合、 1 個目の値から複製される。
 
| 略式~prop | 下位prop | |
|---|---|---|
| `border-top-radius$p | `border-top-left-radius$p | `border-top-right-radius$p | 
| `border-right-radius$p | `border-top-right-radius$p | `border-bottom-right-radius$p | 
| `border-bottom-radius$p | `border-bottom-left-radius$p | `border-bottom-right-radius$p | 
| `border-left-radius$p | `border-top-left-radius$p | `border-bottom-left-radius$p | 
| `border-block-start-radius$p | `border-start-start-radius$p | `border-start-end-radius$p | 
| `border-block-end-radius$p | `border-end-start-radius$p | `border-end-end-radius$p | 
| `border-inline-start-radius$p | `border-start-start-radius$p | `border-end-start-radius$p | 
| `border-inline-end-radius$p | `border-start-end-radius$p | `border-end-end-radius$p | 
3.6.2. すべての隅の一括な~sizing: `border-radius^p 略式~prop
`border-radius$p 略式~propは、 4 隅すべての `border-*-radius^p ~propをまとめて設定する。 ~slashを挟んで[ 前/後 ]にある値たちが[ 横/縦 ]半径を設定する — ~slashが無い場合、 両~半径を等しく設定する。 一連の値は、 各~隅の半径を`時計回りに設定する$ — [ `border-top-left-radius$p, `border-top-right-radius$p, `border-bottom-right-radius$p, `border-bottom-left-radius$p ]下位propを順に[ 上端, 右端, 下端, 左端 ]に対応付ける下で。 ◎ The border-radius shorthand sets all four border-*-radius properties. If values are given before and after the slash, then the values before the slash set the horizontal radii and the values after the slash set the vertical radii. If there is no slash, then the values set the radii in both axes equally. The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left. If bottom-left is omitted it is the same as top-right. If bottom-right is omitted it is the same as top-left. If top-right is omitted it is the same as top-left.
`border-radius: 4em;^css は、 次と等価になる ◎ border-radius: 4em; ◎ is equivalent to
border-top-left-radius: 4em; border-top-right-radius: 4em; border-bottom-right-radius: 4em; border-bottom-left-radius: 4em;
`border-radius: 2em 1em 4em / 0.5em 3em;^css は、 次と等価になる: ◎ and ◎ border-radius: 2em 1em 4em / 0.5em 3em; ◎ is equivalent to
border-top-left-radius: 2em 0.5em; border-top-right-radius: 1em 3em; border-bottom-right-radius: 4em 0.5em; border-bottom-left-radius: 1em 3em;
3.7. 隅の形状付け: `corner-*-*-shape^p ~prop
既定では、 `border-radius$p 用の 0 以外の値は, 影響される隅を丸める四分~楕円が成す `隅~図形@ を定義する — `border-radius$p により当の隅~用に定義される `隅~区画@ を埋めるよう。 しかしながら, 一部の事例では、 他の`隅~図形$が欲される。 各種 `corner-*-shape$p ~prop(および,それらの略式~prop)は、 ~boxが[ `border-*-radius$p 値により定義される領域 ]用に[ 正確にどの`隅~図形$を利用することになるか ]を指定する。 ◎ By default, non-zero border-radius values define a quarter-ellipse corner shape that rounds the affected corners, filling the corner area defined by the border-radius for that corner. However in some cases, other corner shapes are desired. The corner-*-shape properties (and their shorthands) specify exactly what corner shapes a box will use for the region defined by its border-*-radius values.
すべての`隅~図形$は、 異なる~parameterをとる`超楕円^emにより表出できる。 超楕円は、 楕円の一般~化であり,[ 正方形, 楕円, `notch^en 【凹な直角】 ]の合間を成すすべての図形を その %K ~parameter【`超楕円~parameter$】で表出できることに基づく。 ◎ The different corner shapes can all be expressed as different parameters to a superellipse. A superellipse is a generalization of an ellipse, and based on its `k` parameter can express all the shapes between a square, an ellipse, and a notch.
超楕円は,どう働くか? ◎ How does a superellipse work?
単位~円は、 次の等式により定義される: ◎ A unit circle is defined by the equation:
単位~円は、 この等式を満たす すべての点 ( %x, %y ) からなる。 すべての楕円は、 この図形を[ ~X軸, ~Y軸 ]において拡縮することにより生産できる。 ◎ The circle is made from all points (x,y) that satisfy the equation. A given ellipse can then be produced by scaling this shape in the X and/or Y axis.
単位~超楕円を定義する等式は、 冪指数 2 を変数に変更するだけである。 この仕様の目的においては、 それは, 2%K として記される: ◎ The unit superellipse equation just changes the 2 exponent into a variable. For this spec’s purposes, we’ll write it as 2K:
`superellipse$f は、 この等式における %K を引数にとる。 ◎ The K in this equation is the superellipse() argument.
実数 %K は,どの値【正な無限大, 負な無限大も含む】もとり得る — それにより,超楕円を成す曲線たちが成す族~全体を定義する: ◎ K can be any value; setting K to 1 gives the standard circle/ellipse equation, but other values define the entire family of superellipse curves:
- 
%K が正なときは、 凸な曲線を定義する:
- %K ~EQ 1 のときは、 標準な[ 真円/楕円 ]等式が得られる。
 - %K が大きくなるほど正方形に近づく — %K が無限大ならば正方形になる ( %K が 10 を超えるあたりから,正方形とほとんど判別-不能になる【!it scales very quickly】)。 伝統的な “`squircle^en” は、 %K として 2 を利用する。
 - %K が小さくなるほど平たくなる。
 
 - %K ~EQ 0 のときは、 凹凸が無い菱形になる。 ◎ when K is 0 it’s a diamond with perfectly flat sides.
 - 
%K が負なときは、 凹な曲線を定義する — 概ね,正な値から取得できるものと正反対な:
- %K ~EQ −1 のときは、 ほぼ楕円状な “窪み( `scoop^en )” になり, 概ね %K が 1 のときの正反対になる。
 - %K ~EQ −2 のときは、 ほぼ `squircle^en な “窪み” になる。
 - %K が負な無限大ならば、 正方形な “窪み” になる。
 
 
(超楕円は、 ほとんどの文献では,より単純な[ 冪指数に を用いた等式 ]で書かれていることに注意。 ここで による形が選ばれたのは、 引数~範囲の選り分けが容易になるからである: 【!不要 all possible values are valid】 正負を~~反転すれば【およそ】対称な図形が得られ, 0 が “真中” の `bevel^en 【斜線】になる, 等々) ◎ (Note that most literature on superellipses will write the equation with a simpler x K exponent. The x 2 K form was chosen here to make the argument ranges easier to reason about: all possible values are valid, the symmetrical shapes are just positive/negative, the "middle" bevel is 0, etc.)
全部的な表出と補間を許容するため、 各種 `corner-shape$p ~propは,`超楕円~parameter$を[ `superellipse$f 関数/ 共通的に利用される~parameterを表現する各種~keyword ]を利用して直に供せる。 詳細は `corner-shape-value$t の定義を見よ。 ◎ To allow full expression as well as interpolation, the corner-shape properties can provide the superellipse parameter directly using the superellipse() function, or use one of the supplied keywords which represent commonly used parameters. See the <corner-shape-value> definition for details.
これらの下位propは、 対応する隅~用の`隅~図形$を設定する。 ◎ The corner-*-*-shape longhand properties set the corner shape for the given corner.
これらのうち名前に[ `start^css / `end^css ]を伴うものは`~flow相対$な~propであり, 他は`物理的$な~propである。 前者と後者の対応付けは、 当の要素の[ `writing-mode$p, `direction$p, `text-orientation$p ]に依存する — 各~flow相対な~prop名を成す[ `start^css / `end^css ]のうち[ 1 個目は塊-軸, 2 個目は行内-軸 ]の[ 始端/終端 ]側を表すことに基づいて。 ◎ The flow-relative longhands (corner-start-start-shape, etc) correspond to the physical longhands (corner-top-left-shape, etc) depending on the element’s writing-mode, direction, and text-orientation. The first start/end gives the block axis side, and the second the inline-axis side (i.e. patterned as corner-block-inline-shape).
`corner-shape-value@t = `round$v | `scoop$v | `bevel$v | `notch$v | `square$v | `squircle$v | `superellipse()$t `superellipse()@t = superellipse(`number$t | `infinity^v | `-infinity^v)
- `round@v
 - `隅~図形$は `superellipse(1)^v に等価(凸な四分~楕円)になる。 ◎ The corner shape is a quarter of a convex ellipse. Equivalent to superellipse(1).
 - 注記: この値が各種 `corner-*-*-shape^p の初期~値として選ばれたのは、 それが,これらの~propが存在する前における `border-radius$p の挙動であったことによる。 ◎ Note: This is the initial value of corner-shape properties, as it was the behavior of border-radius before corner-shape existed.
 - `squircle@v
 - `隅~図形$は `superellipse(2)^v に等価 ( `round$v, `square$v の合間にある凸な四分 “`squircle^en” ) になる。 ◎ The corner shape is a quarter of a "squircle", a convex curve between round and square. Equivalent to superellipse(2).
 - `square@v
 - `隅~図形$は `superellipse(infinity)^v に等価 (凸な~~直角) になる。 ◎ The corner shape is a convex 90deg angle. Equivalent to superellipse(infinity).
 - 注記: これは、 `border-radius$p が `0^v をとるとき取得される “通常の” 直角な隅と見かけは一致するが, `corner-shape$p 用の他の値と滑らかに~animateできる。 ◎ Note: This looks identical to the "normal" square corner you get from border-radius: 0, but it can smoothly animate with the other corner-shape values.
 - `bevel@v
 - `隅~図形$は `superellipse(0)^v に等価 (凸でも凹でもない斜線) になる。 ◎ The corner shape is a straight diagonal line, neither convex nor concave. Equivalent to superellipse(0).
 - `scoop@v
 - `隅~図形$は `superellipse(-1)^v に等価 (凹な四分~楕円) になる。 ◎ The corner shape is a concave quarter-ellipse. Equivalent to superellipse(-1).
 - `notch@v
 - `隅~図形$は `superellipse(-infinity)^v に等価 (凹な~~直角) になる。 ◎ The corner shape is a concave 90deg angle. Equivalent to superellipse(-infinity).
 - `superellipse()$t
 - `隅~図形$は四分~超楕円になる。 引数 %K は、 `超楕円~parameter@ と称され,冪指数 2%K を利用して超楕円を定義する。 ◎ The corner shape is a quarter of a superellipse. The argument K is the superellipse parameter, and it defines a superellipse using an exponent of 2K.
 - 超楕円を成す数学的な定義の説明, 様々な %K 値が何を意味するかについては、 `§ 隅の形状付け@#corner-shaping$ 内の注記を見よ。 超楕円が精確に どう算出され, 描画されるかの詳細は、 `§ 隅~図形の描画-法@#corner-shape-rendering$ を見よ。 ◎ See the note in § 3.7 Corner Shaping: the corner-*-shape properties for an explanation of the mathematical definition of a superellipse, and what various K values mean. See § 3.9.4 Rendering corner-shape for precise details of how the superellipse is computed and rendered.
 
注記: `border-radius$p が指定されなかった(または 0 に設定された)場合、 `隅~区画$の~sizeも 0 になり, `corner-shape$p による効果は無くなる。 ◎ Note: If border-radius is not specified (or is set to 0), the corner area is zero-sized as well, and corner-shape won’t have any effect.
`corner-*-shape$p は、 当の隅の形状を違えることを除き, `border-*-radius$p 用の`~overflow$規則を改めない — 当の要素【の内容】は、 形状付けられた~borderにより通常通り切取られる。 ◎ corner-*-shape does not alter the overflow rules for border-*-radius, except insofar as it shapes the corners differently; elements are still clipped by the shaped border as normal.
`corner-*-shape$p により指定された曲線は、 `~border区画$の`外縁^emな辺を定義する。 ~border区画の内縁な辺は、 外縁な辺を成す曲線を — 全体を通して,外縁~辺から ほぼ一貫した距離を~~保つよう (あるいは、 当の隅にて出会っている 2 本の~border辺の`幅$bDが一致しない場合は, 距離が線形に増減していくよう) — なぞる (それは、 超楕円な曲線になるとは限らない)。 ◎ The curve specified by corner-*-shape defines the outer edge of the border. The inner edge of the border follows the curve of the outer edge (in a way that’s not necessarily expressible as a superellipse curve), with a nearly consistent distance from the outer edge throughout, (or a linearly increasing distance if the border-width of the two border edges meeting at the the corner are not uniform).
`corner-*-shape$p は、 `box-shadow$p の描画にも[ `~overflow切取n辺$が~boxから拡張されるときにおける,その形状付け ]にも影響するが、 これらは,内縁な~border辺の様に `corner-*-shape$p による~pathを直になぞることはない。 代わりに,それは、 当の~pathを軸に整列される方式で拡縮する 【`§ 隅~図形の描画-法@#corner-shape-rendering$】。 ◎ corner-*-shape also affects the rendering of box-shadow, and how the overflow clip edge is shaped when it’s extended from the box, but these do not directly follow the corner-*-shape path like the inner border edge does. Instead, it scales the corner-shape path in an axis-aligned manner.
3.8. 隅の形状付け略式: `corner-shape^p, `corner-*-shape^p 略式~prop
3.8.1. ある側を成す隅たちの形状付け: `corner-*-shape^p 略式~prop
これらの略式~prop — うち名前に[ `start^css / `end^css ]を伴うものは`~flow相対$な~propであり, 他は`物理的$な~propである — は、 次の表tに挙げるとおり, 関係する側を成す 2 個の `corner-*-*-shape$p 下位propを設定する。 2 個の値は、 次の表tの 2 列目, 3 列目に挙げる順序で,対応する下位propの値を設定する — 値が 1 個だけ与えられた場合、 それが 2 個目の値も与える:
| 略式~prop | 下位prop | |
|---|---|---|
| `corner-top-shape$p | `corner-top-left-shape$p | `corner-top-right-shape$p | 
| `corner-right-shape$p | `corner-top-right-shape$p | `corner-bottom-right-shape$p | 
| `corner-bottom-shape$p | `corner-bottom-left-shape$p | `corner-bottom-right-shape$p | 
| `corner-left-shape$p | `corner-top-left-shape$p | `corner-bottom-left-shape$p | 
| `corner-block-start-shape$p | `corner-start-start-shape$p | `corner-start-end-shape$p | 
| `corner-block-end-shape$p | `corner-end-start-shape$p | `corner-end-end-shape$p | 
| `corner-inline-start-shape$p | `corner-start-start-shape$p | `corner-end-start-shape$p | 
| `corner-inline-end-shape$p | `corner-start-end-shape$p | `corner-end-end-shape$p | 
3.8.2. すべての隅の一括な形状付け: `corner-shape^p 略式
`corner-shape$p ~propは、 当の~boxの `border-radius$p により指定された領域の中の 4 隅の形状を指定する。 4 個の値は各~隅の形状を`時計回りに設定する$ — [ `corner-top-left-shape$p, `corner-top-right-shape$p, `corner-bottom-right-shape$p, `corner-bottom-left-shape$p ]下位propを順に[ 上端, 右端, 下端, 左端 ]に対応付ける下で。 ◎ The corner-shape property specifies the shape of the box’s corners, within the region specified by border-radius. The four values set the top, right, bottom and left shape, respectively. A missing left is the same as right, a missing bottom is the same as top, and a missing right is also the same as top.
【† 原文は[ 上端, 右端, 下端, 左端 ]隅の形状を設定するように述べられているが, 誤りに思われる — だとすると[ `corner-top-shape$p, `corner-right-shape$p, `corner-bottom-shape$p, `corner-left-shape$p ]を設定するものと解釈する他にないが、 例えば[ `corner-top-shape^p, `corner-right-shape^p ]は右上~隅を共有するので,どの順序で設定するのか多義的になる。 】
3.9. 隅の~sizingと形状付け略式: `corner^p, `corner-*^p 略式~prop
3.9.1. ある隅の~sizingと形状付け: `corner-*-*^p 略式~prop
これらの`略式~prop$は、 関係する側を成す[ `corner-*-*-shape$p, `border-*-*-radius$p ]下位propを設定する†。 更なる詳細は、 対応している[ `corner-*-*-shape^p, `border-*-*-radius^p ]~propを見よ。 ◎ The corner-*-* shorthands set the two corner-*-*-shape and border-*-*-radius longhand properties of the related side. See the corresponding corner-*-*-shape and border-*-*-radius properties for further details.
【† `*-*^css を成す部分が一致する下位prop — `corner-top-left$p は[ `corner-top-left-shape$p, `border-top-left-radius$p ]に対応する, 等々。 】
3.9.2. ある側を成す隅たちの~sizingと形状付け: `corner-*^p 略式~prop
これらの`略式~prop$は、 関係する側を成す[ 2 個の `corner-*-*-shape$p, 2 個の `border-*-*-radius$p ]下位propを設定する†。 更なる詳細は、 対応している[ `corner-*-*-shape^p, `border-*-*-radius^p ]~propを見よ。 ◎ The corner-* shorthands set the two corner-*-shape longhand properties and two border-*-radius longhand properties of the related side. See the corresponding corner-*-shape and border-*-radius properties for further details.
【† 次の表tの 2 列目に挙げる~propたちの下位propに対応する: 】
| `corner-top$p | `corner-top-left$p, `corner-top-right$p | 
| `corner-right$p | `corner-top-right$p, `corner-bottom-right$p | 
| `corner-bottom$p | `corner-bottom-left$p, `corner-bottom-right$p | 
| `corner-left$p | `corner-top-left$p, `corner-bottom-left$p | 
| `corner-block-start$p | `corner-start-start$p, `corner-start-end$p | 
| `corner-block-end$p | `corner-end-start$p, `corner-end-end$p | 
| `corner-inline-start$p | `corner-start-start$p, `corner-end-start$p | 
| `corner-inline-end$p | `corner-start-end$p, `corner-end-end$p | 
3.9.3. すべての隅の一括な~sizingと形状付け: `corner^p 略式
`corner$p `略式~prop$は、 すべての[ `corner-*-shape^p, `border-*-radius^p ]下位propを一緒に設定する。 ◎ The corner shorthand sets the corner-*-shape and border-*-radius longhands all together.
3.9.4. 隅~図形の描画-法
形状付けられた隅を伴う~box【!element(以下同様)】を描画するときには、 当の~boxの~pathは、[ `~border$, `外形線$, `box-shadow$p, `overflow-clip-margin$p, その他 ]に基づいて~offsetされる必要がある。 ◎ When rendering elements with shaped corners, the element’s path needs to be offset, based on border, outline, box-shadow, overflow-clip-margin and more.
~offset【する方向】は、 ~borderや外形線を描画するときは,当の~boxの形状を成す曲線に整列される一方で、 `box-shadow$p を描画するときや `overflow-clip-margin$p 用に~offsetするときは, 軸に整列される。 ◎ When rendering borders or outlines, the offset is aligned to the curve of the element’s shape, while when rendering box-shadow or offsetting for overflow-clip-margin, the offset is aligned to the axis.
隅~図形の調整-法 ◎ Adjusting corner shapes
`~box$の`~border$は、 その`外縁な輪郭$と`内縁な輪郭$の合間を成す区画~内に描画される。 ◎ An element’s border is rendered in the area between its outer contour and its inner contour.
`~box$の`外形線$は、 当の~boxの[ `outline-width$p, `outline-offset$p ]の`使用~値$に基づいて, 当の~boxの`外縁な輪郭$をなぞる。 それが描画される精確な仕方は、 実装定義である。 ◎ An element’s outline follows the outer contour with the used outline-width and outline-offset. The precise way in which it is rendered is implementation-defined.
`~box$の`~overflow$区画は、 その`内縁な輪郭$により形状付けられる。 `~box$の`~overflow切取n辺$は、 次の結果により形状付けられる ⇒ `~border輪郭~path$( %~box, %~box の`~padding辺$, %~box の `overflow-clip-margin$p の`使用~値$ ) ◎ An element’s overflow area is shaped by its inner contour. An element’s overflow clip edge is shaped by the border contour path given element, and element’s padding edge, and element’s used overflow-clip-margin.
`~box$の `box-shadow$p による各~影は、 次の結果により形状付けられる ⇒ `~border輪郭~path$( %~box, %~box の`~border辺$, %~box の `box-shadow-spread$p ~propの`使用~値$を成す当の影に対応する値 ) ◎ Each shadow of element’s 'box shadow' is shaped by the border contour path given element, and element’s border edge, and the shadow’s used box-shadow-spread.
`~border輪郭~path@ を算出する~algoは、 所与の ( `~box$ %~box, `辺$ %~target辺, 実数 %拡幅 ~DF 0 ) に対し: ◎ To compute an element element’s border contour path given an edge targetEdge and an optional number spread (default 0):
【 以下,この~algoを成す内容は未訳。 】
3.9.5. 対角な半径の拘束-法
凹な `corner-shape$p 値が在る(`超楕円~parameter$は負である)ときは、 対角な隅どうしが互いに重合するかもしれない。 ◎ When concave corner-shape values are present (the superellipse parameter is negative), diagonally opposite corners might overlap each other.
次の例は、 拘束されない場合,重合している隅たちを作成することになる。 ◎ The following example would create overlapping corners if not constrained.
div {
  corner-shape: scoop;
  border-top-left-radius: 80%;
  border-bottom-right-radius: 80%;
}
これを防止するため、 4 個の半径は,重合しないよう拘束される。 これは、 互いに対角な各~隅に対し外殻~多角形【隅~図形に外接する多角形】を算出して, 最~大な縮小-係数を見出すことことにより行われる — それを両~隅に適用したなら,両~多角形が交差しなくなるような。 ◎ To prevent this, the four radii are constrained to prevent overlaps. This is done by computing a hull polygon for each of the opposite corners, and finding the highest downscale factor which, if applied to both corners, would make it so that the polygons would not intersect.
`対角~隅の拡縮-係数@ を算出する~algoは、 所与の ( `~box$ %~box ) に対し: ◎ To compute the opposite corner scale factor given an element element:
- %矩形 ~LET %~box の`~border~box$が成す矩形 ◎ Let rect be element’s border box.
 - %外殻~群 ~LET 新たな~map ◎ ↓
 - 
次の表t…
`右上^i `corner-top-right-shape$p 0° `border-top-right-radius$p `右下^i `corner-bottom-right-shape$p 90° `border-bottom-right-radius$p `左下^i `corner-bottom-left-shape$p 180° `border-bottom-left-radius$p `左上^i `corner-top-left-shape$p 270° `border-top-left-radius$p …を成す ~EACH( 行 %行 ) に対し:
- %外殻 ~LET `正規化-済みな隅~外殻$( %~box の[ %行 の 2 列目に挙げた~prop ]の`算出d値$ )
 - %外殻 ~SET %外殻 を原点 ( 0.5, 0.5 ) の~~周りで[ %行 の 3 列目に挙げた角度 ]で回転した結果
 - ( %横~半径, %縦~半径 ) ~LET %~box の[ %行 の 4 列目に挙げた~prop ]の`算出d値$の ( 横~成分, 縦~成分 )
 - %位置 ~LET %行 の 1 列目に挙げた名前
 - %移動量 ~LET %位置 に応じて ⇒# `右上^i ならば [ %矩形 の`横幅~寸法$ ~MINUS %横~半径, 0 ] / `右下^i ならば [ %矩形 の`横幅~寸法$ ~MINUS %横~半径, %矩形 の`縦幅~寸法$ ~MINUS %縦~半径 ] / `左下^i ならば [ 0, %矩形 の`縦幅~寸法$ ~MINUS %縦~半径 ] / `左上^i ならば [ 0, 0 ]
 - %変形 ~LET 拡縮ng~vector [ %横~半径, %縦~半径 ] による`~2D拡縮ng$を適用してから, 移動量~vector %移動量 による`~2D並進$を適用する変形
 - %外殻 の~index群を成す ~EACH( %~index ) に対し ⇒ %外殻[ %~index ] ~SET %外殻[ %~index ] に %変形 を適用した結果
 - %外殻~群[ %位置 ] ~SET %外殻
 
 - %拡縮-係数~A ~LET 次を満たす最~大な実数 ⇒ [ %外殻~群[ `左上^i ], %外殻~群[ `右下^i ] ]を各自の最初の点を原点に利用して拡縮した結果の多角形どうしは,交差しない ◎ Let scaleFactorA be the highest number which, if both topLeftHull and bottomRightHull were scaled by, using their first point as the origin, those polygons would not intersect.
 - %拡縮-係数~B ~LET 次を満たす最~大な実数 ⇒ [ %外殻~群[ `右上^i ], %外殻~群[ `左下^i ] ]を各自の最初の点を原点に利用して拡縮した結果の多角形どうしは,交差しない ◎ Let scaleFactorB be the highest number which, if both topRightHull and bottomLeftHull were scaled by, using their first point as the origin, those polygons would not intersect.
 - ~RET `min^op【`max^op ?】( 1, %拡縮-係数~A, %拡縮-係数~B ) ◎ Return min(1, scaleFactorA, scaleFactorB).
 
3.9.6. 隅~図形の補間-法
`corner-shape-value$t は, 常に`超楕円~parameter$を伴う `superellipse$f により表出できるので、 2 個の `corner-shape-value$t どうしの補間は,互いの`超楕円~parameter$どうしを補間することにより行われる。 それは `log2^op を利用するので、 線形に補間すると, 凹な隅どうしの補間の方が凸な隅どうしの補間よりも【~animationにおいて】ずっと高速になる。 そうならないようにするため、 `超楕円の補間@ においては, `超楕円~parameter$を以下の公式により 0 以上 1 以下の値 【以下においては “補間~値” と記される】 へ変換してから,その逆へ変換する: ◎ Since a <corner-shape-value> can always be expressed by a superellipse() with an superellipse parameter variable, interpolating between two <corner-shape-value>s is done by interpolating the superellipse parameter itself. Since it uses a log2, interpolating it linearly would result in an effect where concave corners interpolate at a much higher velocity than convex corners. To balance that, the superellipse interpolation formula describes how a superellipse parameter is converted to a value between 0 and 1, and vice versa:
`正規化-済みな超楕円~半-隅@ を算出する~algoは、 所与の ( `超楕円~parameter$ %s ) に対し: ◎ To compute the normalized superellipse half corner given a superellipse parameter s,\
- ~IF[ %s ~EQ −∞ ] ⇒ ~RET 0 ◎ return the first matching statement, switching on s: ◎ -∞ • Return 0.
 - ~IF[ %s ~EQ +∞ ] ⇒ ~RET 1 ◎ ∞ • Return 1. ◎ Otherwise
 - %k ~LET `pow^op( 0.5, `abs^op( %s ) ) ◎ Let k be 0.5abs(s).
 - %凸な半-隅 ~LET `pow^op( 0.5, %k ) ◎ Let convexHalfCorner be 0.5k.
 - ~IF[ %s ~LT 0 ] ⇒ ~RET 1 ~MINUS %凸な半-隅 ◎ If s is less than 0, return 1 - convexHalfCorner.
 - ~RET %凸な半-隅 ◎ Return convexHalfCorner.
 
`正規化-済みな隅~外殻@ を算出する~algoは、 所与の ( `超楕円~parameter$ %曲率 ) に対し,点たちが成す~listを返す (結果の~listは、 それを成す点たちを順に結んで得られる多角形を表現する): ◎ To compute the normalized inner corner hull given a superellipse parameter curvature:
- ~IF[ %曲率 ~GTE 0 ] ⇒ ~RET « (1, 1), (1, 0), (0, 1) » ◎ If curvature is greater than or equal to zero, return a triangle betwen « (1, 1), (1, 0), (0, 1) ».
 - %軸~線~A ~LET ( 1, 0 ) と ( 1, 1 ) を通る線 ◎ Let axisLineA be a line between (1, 0) and (1, 1).
 - %軸~線~B ~LET ( 0, 1 ) と ( 1, 1 ) を通る線 ◎ Let axisLineB be a line between (0, 1) and (1, 1).
 - %正規化-済み半-隅 ~LET `正規化-済みな超楕円~半-隅$( %曲率 ) ◎ Let normalizedHalfCorner be the normalized superellipse half corner given curvature.
 - %半-隅~点 ~LET ( %正規化-済み半-隅, 1 ~MINUS %正規化-済み半-隅 ) ◎ Let halfCornerPoint be (normalizedHalfCorner, 1 - normalizedHalfCorner).
 - %接線 ~LET 次を満たす線 ⇒ [ %半-隅~点 を通る ]~AND[ ( 0, 0 ) と %半-隅~点 を結ぶ線に垂直である ] ◎ Let lineFromCenterToHalfCorner be a line between (0, 0) and halfCornerPoint. ◎ Let tangentLine be the line perpendicular to lineFromCenterToHalfCorner, at halfCornerPoint.
 - %交点~A ~LET %軸~線~A と %接線 の交点 ◎ Let intersectionA be the intersection between axisLineA and tangentLine.
 - %交点~B ~LET %軸~線~B と %接線 の交点 ◎ Let intersectionB be the intersection between axisLineB and tangentLine.
 - ~RET « (1, 1), (1, 0), %交点~A, %交点~B, (0, 1) » ◎ Return a pentagon between the points « (1, 1), (1, 0), intersectionA, intersectionB, (0, 1), (1, 1) ».
 
所与の[ 0 以上 1 以下の実数 %補間~値 ]を`超楕円~parameter$へ戻すよう変換する~algoは: ◎ To convert a <number [0,1]> interpolationValue back to a superellipse parameter, switch on interpolationValue:
- ~IF[ %補間~値 ~IN { 0, 0.5, 1 } ] ⇒ ~RET %補間~値 に応じて ⇒# 0 ならば −∞ / 0.5 ならば 0 1 ならば ∞ ◎ • 0 •• Return -∞. • 0.5 •• Return 0. • 1 •• Return ∞. • Otherwise
 - %凸な半-隅 ~LET %補間~値 ◎ Let convexHalfCorner be interpolationValue.
 - ~IF[ %補間~値 ~LT 0.5 ] ⇒ %凸な半-隅 ~SET 1 ~MINUS %補間~値 ◎ If interpolationValue is less than 0.5, set convexHalfCorner to 1 - interpolationValue.
 - %k ~LET `ln^op( 0.5) ~DIV `ln^op( %凸な半-隅 ) ◎ Let k be ln(0.5) / ln(convexHalfCorner).
 - %s ~LET `log2^op( %k ) ◎ Let s be log2(k).
 - ~IF[ %補間~値 ~LT 0.5 ] ⇒ ~RET − %s ◎ If interpolationValue is less than 0.5, return -s.
 - ~RET %s ◎ Return s.
 
4. ~border画像
作者は、 ~border~styleに代えて,画像を利用するよう指定できる。 この事例では、 ~borderは,[ `border-image-source$p により指定される画像 ]を成す 8 個の画像~片 — 各~隅に~~接している部位, それらに~~挟まれた各~側(上下左右)に接している部位 — により設計される。 これらの画像~片は、 `~border画像~区画$の~sizeに収まるよう,様々な仕方で[ 切分けられ, 拡縮され, 伸張され ]得る。 ◎ Authors can specify an image to be used in place of the border styles. In this case, the border’s design is taken from the sides and corners of an image specified with border-image-source, whose pieces may be sliced, scaled, and stretched in various ways to fit the size of the border image area.\
この節に挙げる各種 `border-image-*^p ~propは、 ~layoutには影響しない — [ ~box, その内容, その周囲の内容 ]の~layoutは、[ `border-*-width$p, `border-*-style$p ]以外の `border-*^p ~propに基づくことはない。 ◎ The border-image properties do not affect layout: layout of the box, its content, and surrounding content is based on the border-width and border-style properties only.
次の例で作成される~borderでは、 橙色な菱形が[ 上端, 下端 ]~borderには整数個, [ 左端, 右端 ]~borderには伸張されたものが 1 個だけ並べられる。 4 隅の色は、 別の色を伴う菱形にされる。 菱形~以外を成す部分は、 透明にされる。 まず,敷詰め用の画像: ◎ This example creates a top and bottom border consisting of a whole number of orange diamonds and a left and right border of a single, stretched diamond. The corners are diamonds of a different color. The image to tile is as follows. Apart from the diamonds, it is transparent:
~border用の~tile ◎ Tile for border
は、 `81px^v 平方であり, 9 片に分割される必要がある (この例では~~等分する)。 次の~style規則: ◎ The image is 81 by 81 pixels and has to be divided into 9 equal parts. The style rules could thus be as follows:
div {
  border: double orange 1em;
  border-image: url("border.png") 27 round stretch;
}
を~~幅 `12em^v, ~~高さ `5em^v の `div^e に適用したときの結果は: ◎ The result, when applied to a DIV of 12 by 5em, will be similar to this:
菱形の~borderを伴う~box ◎ element with a diamond border
より込み入った例を次にデモる。 [ ~fallback用の `border-style-*^p との対応関係 ]および[ ~border画像が~borderを超えて拡張される様子 ]を示す。 ~border画像には、[ 波状で緑色な, 隅まで拡張する~border ]が描かれている: ◎ This shows a more complicated example, demonstrating how the border image corresponds to the fallback border-style but can also extend beyond the border area. The border image is a wavy green border with an extended corner effect:
~border画像は,波状で緑色な~borderを示す。 波の振幅は、 隅に近付く程 大きくなり,最後は孤立した緑色な円で蓋をされる。 画像は、 各 側から 124px の所で, 4 本の断線により 9 片に分割される — その結果,[ 124px 平方の 4 隅, 同じ幅で より短く切分けられた 4 側, 中心の小さな正方形 ]が得られる。 ◎ Diagram: The border image shows a wavy green border with more exaggerated waves towards the corners, which are capped by a disconnected green circle. Four cuts at 124px offsets from each side divide the image into 124px-wide square corners, 124px-wide but thin side slices, and a small center square.
他の `border-image-*^p ~propは、 それらの~tileの~layoutに対し,次のように作用する: ◎ The rest of the border properties then interact to lay out the tiles as follows:
画像が不在なとき(~fallback)の描画は,緑色な二重線になり、 ~border画像による描画では、 波状で緑色な~borderになり, 波の振幅は隅に近付くほど大きくなる。 4 隅の~tileは,縦横 124px の正方形として描画され、 辺側の~tileは,合間の空間を整数個で埋尽くすよう繰返される。 ~tileは,振幅が最大になる隅の所で~padding区画から深く伸びて見える。 ~border画像~全体による効果は、 波の谷間が~padding辺のちょうど外側に揃うように, 31px だけ~outsetされる。 ◎ Diagram: The image-less (fallback) rendering has a green double border. The rendering with border-image shows the wavy green border, ith the waves getting longer as they reach the corners. The corner tiles render as 124px-wide squares and the side tiles repeat a whole number of times to fill the space in between. Because of the gradual corner effects, the tiles extend deep into the padding area. The whole border image effect is outset 31px, so that the troughs of the waves align just outside the padding edge.
ここでは、 `border-width$p が `12px^v にもかかわらず, `border-image-width$p ~propは `124px^v に算出される。 `~border画像~区画$は,`~border~box$から`~margin区画$へ `31px^v だけ~outsetされる。 ~border画像の読込nに失敗した場合 (または、 ~UAは,~border画像を~supportしない場合)、 緑色な二重線( `double$v )~borderによる描画に~fallbackする。 ◎ Here, even though the border-width is 12px, the border-image-width property computes to 124px. The border image area is then outset 31px from the border box and into the margin area. If the border-image fails to load (or if border images are not supported by the UA), the fallback rendering uses a green double border.
`border$p 略式~propは、 `border-image$p も設定し直すことに注意。 これにより、 すべての~border効果の有無を切り替えるのも容易になる: ◎ Notice that the border shorthand resets border-image. This makes it easy to turn off or reset all border effects:
.notebox {
  border: double orange;
  /* 
最初に `border^p 略式~propを設定する必要がある。それは `border-image^p も消去するので。
◎
must set 'border' shorthand first, otherwise it erases 'border-image'
 */
  border-image: url("border.png") 30 round;
  /* 
それから、
他の `border-*^p ~propを設定する。
◎
but other 'border' properties can be set after
 */
  border-width: thin thick;
}
...
.sidebar .notebox {
  box-shadow: 0 0 5px gray;
  border-radius: 5px;
  border: none; /* 
すべての~border効果をオフにする
◎
turn off all borders
 */
  /* 
`border^p 略式~propは `border-image^p を設定し直す
◎
'border' shorthand resets 'border-image'
 */
}
4.1. ~border画像の~source: `border-image-source^p ~prop
`border-image-source$p ~propは、 `border-*-style$p により指定される描画に代えて `~border画像@ — ~borderとして利用する画像 — を指定する。 `border-image-slice$p に `fill$v ~keywordも与えられた場合、 要素~用の画像の後景も追加的に指定する。 値 `none@v をとる場合/ 画像を表示できない場合 (および,この~propを適用し得ない場合も)、 `~border~style$が利用されることになる。 他の場合、 `border-*-style$p による~borderは描かれず,この`~border画像$が — 以下の各~節に述べるとおり — 描かれることになる。 ◎ Specifies an image to use as a border in place of the rendering specified by the border-style properties and, if given the fill keyword in border-image-slice, as an additional image backdrop for the element. If the value is none or if the image cannot be displayed (or the property doesn’t apply), the border styles will be used; otherwise the element’s border-style borders are not drawn and this border image is drawn as described in the sections below.
4.2. ~border画像の切分け法: `border-image-slice^p ~prop
この~propは、 画像を[ 4 隅, 4 辺, 真中 ]の 9 片に分割するための[ 画像の各~辺から内方への~offset ]を指定する。 `fill$v ~keywordが無い場合、 真中の画像~片は破棄される(全部的に透明と扱われる)。 (これは、 背景の手前に描かれる — `§ ~border画像の描法$を見よ。) ◎ This property specifies inward offsets from the top, right, bottom, and left edges of the image, dividing it into nine regions: four corners, four edges and a middle. The middle image part is discarded (treated as fully transparent) unless the fill keyword is present. (It is drawn over the background; see Drawing the Border Image.)
( `fill^v を除く)成分~値たちは、 これら各~側からの~offsetを`時計回りに設定する$。 【長さ値はとり得ないことに注意。】 ◎ If there is only one component value, it applies to all sides. If there are two values, the top and bottom are set to the first value and the right and left are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values they apply to the top, right, bottom, and left, respectively.
- `percentage [0,∞]$t
 - 百分率による[ 横/縦 ]~offsetは、 画像の[ 横幅/縦幅 ]に相対的になる。 ◎ Percentages are relative to the size of the image: the width of the image for the horizontal offsets, the height for vertical offsets.
 - `number [0,∞]$t
 - ~raster画像においては、 画像~内の画素~数を表現する。 ~vector画像においては、 ~vector座標を表現する。 ◎ Numbers represent pixels in the image (if the image is a raster image) or vector coordinates (if the image is a vector image).
 - `fill@v
 - この~keywordが在る場合、 真中の~border画像~片も保全される(既定では,破棄され, 空として扱われる)。 ◎ The fill keyword, if present, causes the middle part of the border-image to be preserved. (By default it is discarded, i.e., treated as empty.)
 
負な値は妥当でない。 画像~sizeを超える算出d値は、 `100%^v として解釈される。 ◎ Negative values are invalid. Computed values larger than the size of the image are interpreted as 100%.
`border-image-slice$p により,互いに対辺にある画像~片は、 重合することもある。 左右~offset値の和が画像~全体の横幅~以上になる場合、[ 上辺, 真中, 下辺 ]画像は空になり,空でない透明な画像が指定されたときと同じ効果になる。 上下~offset値に対しても,縦横を入れ替えて同様になる。 ◎ The regions given by the border-image-slice values may overlap. However if the sum of the right and left widths is equal to or greater than the width of the image, the images for the top and bottom edge and the middle part are empty—which has the same effect as if a nonempty transparent image had been specified for those parts. Analogously for the top and bottom values.
切分け~~位置を決定するために画像~sizeを要する場合(例えば,`生来な寸法$を伴わない~SVG画像)、 それは,[ `指定d~size$として拘束~無し, `既定の~obj~size$として`~border画像~区画$ ]を与える下で,`既定の~sizing~algo$を利用して~sizeされる。 ◎ If the image must be sized to determine the slices (for example, for SVG images with no natural dimensions), then it is sized using the default sizing algorithm with no specified size and the border image area as the default object size.
横, 縦にそれぞれ 2 本ずつの,画像を横切る断線 ◎ Diagram: two horizontal cuts and two vertical cuts through an image
4.3. 描かれる区画: `border-image-width^p ~prop
`~border画像$は、 `~border画像~区画@ と呼ばれる区画に描かれる。 その境界は `border-image-outset$p から決定され、 既定では`~border~box$に一致する。 ◎ The border image is drawn inside an area called the border image area. This is an area whose boundaries by default correspond to the border box, see border-image-outset.
`border-image-width$p は、 `~border画像~区画$を 9 個の `~border画像~領域@ と称される領域に分割するための~offsetを指定する。 これらの~offsetは、[ 区画の各~辺から分割する線まで ]の内方への距離を表現する。 ◎ The four values of border-image-width specify offsets that are used to divide the border image area into nine regions.\ The offsets represent inward distances from the top, right, bottom, and left sides of the area, respectively.
成分~値たちは、 これら各~側からの距離を`時計回りに設定する$。 ◎ If there is only one component value, it applies to all sides. If there are two values, the top and bottom are set to the first value and the right and left are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values they apply to the top, right, bottom, and left, respectively.
各種 値の意味は: ◎ Values have the following meanings:
- `length-percentage [0,∞]$t
 - 百分率による[ 横/縦 ]~offsetは、 `~border画像~区画$の[ 横幅/縦幅 ]に相対的になる。 ◎ Percentages refer to the size of the border image area: the width of the area for horizontal offsets, the height for vertical offsets.
 - `number [0,∞]$t
 - 実数による~offsetは、 対応する `border-*-width$p の`算出d値$の何倍になるかを表現する。 ◎ Numbers represent multiples of the corresponding computed border-width.
 - `auto@v
 - `border-image-width$p の`使用~値$は、 対応する画像~片( `border-image-slice$p を見よ)の`生来な~size$(横幅, 縦幅のうち適用-可能な方)になる。 要求される`生来な寸法$が当の画像には無い場合、 対応する `border-*-width$p の`算出d値$が代わりに利用される。 ◎ If auto is specified then the used border-image-width is the natural width or height (whichever is applicable) of the corresponding image slice (see border-image-slice). If the image does not have the required natural dimension then the corresponding computed border-width is used instead.
 
負な値は妥当でない。 ◎ Negative values are invalid for any border-image-width values.
`border-image-width$p の値を成す ある~offsetにより, 互いに対辺にある 2 つの辺~部位が重合する場合、 `border-image-width$p の`使用~値$は、 値を成す すべての~offsetを,重合しなくなる所まで一様な倍率で削減した結果になる — 数学的には、[[ 次の 2 つの値の最小 %f ] ~LT 1 ]ならば,すべての~offsetに %f を乗算して削減した結果が`使用~値$になる ⇒# `~border画像~区画$の横幅 ~DIV ( 左側~offset ~PLUS 右側~offset ), `~border画像~区画$の縦幅 ~DIV ( 上側~offset ~PLUS 下側~offset ) ◎ If two opposite border-image-width offsets are large enough that they overlap, then the used values of all border-image-width offsets are proportionally reduced until they no longer overlap. In mathematical notation: Given Lwidth as the width of the border image area, Lheight as its height, and Wside as the border-image-width offset for the side side, let f = min(Lwidth/(Wleft+Wright), Lheight/(Wtop+Wbottom)). If f < 1, then all W are reduced by multiplying them by f.
4.4. 辺の張り出し量: `border-image-outset^p ~prop
`border-image-outset$p は、 `~border画像~区画$が`~border~box$を超えて拡張する量を指定する。 ◎ The values specify the amount by which the border image area extends beyond the border box.
成分~値たちは、 これら各~側から拡張する量を`時計回りに設定する$。 ◎ If there is only one component value, it applies to all sides. If there are two values, the top and bottom are set to the first value and the right and left are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values they apply to the top, right, bottom, and left, respectively.
- `length [0,∞]$t
 - 指定された長さによる~outsetを表現する。 ◎ Represents an outset of the specified length.
 - `number [0,∞]$t
 - 対応する `border-*-width$p の算出d値の,指定された倍数による~outsetを表現する。 ◎ Represents an outset of the specified multiple of the corresponding computed border-width.
 
負な値は妥当でない。 ◎ Negative values are invalid.
~border画像の[ `~border~box$の外側に描画される部分 ]は、 `~ink~overflow$であり,~scrollingが誘発されることはない。 その部分は、 ~mouse~event【および`~pointer~event@~POINTEREVENTS$】からは不可視とされ, 当の要素~用に~eventを捕捉することはない。 ◎ Portions of the border-image that are rendered outside the border box are ink overflow and do not trigger scrolling. Also such portions are invisible to mouse events and do not capture such events on behalf of the element.
注記: 画像が~outsetされても,~scrollingは決して誘発されないが、 それでも,先祖や表示域の外側で切取られ得る。 ◎ Note: Even though they never cause a scrolling mechanism, outset images may still be clipped by an ancestor or by the viewport.
4.5. 画像の敷詰め法: `border-image-repeat^p ~prop
この~propは、 9 片に分割された`~border画像$を[ 各自に対応する`~border画像~領域$に,どう拡縮して敷詰めるか ]を指定する。 1 個目の~keywordは,[ 上辺, 真中, 下辺 ]用の画像~片に対する横方向の[ 拡縮-法/敷詰め法 ]に適用され、 2 個目の~keywordは,[ 左辺, 真中, 右辺 ]用の画像~片に対する縦方向の[ 拡縮-法/敷詰め法 ]に適用される — `§ ~border画像の描法$を見よ。 2 個目の~keywordが無い場合、 1 個目と同じと見做される。 各種 値の意味は: ◎ This property specifies how the images for the sides and the middle part of the border image are scaled and tiled. The first keyword applies to the horizontal scaling and tiling of the top, middle and bottom parts, the second to the vertical scaling and tiling of the left, middle and right parts; see Drawing the Border Image. If the second keyword is absent, it is assumed to be the same as the first. Values have the following meanings:
- `stretch@v
 - 画像~片は、 対応する`~border画像~領域$を埋めるよう伸張される。 ◎ The image is stretched to fill its corresponding region.
 - `repeat@v
 - 画像~片は、 対応する`~border画像~領域$を埋めるよう敷詰められる(繰返される)。 ◎ The image is tiled (repeated) to fill its corresponding region.
 - `round@v0
 - 画像~片は、 対応する`~border画像~領域$を埋めるよう敷詰められる(繰返される)。 整数個の~tileで埋尽くせないときは、 埋尽くせるよう画像~片は拡縮し直される。 ◎ The image is tiled (repeated) to fill its corresponding region. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does.
 - `space@v
 - 画像~片は、 対応する`~border画像~領域$を埋めるよう敷詰められる(繰返される)。 整数個の~tileで埋尽くせないときは、 余った空間が~tileの周囲に分配される。 ◎ The image is tiled (repeated) to fill its corresponding region. If it does not fill the region with a whole number of tiles, the extra space is distributed around the tiles.
 
各~画像~片を対応する`~border画像~領域$へ[ 拡縮する, 敷詰める ]ための正確な処理は、 次~節にて与えられる。 ◎ The exact process for scaling and tiling the border-image parts is given in the section below.
4.6. ~border画像の描法
`~border画像$を `border-image-slice$p により切分けて得られた 9 片の画像は、 次の 4 段を経て,拡縮され, 位置されてから, 各自に対応する`~border画像~領域$ — 以下,この節では単に “領域” と称する — に敷詰められる: ◎ After the border image given by border-image-source is sliced by the border-image-slice values, the resulting nine images are scaled, positioned, and tiled into their corresponding border image regions in four steps:
- 
`border-image-width$p に~~収まるように拡縮する: ◎ Scale to border-image-width.
- [ 上辺, 下辺 ]用の画像を拡縮する — その縦横比を保ちつつ,その縦幅が[ 対応する領域の縦幅 ]と同じになるよう。 ◎ The two images for the top and bottom edges are made as tall as the top and bottom border image regions, respectively, and their width is scaled proportionally.
 - [ 左辺, 右辺 ]用の画像を拡縮する — その縦横比を保ちつつ,その横幅が[ 対応する領域の横幅 ]と同じになるよう。 ◎ The images for the left and right edges are made as wide as the left and right border image regions, respectively, and their height is scaled proportionally.
 - 各~隅~用の画像を拡縮する — その[ 横幅/縦幅 ]が,対応する領域の[ 縦/横 ]に隣接する領域の[ 横幅/縦幅 ]と同じになるよう。 ◎ The corner images are scaled to be as wide and as tall as the their respective border image regions.
 - 真中~用の画像の[ 横幅/縦幅 ]を[ 上辺/左辺 ]用の画像と同じ係数で拡縮する — ただし,係数が[ 0 または無限大 ]になる場合、[ 下辺/右辺 ]用の画像の拡縮ng係数で代用する。 それもできない場合、 拡縮しない。 ◎ The middle image’s width is scaled by the same factor as the top image unless that factor is zero or infinity, in which case the scaling factor of the bottom is substituted, and failing that, the width is not scaled. The height of the middle image is scaled by the same factor as the left image unless that factor is zero or infinity, in which case the scaling factor of the right image is substituted, and failing that, the height is not scaled.
 
 - 
`border-image-repeat$p に従って拡縮する: ◎ Scale to border-image-repeat.
値を成す 1 個目の~keywordに応じて、 画像~片の横幅のみを次に従って拡縮する: ◎ ↓
- `stretch$v ⇒ [ 上辺, 真中, 下辺 ]用の画像を[ その横幅が真中~領域の横幅と同じになる ]よう拡縮する。 ◎ If the first keyword is stretch, the top, middle and bottom images are further scaled to be as wide as the middle region of the border image area. The height is not changed any further.
 - `round$v0 ⇒ [ 上辺, 真中, 下辺 ]用の画像を[ その横幅の整数倍が真中~領域の横幅と同じになる ]よう拡縮する — `background-repeat$p ~propが `round@~CSSBG#valdef-background-repeat-round$v をとるときと,ちょうど同じく。 ◎ If the first keyword is round, the top, middle and bottom images are resized in width, so that exactly a whole number of them fit in the middle region of the border image area, exactly as for round in the background-repeat property.
 - `repeat$v / `space$v ⇒ [ 上辺, 真中, 下辺 ]用の画像は変更されない。 ◎ If the first keyword is repeat or space, the top, middle, and bottom images are not changed any further.
 
 - 値を成す 2 個目の~keywordに対しても、[ 左辺, 真中, 右辺 ]用の画像を — 前段と相似的に,横幅を縦幅に読み替える下で — 拡縮する。 ◎ The effects of stretch, round, repeat, and space for the second keyword are analogous, acting on the height of the left, middle and right images.
 - 
最初の~tileを位置する: ◎ Position the first tile.
- [ 上辺, 真中, 下辺 ]用の画像を対応する領域に配置する — 1 個目の~keywordに応じて ⇒# `repeat$v ならば 横方向において中央~寄せに/ ~ELSE_ 左~寄せに ◎ If the first keyword is repeat, the top, middle, and bottom images are centered horizontally in their respective regions. Otherwise the images are placed at the left edge of their respective regions of the border image area.
 - [ 左辺, 真中, 右辺 ]用の画像を対応する領域に配置する — 2 個目の~keywordに応じて ⇒# `repeat$v ならば 縦方向において中央~寄せに/ ~ELSE_ 上~寄せに ◎ If the second keyword is repeat, the left, middle, and right images are centered vertically in their respective regions. Otherwise the images are placed at the top edge of their respective regions of the border image area.
 
 - 
敷詰めて描く: ◎ Tile and draw.
- 各 画像~片を,各自に対応する領域を埋めるよう敷詰める。 ◎ The images are then tiled to fill their respective regions.
 - `space$v に対しては、 部分的に現れる~tileは すべて破棄し,余った空間を各~tileの周囲に均等に分配する — すなわち、[ 最初の~tileより前にある隙間, 最後の~tileより後にある隙間, 各~tileの合間にある隙間 ]を均等にする。 各~側を成す[ 隅, 辺 ]領域は空になることもある。 ◎ In the case of space, any partial tiles are discarded and the extra space distributed before, after, and between the tiles. (I.e. the gap before the first tile, the gap after the last tile, and the gaps between tiles are equalized.) This can result in empty border-image side regions.
 - 各 画像~片は、 通常の~borderと同じく,[ 同じ積層~levelの中で,背景~層の直ぐ手前にある層 ]に描く。 ◎ The images are drawn at the same stacking level as normal borders: immediately in front of the background layers.
 - `border-image-slice$p【!border-image-source】 に `fill$v が指定されていない場合、 真中~用の画像は描かない。 ◎ The middle image is not drawn unless fill was specified for border-image-source.
 
 
4.7. ~border画像: `border-image^p 略式~prop
これは、 次に挙げる~propを単独の宣言で設定する`略式~prop$である — 値が省略された~propは、 各自の`初期~値$に設定される ⇒# `border-image-source$p, `border-image-slice$p, `border-image-width$p, `border-image-outset$p, `border-image-repeat$p ◎ This is a shorthand property for setting border-image-source, border-image-slice, border-image-width, border-image-outset, and border-image-repeat in a single declaration. Omitted values are set to their initial values.
4.8. ~tableに対する効果
`border-image-*$p は、[ `border-collapse$p が `collapse^v にされた[ ~table, 行内~table ]の~border ]にも適用される。 しかしながら,この仕様は、 その種の画像~borderをどう描画するかは,定義しない。 特に、 画像~borderと[ ~tableの各~辺に接する[ ~cell/~row/~row~group ]の~border ]が どう相互作用するかは,定義しない ( `CSS2$r による`~borderの競合-解決$を見よ)。 ◎ The border-image properties apply to the border of tables and inline tables that have border-collapse set to collapse. However, this specification does not define how such an image border is rendered. In particular, it does not define how the image border interacts with the borders of cells, rows and row groups at the edges of the table (see border conflict resolution in [CSS2]).
将来の仕様が,描画を定義するものと期待されている。 それまでは、 ~UAには,[ `border-collapse$p が `collapse^v にされた~table ]には~border画像を適用しないことが推奨される。 ◎ It is expected that a future specification will define the rendering. It is recommended that UAs do not apply border images to tables with collapsed borders until then.
5. 部分的な~border
【 この節を成す内容は、 未訳。 次に挙げる~propは、 この節の中で定義される: `border-limit@p, `border-clip@p, `border-top-clip@p, `border-right-clip@p, `border-bottom-clip@p, `border-left-clip@p, `border-block-start-clip@p, `border-block-end-clip@p, `border-inline-start-clip@p, `border-inline-end-clip@p 】
6. 落影
6.1. 影の色~付け: `box-shadow-color^p ~prop
`box-shadow-color$p ~propは、 ~commaで分離された色たちが成す~listを受容する — それを成す各~itemは、 対応する落影の色を定義する。 ◎ The box-shadow-color property defines one or more drop shadow colors. The property accepts a comma-separated list of shadow colors.
[ `box-shadow-color$p, 他の各種 `box-shadow-*$p ]の~commaで分離された値たちどうしが,どう相互作用して各~落影~層を形成するかについては、 `§ 多層化, ~layout, その他の詳細$ を見よ。 ◎ See the section “Layering, Layout, and Other Details” for how box-shadow-color interacts with other comma-separated drop shadow properties to form each drop shadow layer.
6.2. 影の~offset法: `box-shadow-offset^p ~prop
`box-shadow-offset$p ~propは、[ 値 `none$v0 / 2 個の `length$t 値が成す~pair ]たちが成す~commaで分離された~listを受容する — 各~itemは、 各~落影の~offsetを定義する。 ◎ The box-shadow-offset property defines one or more drop shadow offsets. The property accepts a comma-separated list. Each item in that list can either\ be the none value, which indicates no shadow,\ or a pair of horizontal and vertical offsets, where both values are described as <length> values.
- `none@v0
 - 当の影は描画されなくなる。 この影に対応している他の各種 `box-shadow-*$p の値による効果はなくなる。 ◎ The shadow will not be rendered. The values of other box shadow properties corresponding to this shadow have no effect.
 - `length$t{2} ◎ ↓
 - 順に, 描かれる影の~boxからの[ `横~offset@ , `縦~offset@ ]を指定する。 前者に対する[ 正な値は右/負な値は左 ]へ~offsetする。 後者に対する[ 正な値は下/負な値は上 ]へ~offsetする。 ◎ 1st <length> ◎ Specifies the horizontal offset of the shadow. A positive value draws a shadow that is offset to the right of the box, a negative length to the left. ◎ 2nd <length> ◎ Specifies the vertical offset of the shadow. A positive value offsets the shadow down, a negative one up.
 
[ `box-shadow-offset$p, 他の各種 `box-shadow-*$p ]の~commaで分離された値たちどうしが, どう相互作用して各~落影~層を形成するかについては、 `§ 多層化, ~layout, その他の詳細$ を見よ。 ◎ See the section “Layering, Layout, and Other Details” for how box-shadow-offset interacts with other comma-separated drop shadow properties to form each drop shadow layer.
6.3. 影のボカシ法: `box-shadow-blur^p ~prop
`box-shadow-blur$p ~propは、 ~commaで分離された `length$t 値たちが成す~listを受容する — それを成す各~itemは、 対応する落影の `ボカシ半径@ を定義する。 ◎ The box-shadow-blur property defines one or more blur radii for drop shadows. The property accepts a comma-separated list of <length> values.
負な値は妥当でない。 値 0 は影の辺をくっきりさせ、 値が大きいほどボカされる。 `§ 影のボカシ法@#shadow-blur$を見よ。 ◎ Negative values are invalid. If the blur value is zero, the shadow’s edge is sharp. Otherwise, the larger the value, the more the shadow’s edge is blurred. See Shadow Blurring, below.
[ `box-shadow-blur$p, 他の各種 `box-shadow-*$p ]の~commaで分離された値たちどうしが, どう相互作用して各~落影~層を形成するかについては、 `§ 多層化, ~layout, その他の詳細$ を見よ。 ◎ See the section “Layering, Layout, and Other Details” for how box-shadow-blur interacts with other comma-separated drop shadow properties to form each drop shadow layer.
6.4. 影の拡幅-法: `box-shadow-spread^p ~prop
`box-shadow-spread$p ~propは、 ~commaで分離された `length$t 値たちが成す~listを受容する — それを成す各~itemは、 対応する落影の `拡幅~距離@ を定義する。 ◎ The box-shadow-spread property defines one or more spread distances for drop shadows. The property accepts a comma-separated list of <length> values.
[ 正な値/負な値 ]は、 指定された距離【!半径】だけ,縦横とも影を[ 拡げる/狭める ]。 `§ 影の形状@#shadow-shape$を見よ。 ◎ Positive values cause the shadow to expand in all directions by the specified radius. Negative values cause the shadow to contract. See Shadow Shape, below.
注記: `内影$に対し,影を拡げる(面積を増やす)ことは、 影でない領域 — すなわち,~boxの内側~領域の投影 — の形状を狭めることを意味する。 ◎ Note that for inner shadows, expanding the shadow (creating more shadow area) means contracting the shadow’s perimeter shape.
[ `box-shadow-spread$p, 他の各種 `box-shadow-*$p ]の~commaで分離された値たちどうしが, どう相互作用して各~落影~層を形成するかについては、 `§ 多層化, ~layout, その他の詳細$ を見よ。 ◎ See the section “Layering, Layout, and Other Details” for how box-shadow-spread interacts with other comma-separated drop shadow properties to form each drop shadow layer.
6.5. 影の拡幅-法: `box-shadow-position^p ~prop
`box-shadow-position$p ~propは、 ~commaで分離された[ `outset$v0 / `inset$v0 ]~keywordたちが成す~listを受容する — それを成す各~itemは、 対応する落影の位置を定義する。 ◎ The box-shadow-position property defines one or more drop shadow positions. The property accepts a comma-separated list of outset and inset keywords.
- `outset@v0
 - 当の落影は、 `外影@ になる — すなわち、 当の~boxが手前に浮かんでいるかのように,~canvas上に影を~~落とすようになる。 ◎ Causes the drop shadow to be an outer box-shadow. That means, one that shadows the box onto the canvas, as if it were lifted above the canvas.
 - `inset@v0
 - 当の落影は、 `内影@ になる — すなわち、 当の~boxが背後に沈んでいるかのように,~canvas上に影を~~落とすようになる。 ◎ Causes the drop shadow to be an inner box-shadow. That means, one that shadows the canvas onto the box, as if the box were cut out of the canvas and shifted behind it.
 
[ `box-shadow-position$p, 他の各種 `box-shadow-*$p ]の~commaで分離された値たちどうしが, どう相互作用して各~落影~層を形成するかについては、 `§ 多層化, ~layout, その他の詳細$ を見よ。 ◎ See the section “Layering, Layout, and Other Details” for how box-shadow-position interacts with other comma-separated drop shadow properties to form each drop shadow layer.
6.6. 落影~略式: `box-shadow^p ~prop
`box-shadow$p ~propは、 当の~boxに 1 個以上の落影を付する。 この~propは、 手前から背後へ順序付けられ, ~commaで分離された影たちが成す~listを受容する。 ◎ The box-shadow property attaches one or more drop-shadows to the box. The property accepts a comma-separated list of shadows, ordered front to back.
各~影は `spread-shadow$t として与えられる。 それは、 `box-shadow-offset$p 用の値と省略可能な[ `box-shadow-blur$p, `box-shadow-spread$p, `box-shadow-color$p, `box-shadow-position$p ]用の値からなる。 省略された長さは `0^v になる。 色が省略された場合の既定は、 指定された~offsetに応じて[ `none$v0 ならば `transparent@~CSSCOLOR#valdef-color-transparent$v / ~ELSE_ `currentcolor$v ]になる。 ◎ Each shadow is given as a <spread-shadow>, outlining the box-shadow-offset, and optional values for the box-shadow-blur, box-shadow-spread, box-shadow-color, and box-shadow-position. Omitted lengths are 0; omitted colors default to transparent when the specified offset is none and to currentcolor otherwise.
`spread-shadow@t = `box-shadow-color$tp? && [ `box-shadow-offset$tp [ `box-shadow-blur$tp `box-shadow-spread$tp? ]? ] && `box-shadow-position$tp?
6.6.1. 影の[ 形状, 拡幅, 打抜き ]
`外影$は、 要素の~border~boxが不透明であるかのように,影を投影する。 影は,`~border辺$の外側にのみ描かれ、 `~border~box$の内側に入る部分は切取られる。 ◎ An outer box-shadow casts a shadow as if the border-box of the element were opaque.\ ↓ Assuming a spread distance of zero, its perimeter has the exact same size and shape as the border box.\ The shadow is drawn outside the border edge only: it is clipped inside the border-box of the element.
`内影$は、 要素の`~padding辺$の外側すべてが不透明であるかのように,影を投影する。 影は,`~padding辺$の内側にのみ描かれ、 `~padding~box$の外側に入る部分は切取られる。 ◎ An inner box-shadow casts a shadow as if everything outside the padding edge were opaque.\ ↓ Assuming a spread distance of zero, its perimeter has the exact same size and shape as the padding box.\ The shadow is drawn inside the padding edge only: it is clipped outside the padding box of the element.
いずれにせよ、 `拡幅~距離$が 0 の下では, 影の周の[ ~size/形状 ]は`~border~box$のそれと正確に同じになる。 ◎ ↑
`拡幅~距離$が定義されている場合、 上述による周の各 側の直線~部分が,当の`拡幅~距離$だけ[ `外影$ならば外方へ拡げられる/ `内影$ならば内方へ狭められる ]。 【いずれにせよ、`拡幅~距離$が正ならば影は大きくなり,負ならば小さくなる。】 ただし、 結果の周の[ 横幅/縦幅 ]が負になる場合は, 0 に切り上げる。 ◎ If a spread distance is defined, the shadow perimeter defined above is expanded outward (for outer box-shadows) or contracted inward (for inner box-shadows) by outsetting (insetting, for inner shadows) the shadow’s straight edges by the spread distance (and flooring the resulting width/height at zero).
次の~style: ◎ Below are some examples of an orange box with a blue border being given a drop shadow.
border:5px solid blue; background-color:orange; width: 144px; height: 144px; border-radius: 20px;
による,[ 隅が丸められ, [ `blue^v な~border, `orange^v な背景 ]を伴う~box ]に落影を与える,いくつかの例:
| 影の~style | ~~想定される表示 | 【~browser表示】 | 
|---|---|---|
box-shadow: rgba(0,0,0,0.4) 10px 10px;  | 
 灰色な影を伴い, 隅が丸められた~box — 影の形状は~border~boxと同じで, ~boxの直下から 10px 右, 10px 下へ~offsetされる。 ◎ A round-cornered box with a light gray shadow the same shape as the border box offset 10px to the right and 10px down from directly underneath the box.  | `shadow-outer-round-1^dgm | 
box-shadow: rgba(0,0,0,0.4) 10px 10px inset  | 
 灰色な影を伴い, 隅が丸められた~box — 影の形状は~padding~boxの反転~形状になり,~boxの 上辺/左辺 (~borderの直ぐ内側)から 10px 内側の部分を埋める。 ◎ A round-cornered box with a light gray shadow the inverse shape of the padding box filling 10px in from the top and left edges (just inside the border).  | `shadow-inner-round-1^dgm | 
box-shadow:
  rgba(0,0,0,0.4)
  10px 10px 0
  10px /* 拡幅 */
 | 
 灰色な影を伴い, 隅が丸められた~box — 影の形状は~border~boxより 20px 高く幅広で, 影の 上辺/左辺 が~boxの 上辺/左辺 の直下になるように~offsetされる。 ◎ A round-cornered box with a light gray shadow the same shape as the box but 20px taller and wider and offset so that the top and left edges of the shadow are directly underneath the top and left edges of the box.  | `shadow-outer-spread-round-1^dgm | 
box-shadow:
  rgba(0,0,0,0.4)
  10px 10px 0
  10px /* 拡幅 */
  inset
 | 
 灰色な影を伴い, 隅が丸められた~box — 影の反転~形状は~padding~boxの形状より 20px 低く幅狭で,~boxの 上辺/左辺 (~borderの直ぐ内側)から 20px 内側の部分を埋める。 ◎ A round-cornered box with a light gray shadow the inverse shape of the box but 20px narrower and shorter filling 20px in from the top and left edges (just inside the border).  | `shadow-inner-spread-round-1^dgm | 
【!TODO `~outset調整-済みな~border半径$】 拡幅が適用されたときに~boxの形状を保全するため、[ `外影$に対する`~border~box$/ `内影$に対する`~padding~box$ ]の隅における影の半径は,`~border半径$ %R に`拡幅~距離$ %w を[ 加算-/減算- ]した結果にする (加えて、 結果が負になる場合, 0 に切り上げる)。 ただし, %R が小さいときは — すなわち,比率[ %r ~EQ %R ~DIV %w ]が 1 未満になるときは — `丸まった隅から角張った隅への連続性を確保するため@#_changes-spread-formula_$†,まず %w に[ 1 ~MINUS `pow^op( 1 ~MINUS %r, 3 ) ]を乗算する。 例えば[ %R ~EQ `10px^v, %w ~EQ `20px^v ]( %r ~EQ 0.5 )なら、 影~形状の隅~半径を[ `10px^v ~PLUS `20px^v ~MUL `pow^op( 1 ~MINUS ( 1 ~MINUS 0.5 ), 3 ) ~EQ `27.5px^v ]にする( `30px^v ではなく)。 この調整は、 各 次元の半径ごとに独立に適用する。 【†前提として、~border半径が指定されていない場合( %R ~EQ 0 ),影の隅は直角になることが要請される。】 ◎ To preserve the box’s shape when spread is applied, the corner radii of the shadow are also increased (decreased, for inner shadows) from the border-box (padding-box) radii by adding (subtracting) the spread distance (and flooring at zero). However, in order to create a sharper corner when the border radius is small (and thus ensure continuity between round and sharp corners), when the border radius is less than the spread distance (or in the case of an inner shadow, less than the absolute value of a negative spread distance), the spread distance is first multiplied by the proportion 1 + (r-1)3, where r is the ratio of the border radius to the spread distance, in calculating the corner radii of the spread shadow shape. For example, if the border radius is 10px and the spread distance is 20px (r = .5), the corner radius of the shadow shape will be 10px + 20px × (1 + (.5 - 1)3) = 27.5px rather than 30px. This adjustment is applied independently to the radii in each dimension.
`border-image$p は、 `box-shadow$p による影の形状には影響しない。 ◎ The border-image does not affect the shape of the box-shadow.
6.1.2. 影~辺のボカシ法
0 でない`ボカシ半径$は、[ 結果の影が,~Gaussian~filterの様にボカされるべきこと ]を指示する。 正確な~algoは定義されないが、 結果の影は,[ 標準偏差がボカシ半径の半分に等しい~Gaussianボカシ ]を適用して生成される画像に近似するモノトスル — 各 画素~値は、 期待される値との~~誤差が 5% 以下になるよう。 ◎ A non-zero blur radius indicates that the resulting shadow should be blurred, such as by a Gaussian filter. The exact algorithm is not defined; however the resulting shadow must approximate (with each pixel being within 5% of its expected value) the image that would be generated by applying to the shadow a Gaussian blur with a standard deviation equal to half the blur radius.
注記: これは、 影~辺の直線な部分においては,[ ボカシにより[ 影の色が透明へ遷移する様子 ]が視覚的に~~露になる部分 ]の[ 辺に垂直な方向の幅 ]が[ ボカシ半径のおよそ 2 倍になる ]ことを意味する。 ◎ Note: This means for a long, straight shadow edge, the blur radius will create a visibly apparent color transition approximately the twice length of the blur radius that is perpendicular to and centered on the shadow’s edge, and that ranges from almost the full shadow color at the endpoint inside the shadow to almost fully transparent at the endpoint outside it.
6.7. 多層化, ~layout, その他の詳細
[ 各種 `box-shadow-*^p ~propから構築される`協調される値~list$ ]内に宣言された落影たちは、 `協調している~list~prop~group$を形成する — `協調している基底~list~prop$として `box-shadow-offset$p と伴に 。 `CSS-VALUES-4$r `§ 協調している~list値をとる~prop群@~CSSVAL#linked-properties$ を見よ。 ◎ Drop shadows are declared in the coordinated value list constructed from the box-shadow-* properties, which form a coordinating list property group with box-shadow-offset as the coordinating list base property. See CSS Values 4 § A Coordinating List-Valued Properties.
影による効果は、 手前から背後の順に — 最初の影が最も手前になり,他の層は その背後に重なるよう — 適用される。 影は、 ~layoutには波及しない。 影は、[ 他の~boxや~text, それらの影 ]と重合する【!(or be overlapped by)】こともある。 積層~文脈と塗ng順序においては、 要素に付された影のうち ⇒# `外影$は,要素~背景の直ぐ背後にある層に描かれる。 `内影$は,要素の背景の直ぐ手前, かつ~borderや~border画像の背後に描かれる。 ◎ The shadow effects are applied front-to-back: the first shadow is on top and the others are layered behind. Shadows do not influence layout and may overlap (or be overlapped by) other boxes and text or their shadows. In terms of stacking contexts and the painting order, the outer box-shadows of an element are drawn immediately below the background of that element, and the inner shadows of an element are drawn immediately above the background of that element (below the borders and border image, if any).
他が指定されない限り、 落影は`首要~box$に限り適用される。 影響される~boxが複数に断片化される場合、 当の影は `box-decoration-break$p にて指定されたとおりに適用される。 ◎ Unless otherwise specified, drop shadows are only applied to the principal box. If the affected box has multiple fragments, the shadows are applied as specified in box-decoration-break.
影により[ ~scrollingが誘発される/ ~scroll可能な区画【`~scroll可能な~overflow区画$】の~sizeが増やされる ]ことはない。 ◎ Shadows do not trigger scrolling or increase the size of the scrollable area.
`外影$は、 `~borderの縮約~model$における`内部~table要素$には,効果は無い。 `~borderの縮約~model$において[ 複数の太さを併せ持つ単独の~border辺 ]用に定義された影に対しては、 その正確な位置や描画-法は未定義である (例: ある~tableを成すある~rowの~borderが他より太いときの,当の~table上の外影) (例: 複数の~rowにまたがる~table~cellが[ ~borderの太さが互いに異なる複数の~cell ]と連接しているときの,当の~cell上の内影)。 ◎ Outer shadows have no effect on internal table elements in the collapsing border model. If a shadow is defined for single border edge in the collapsing border model that has multiple border thicknesses (e.g. an outer shadow on a table where one row has thicker borders than the others, or an inner shadow on a rowspanning table cell that adjoins cells with different border thicknesses), the exact position and rendering of its shadows are undefined.
7. ~borderの形状付け
[ `corner-shape$p, `border-radius$p ]は,~borderの~style付けに ある程度の表現力を許容するが、 それでも,~borderが矩形であると見做す下で働く。 ◎ While corner-shape and border-radius allow some expressiveness to styling a border, they still work with the assumption that the border is rectangular.
`border-shape$p ~propには、 これらの能力を増補する機能がある — [ ~borderを成す~pathを`基本~図形$を利用して指定する ]ことを作者に可能化することにより。 ◎ The border-shape function augments these capabilities, by enabling the author to use any basic shape to specify the path of the border.
7.1. `border-shape^p ~prop
`border-shape$p ~propは、 供された `basic-shape$t 値の個数に応じて: ◎ The border-shape property is provided with either a single <basic-shape> or two <basic-shape>s, resulting in one or two paths, respectively.
- 
2 個の場合、 ~borderは,それらが定義する 2 本の~pathの合間を成す図形として描画される。 ◎ When two <basic-shape> values are given, the border is rendered as the shape between the two paths.\
【 2 本の~pathが交差する場合にどう解釈されるか,はっきりしない。 個々の `basic-shape$t は、 巻数~規則( `fill-rule$tp )を指定し得るとしても。 】
 - 1 個の場合、 ~borderは,それが定義する~pathをなぞる~strokeとして描画される。 その~stroke幅として,`関連な側$の`~border幅$ — `border-*-width$p の`算出d値$ — を伴う下で。 【すなわち,`~stroke図形$を占める。】 ◎ When only a single <basic-shape> is given, the border is rendered as a stroke with the relevant side’s computed border width as the stroke width.
 
~borderの色は、 `関連な側$の`~border色$ — `border-*-color$p の`算出d値$ — になる。 ◎ The fill color of the border is the relevant side’s computedborder-color.
各 `geometry-box$t は、 対応する `basic-shape$t 用の`基準~box$を指定する 【この記述は、この訳による補完(他に解釈しようがない)】 — 特に, `basic-shape$t を成す百分率たちの算出は、 これに基づく。
`geometry-box$t が省略された場合の既定は、 供された `basic-shape$t 値の個数に応じて: ◎ When a <geometry-box> is not given, the default computation of percentage differs based on the number of given <basic-shape> values.
- 2 個の場合、[ 1 個目(外縁)においては `border-box@~CSSSHAPES#valdef-box-border-box$v / 2 個目(内縁)においては `padding-box@~CSSSHAPES#valdef-box-padding-box$v ]になる。 これは、 `border-width$p ~propの値が最終的な図形に影響することを許容する。 ◎ When two <basic-shape> values are given, the first (outer) one defaults to the border box and the second (inner) one defaults to the padding box. This allows using the different border-width properties to affect the final shape.
 - 1 個の場合、 `half-border-box@~CSSSHAPES#valdef-shape-box-half-border-box$v になる。 これは、 ~border用の既定の挙動に合致する仕方で~strokeすることを許容する。 ◎ When a single <basic-shape> value is given, the <geometry-box> defaults to the half-border-box value, which allows stroking in a way that matches the default border behavior.
 
`border-shape$p ~propは、[ `border-radius$p, `corner-shape$p ]とは互換でない【両立しない】。 要素の `border-shape$p の`算出d値$が `none^v 以外になる場合、 要素の `border-radius$p は 0 に設定されていたかのように無視され, `border-radius$p との併用でしか働かない `corner-shape$p も暗黙的に無視される。 ◎ The border-shape property is not compatible with border-radius and corner-shape. When an element’s computed value of border-shape is not none, its border-radius is ignored, as if it was set to 0. corner-shape is implicitly ignored, as it can only work in tandem with border-radius.
[ `外影$/`内影$ ]は,[ 外縁~pathの外側/ 内縁~pathの内側 ]をなぞる。 どちらも, ~strokeとして描画される — その~stroke幅として`拡幅~距離$ の 2 倍を伴い, ~borderの形状により切取られる下で。 ◎ An outer box-shadow follows the outside of the outer path, and an inner box-shadow follows the inside inner path. Both are rendered as a stroke, with a stroke width of spread * 2, clipped by the border shape.
【 `basic-shape$t が 2 個~供された場合、 上では[ 1 個目/ 2 個目 ]のそれが (~pathの幾何を問わず,名目上の)[ 外縁~path/内縁~path ]を成すものと示唆されているが,はっきりしない。 1 個だけ供された場合、 `~stroke図形$の[ 外縁/内縁 ]を成す~pathになると思われる — 当の~pathが自己-交差する場合、 どうなるのか,はっきりしないが。 】
`border-shape$p は、 幾何や~layoutには影響しないが, それでも【結果の~path/~strokeは】当の~boxの【!existing】`~border幅$を利用して算出される。 ◎ border-shape does not affect geometry or layout, which is still computed using the existing border-width properties.
`border-shape$p は、 当の~boxの内側にある内容の~flowには影響しない。 ◎ border-shape does not affect the flow of content inside the box.\
注記: 作者は、 `border-shape$p と `shape-inside$p を併用することで,[ 当の~boxを装飾すると同時に当の~boxの~text~flowを制御する効果 ]を作成できる。 ◎ Note: An author can use border-shape in tandem with shape-inside to create effects that decorate the box and control its text flow at the same time.
内縁な `border-shape$p は、 `border-radius$p と同じ方式で 当の要素を成す`~overflow$する内容を切取る — `§ 隅における切取n法@#corner-clipping$にて述べられるとおり。 ◎ The inner border-shape clips the overflow content of the element, in the same manner as border-radius, as described in corner clipping.
これは、 `置換され$る要素の切取n法には,どう影響するべきか? ◎ how should this affect clipping replaced elements?
所与の~box【!element】 %~box に `関連な側@ は、 次の~algoに従う:
- 
次の表t…
`border-block-start-style$p `塊-始端$ `border-inline-start-style$p `行内-始端$ `border-block-end-style$p `塊-終端$ `border-inline-end-style$p `行内-終端$ …を成す ~EACH( 行 %行 ) に対し,挙げられた順に ⇒ ~IF[ %~box の[ %行 の 1 列目に挙げられた~prop ]の`算出d値$ ~NEQ `none$v ] ⇒ ~RET %行 の 2 列目に挙げられた側
 - ~RET `塊-始端$
 
~privacyの考慮点
この仕様に対し報告された,新たな~privacyの考慮点は、 無い。 ◎ No new privacy considerations have been reported on this specification.
~securityの考慮点
この仕様に対し報告された,新たな~securityの考慮点は、 無い。 ◎ No new security considerations have been reported on this specification.
変更点
- `2025年 7月 22日 最初の公なな作業草案@~TR/2025/WD-css-borders-4-20250722/$ からの変更点 ◎ Changes since the First Public Working Draft of 22 July 2025
 - `corner-*^p 略式~propを追加した。 ◎ added corner-* shorthands
 - `corners^p を `corner$p に改称した。 ◎ renamed corners to corner
 - `Web Platform Tests coverage^en を追加した。 ◎ Added Web Platform Tests coverage
 - `CSS3BG$r を成す[ ~borderと影に関係する全部的な~text ]を組入れた。 ◎ incorporated full text of [CSS3BG] related to borders and shadows
 - 各種 物理- `border-clip-*^p 下位propを `border-*-clip^p に改称したことに加え、 それらに対応する論理-下位propを追加した。 ◎ Renamed border-clip-* properties to border-*-clip and added logical longhands
 - `CSS3BG$r からの追加 ◎ Additions since [CSS3BG]
 - `border-color$p, その下位prop用の値として `image-1D$t を追加した。 ◎ <image-1D> as value for border-color and its longhands
 - 各種[ 物理-/論理- ] `border-*-radius^p 略式~propを追加した。 ◎ added physical and logical border-*-radius shorthands
 - [ `corner-shape$p, 各種 `corner-*-shape^p ]略式~prop, それらに関係する[ `corner$p, 各種 `corner-*^p ]略式~propを追加した。 ◎ added corner-shape and corner-*-shape shorthands, plus related corner and corner-* shorthands
 - `border-shape$p ~propを追加した。 ◎ added border-shape
 - [ `border-limit$p, 各種 `border-*-clip^p ]~propを介した`部分的な~border@#partial-borders$を追加した。 ◎ added partial borders via border-limit and border-*-clip properties
 - 各種 `box-shadow-*^p 下位propを追加した。 `box-shadow$p を略式~propへ転換した。 ◎ added box-shadow-* longhands and turned box-shadow into a shorthand
 - `CSS-LOGICAL-1$r から この仕様へ,各種[ 論理-~border~prop ]を移動した。 ◎ moved logical border properties from [CSS-LOGICAL-1] to this spec.
 
謝辞
この~moduleの前身である[ `CSS1$r, `CSS2$r, `CSS3BG$r ]に対する数多の貢献者たちに加えて、 編集者は,特定的にこの~level 4 に対する示唆と~feedbackを寄せられた次に挙げる方々に感謝したい ⇒ `Tab Atkins, Noam Rosenthal, Håkon Wium Lie, and Oriol Brufau^en ◎ In addition to the many contributors to the [CSS1], [CSS2], and [CSS3BG] predecessors to this module, the editors would like to thank Tab Atkins, Noam Rosenthal, Håkon Wium Lie, and Oriol Brufau for their suggestions and feedback specifically for this Level 4.