水無月ばけらのえび日記

bakera.jp > 水無月ばけらのえび日記 > border の有無でマージン相殺が変わる > 「border の有無でマージン相殺が変わる」へのコメント

「border の有無でマージン相殺が変わる」へのコメント

[2623] Re: 「border の有無でマージン相殺が変わる」

さか (2005年2月28日 12時45分)

CSS2.1 の 8.3.1 と 10.6.3 では、曖昧さ改善されたようです。

CSS2.1 section 10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'

http://www.w3.org/TR/2004/CR-CSS21-20040225/visudet.html#normal-block

>If it has block-level children, the height is the distance between the top border-edge of the topmost block-level child box that doesn't have margins collapsed through it and the bottom border-edge of the bottommost block-level child box that doesn't have margins collapsed through it. However, if the element has a non-zero top padding and/or top border, or is the root element, then the content starts at the top margin edge of the topmost child. (The first case expresses the fact that the top and bottom margins of the element collapse with those of the topmost and bottommost children, while in the second case the presence of the padding/border prevents the top margins from collapsing.) Similarly, if the element has a non-zero bottom padding and/or bottom border, then the content ends at the bottom margin edge of the bottommost child.

おおよその意味は把握できたのですが、CSS2.1で追記された

"that doesn't have margins collapsed through it"

の部分はどのような状態のことを意味しているのでしょうか?

"through it" というのが、何を示しているのか分らないのです。

section 8.3.1 も読んでみましたが、結局わかりませんでした。

CSS2.1 section 8.3.1 Collapsing margins

http://www.w3.org/TR/2004/CR-CSS21-20040225/box.html#collapsed-through

>If the top and bottom margins of a box are adjoining, then it is possible for margins to collapse through it.

[2629] Re: 「border の有無でマージン相殺が変わる」

ばけら (2005年3月1日 1時44分)

>"that doesn't have margins collapsed through it"

>の部分はどのような状態のことを意味しているのでしょうか?

>"through it" というのが、何を示しているのか分らないのです。

 おそらく難しく考える必要はなくて、単に it == margin でしょう。あるマージンが別のマージン領域に乗り上げて重なるという話ですので。

# と思いますが実はイマイチ自信なし。

[2630] Re: 「border の有無でマージン相殺が変わる」

さか (2005年3月1日 3時52分)

>あるマージンが別のマージン領域に乗り上げて重なるという

となると "that doesn't have margins collapsed through it" は否定文ですので、

「あるマージンが別のマージン領域に乗り上げて潰し合って『いない』……」という

意味になるのでしょうか? 隣接ブロックのマージンと潰し合って「いる」からこそ

「最上部のボーダー上辺から最下部のボーダー下辺までの距離」になる気がして……

錯乱状態に陥っております……

[2631] Re: 「border の有無でマージン相殺が変わる」

ばけら (2005年3月2日 11時57分)

>となると "that doesn't have margins collapsed through it" は否定文ですので、

>「あるマージンが別のマージン領域に乗り上げて潰し合って『いない』……」という

>意味になるのでしょうか?

 ええと、"margins collapsed through it" は「重なったマージン」くらいの意味で、

border-edge of the topmost block-level child box that doesn't have margins collapsed through it

 は、「重なったマージンを含まない、もっとも上にあるブロックレベルの子ボックスのボーダー辺」という程度の意味だと思います。

 ここは height の計算方法について述べているところですので、単に重なったマージンは height の計算に参入しないという意味で言っているのだと思います。

[6000] 未承認メッセージ (投稿元:95.79.73.126)

WBGGOpoATyTB (2010年8月21日 20時33分)

(この記事は承認されていないため、管理者が許可するまで公開されません。)

[6040] 未承認メッセージ (投稿元:95.79.109.180)

GxOdReJFBUvrpNHs (2010年8月26日 3時29分)

(この記事は承認されていないため、管理者が許可するまで公開されません。)

[6100] 未承認メッセージ (投稿元:109.111.184.1)

WaldosM (2010年9月21日 0時45分)

(この記事は承認されていないため、管理者が許可するまで公開されません。)

[8034] 未承認メッセージ (投稿元:46.21.144.51)

rpzqyczamyr (2012年12月30日 1時24分)

(この記事は承認されていないため、管理者が許可するまで公開されません。)

新規投稿フォーム

※広告や宣伝の書き込みはご遠慮ください。

:

:

:

最近の日記

関わった本など