Re: [css2.1] Issue 199 proposal

On Mon, Oct 25, 2010 at 5:37 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> On 10/25/2010 05:26 PM, Tab Atkins Jr. wrote:
>>
>> On Mon, Oct 25, 2010 at 4:20 PM, L. David Baron<dbaron@dbaron.org>  wrote:
>>>
>>> On Wednesday 2010-10-20 09:25 -0700, Tab Atkins Jr. wrote:
>>>>
>>>> | If an element contains no text, no preserved white space, no
>>>> | inline elements with non-zero margins, padding, or borders, and
>>>> | no other in-flow content (such as images, inline block, or
>>>> | inline tables), then no line boxes are generated inside the
>>>> | element.  Any child elements that rely on the element for
>>>> | positioning are treated as being in the "before start" corner
>>>> | of the element.
>>>
>>> However, I don't like the new proposal.  It introduces unpleasant
>>> discontinuities that weren't there before, e.g., when 'text-align'
>>> is 'right'.  See, for example, this testcase:
>>>
>>> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0Abody%20%3E%20div%20%7B%20border%3A%20solid%20blue%3B%20text-align%3A%20right%3B%20width%3A%20500px%20%7D%0Abody%20%3E%20div%20%3E%20div%20%7B%20display%3A%20inline%3B%20position%3A%20relative%20%7D%0Abody%20%3E%20div%20%3E%20div%20%3E%20div%20%7B%20position%3A%20absolute%3B%20height%3A%20100px%3B%20width%3A%2050px%3B%20background%3A%20orange%3B%20top%3A%200%3B%20right%3A%200%20%7D%0A%3C%2Fstyle%3E%0A%3Cdiv%3E%3Cdiv%3E%3Cdiv%3E%3C%2Fdiv%3E%3C%2Fdiv%3E%3C%2Fdiv%3E
>>
>> That discontinuity wasn't intentional.  Try this text on for size:
>>
>> | If an element contains no text, no preserved white
>> | space, no inline elements with non-zero margins,
>> | padding, or borders, and no other in-flow content
>> | (such as images, inline block, or inline tables),
>> | then no line boxes are generated inside the
>> | element.  The auto position of any child elements
>> | in the block-progression direction is the "before"
>> | edge of the parent element.  In the
>> | inline-progression direction, the position is the
>> | same as the position that a zero-width, zero-height
>> | inline replaced element in the parent element would
>> | be (this, for example, respects the script
>> | direction, as well as properties like text-align).
>
> Note that CSS2.1 doesn't recognize vertical text. It's
> best not to confuse matters by introducing terminology
> here that isn't used elsewhere in the spec. Just keep
> things physical for now; it's up to the CSS3 specs to
> generalize things.

Ah, okay.  In that case...

| If an element contains no text, no preserved white
| space, no inline elements with non-zero margins,
| padding, or borders, and no other in-flow content
| (such as images, inline block, or inline tables),
| then no line boxes are generated inside the
| element.  The auto position of any child elements
| is the top of the box in the vertical direction,
| and the same position horizontally that a zero
| width, zero height inline replaced element would
| have if placed in the element.  (This, for example,
| respects the text-align property.)

~TJ

Received on Tuesday, 26 October 2010 00:49:08 UTC