Skip to content

Commit 79109ec

Browse files
committed
Put in the line-box-contain text (still needs more editing). (date: 2003/06/01 00:30:27)
1 parent 8c17ceb commit 79109ec

1 file changed

Lines changed: 176 additions & 1 deletion

File tree

css3-linebox/Overview.src.html

Lines changed: 176 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,9 @@ <h3 id="InlineBoxHeight"><span class="secno">3.4. </span>Line height adjustment:
660660
<dd>For inline-level elements, the element does not influence the <i>extended
661661
block-progression dimension</i> of the line. The computed value is the
662662
specified value ('none'). For block-level elements, equivalent to 'normal'
663-
(and the computed value is 'normal').</dd>
663+
(and the computed value is 'normal').
664+
<span class="issue">This definition should be briefer, and should
665+
refer to the next section.</span></dd>
664666
</dl>
665667
<div class="example">
666668
<p style="DISPLAY: none">Example(s):</p>
@@ -698,6 +700,179 @@ <h3 id="LineStacking"><span class="secno">3.5. </span>Line Stacking: the
698700
<span class="property"><a href="#line-box-contain">'line-box-contain'</a></span> property</h3>
699701

700702

703+
<table class="propdef" id="name-30">
704+
<tbody>
705+
<tr>
706+
<td><em>Name:</em>
707+
708+
<td><dfn id="line-box-contain">line-box-contain</dfn>
709+
710+
<tr>
711+
<td><em>Value:</em>
712+
713+
<td>[ block || inline || font || text || replaced || inline-box ] | none |
714+
inherit | initial
715+
716+
<tr>
717+
<td><em>Initial:</em>
718+
719+
<td>block inline replaced
720+
721+
<tr>
722+
<td><em>Applies to:</em>
723+
724+
<td>block-level elements
725+
726+
<tr>
727+
<td><em>Inherited:</em>
728+
729+
<td>yes
730+
731+
<tr>
732+
<td><em>Percentages:</em>
733+
734+
<td>N/A
735+
736+
<tr>
737+
<td><em>Media:</em>
738+
739+
<td>visual
740+
741+
<tr>
742+
<td><em>Computed value:</em>
743+
744+
<td>specified value (except for 'inherit' and 'initial')
745+
</table>
746+
747+
<p>This property enumerates which aspects of the elements in a line box
748+
contribute to the height height of that line box.
749+
750+
<dl>
751+
<dt>block
752+
753+
<dd>The extended block progression dimension of the root inline box
754+
must fit within the line box.
755+
756+
<dt>inline
757+
758+
<dd>The extended block progression dimension of all non-replaced
759+
inline boxes whose 'line-height' is not 'none' in the line box must fit within the line box.
760+
761+
<dt>font
762+
763+
<dd>The block progression dimension of all non-replaced inline boxes
764+
whose 'line-height' is not 'none'
765+
that directly (i.e., within the box but not within one of its
766+
descendants) contain non-removed text must fit within the line box,
767+
where non-removed text is any characters not removed based on the values
768+
of the 'linefeed-treatment', 'white-space-treatment', and
769+
'all-space-treatment' properties. <span class="issue">[LDB: This isn't
770+
quite right. What about zwnj, etc.?</span>
771+
772+
<dt>replaced
773+
774+
<dd>The margin box of all <span title="replaced element"><a
775+
href="#replaced">replaced elements</a></span> within the line
776+
must fit within the line box.
777+
778+
<dt>inline-box
779+
780+
<dd>The margin-box of all non-replaced inline elements in the
781+
line must fit within the line box.
782+
<span class="issue">Should this split into 'inline-border' and
783+
'inline-margin'?</span>
784+
785+
<p>If the property has no value for all elements within a line, then the line
786+
box has 0 height, and the line within the anonymous inline established by the
787+
block that coincides with the line block is the baseline of that anonymous
788+
inline block (or should it be determined by the 'vertical-align' property of
789+
the block?). <span class="issue">[This is arbitrary. Does anyone have better
790+
ideas?]</span>
791+
792+
<p class="note">Note that the CSS2 model is equivalent to 'block inline
793+
replaced' but the backwards-compatible HTML model is similar to (but not
794+
exactly) 'font replaced' [1].
795+
796+
<p class="issue">Concerns: * How does this work with the cascade? * What
797+
about determining the visual size of inline boxes?
798+
799+
<p class="issue">[1] I believe the differences are restricted to the first
800+
line of LI elements, the last line of LI, DD, and DT elements, and issues
801+
concerning whitespace around images. [DB]
802+
803+
<p>The height of each line box is established as follows (we describe the
804+
case for <em><a href="#horizontal">horizontal flow</a></em>, but vertical
805+
flow is analogous). First align all the boxes on the line relative to each
806+
other according to the rules for <span
807+
class="property">'vertical-align'</span>. The line box must satisfy all of
808+
the following constraints:
809+
810+
<ol>
811+
<li>For each box on the line that has <span class="css">'font'</span> in its
812+
value of <span class="property"><a
813+
href="#line-box-contain">'line-box-contain'</a></span>, the line box must be
814+
high enough to contain the <span title="top of the text"><a
815+
href="#top-of">top and bottom of that box's text</a></span>.
816+
817+
<li>For each box that has <span class="css"><a
818+
href="#inline">'inline'</a></span> in <span class="property"><a
819+
href="#line-box-contain">'line-box-contain'</a></span>, the top of the line
820+
box must be at least as high as the <span title="top of the text"><a
821+
href="#top-of">top of the box's text</a></span> plus the box's <em><a
822+
href="#half-leading">half-leading</a></em>. The bottom of the line box must
823+
be at least as low as the bottom of the text plus the half-leading.
824+
825+
<li>For each box that has <span class="css">'inline-box'</span> in <span
826+
class="property"><a href="#line-box-contain">'line-box-contain'</a></span>,
827+
the top of the line box must be at least as high as the margin-top of this
828+
box. The bottom of the line box must be at least as low as the margin-bottom.
829+
830+
<li>For each <em>replaced box</em> that has <span
831+
class="css">'replaced'</span> in its <span class="property"><a
832+
href="#line-box-contain">'line-box-contain'</a></span>, the line box must
833+
contain the margin-top and margin-bottom of this box. <span
834+
class="issue">[The value 'replaced' is not strictly needed. 'Inline-box' also
835+
does the job, except that it is not automatically restricted to replaced
836+
elements.]</span>
837+
838+
<li>For each box that has <span class="css">'text'</span> in <span
839+
class="property"><a href="#line-box-contain">'line-box-contain'</a></span>,
840+
the top of the line box must be at least as high as the top of each glyph in
841+
the box (excluding those in child elements). The bottom of the line box must
842+
be at least as low as the bottom of each glyph in the box (excluding child
843+
elements).
844+
845+
<li>If the enclosing block for this line has <span class="css"><a
846+
href="#block">'block'</a></span> in <span class="property"><a
847+
href="#line-box-contain">'line-box-contain'</a></span>, then the top of the
848+
line box must be at least as high as the text top plus the half-leading of an
849+
<em><a href="#anonymous">anonymous inline element</a></em> and the bottom of
850+
the line box as low as the text bottom plus the half leading. This must hold
851+
whether or not this line actually contains such an element.
852+
</ol>
853+
854+
<p class="note">Thus 'block' can be used to set an overall minimum line
855+
height (viz. the value of 'line-height' of the element itself) for all lines
856+
in an element, independent of the actual contents of each line. In
857+
particular, setting 'line-box-contain' to just 'block' and no other values
858+
will ensure that all lines are the same height, at the possible risk of some
859+
tall inline elements overlapping with lines above or below.
860+
861+
<p>The <dfn id="half-leading">half-leading</dfn> of a box is defined as half
862+
the computed value of 'line-height' minus half the computed value of
863+
'font-size', i.e., (line-height - font-size)/2.
864+
865+
<p>The <dfn id="top-of">top of the text</dfn> is the top of the em-box of a
866+
box's nominal font, whether or not there actually is any letter that tall.
867+
Replaced elements, for example, have no text, but still have a nominal font
868+
and are thus a text top. The rules above refer to the position of the text
869+
top after the box has been aligned with 'vertical-align'.
870+
871+
872+
873+
874+
<h4>Old, remove this:</h4>
875+
701876
<p>Line stacking is the mechanism by which a line box is determined for each
702877
line in a block and then these lines are stacked in the block-progression
703878
direction resolving any spacing constraints between adjacent lines. The

0 commit comments

Comments
 (0)