W3C home > Mailing lists > Public > www-style@w3.org > January 2000

Re: Inline h*ll

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Fri, 14 Jan 2000 17:32:34 +0000 (GMT)
To: Matthew Brealey <thelawnet@yahoo.com>
cc: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.10001141718500.29109-100000@mary.bath.ac.uk>
On Fri, 14 Jan 2000, Matthew Brealey wrote:

>> Nothing normative, at any rate. You can treat BR as an empty inline
>> element with this style:
>>    BR:before { 
>>       content: '\A';
>>       white-space: pre;
>>    }
> No you can't. White-space applies only to block elements. 
> As a result, my test is correct, and you, Mozilla, Opera et al are
> all wrong.

Actually, I included white-space because there has been talk of
changing the exact meaning of the spec for CSS3, and the above is
therefore forwards compatible. (For example, I have in the past
suggested that white-space apply to inline elements as well, as there
is no reason why it should not, and there have been suggestions that
if this is done, generated content should treat \A to be equivalent to
a raw line feed in the markup, and thus white-space would be required
to actually break the line.)

In any case, even without the 'white-space' declaration, the above is
still valid. The CSS_2_ spec says:

# Authors may include newlines in the generated content by writing the
# "\A" escape sequence in one of the strings after the 'content'
# property. This inserts a forced line break, similar to the BR
# element in HTML. See "Strings" and "Characters and case" for more
# information on the "\A" escape sequence. (Section 12.2)

# [white-space: normal] directs user agents to collapse sequences of
# whitespace, and break lines as necessary to fill line boxes.
# Additional line breaks may be created by occurrences of "\A" in
# generated content (e.g., for the BR element in HTML). (Section 16.6)

And there are several examples that show this.

>> However, previous proposals from both David Baron and myself have
>> suggested that to make line-height work well for blocks, an
>> anonymous inline should wrap all blocks' contents. This would
>> result in the same effect as with the empty inline BR in the
>> previous example, and is what both Opera 4 and Mozilla 5 have
>> implemented.
> If you are wanting to browsers to diverge from the published
> specification, far better would be to encourage them to follow a
> sensible line box proposal in the first place.

The general consensus amongst implementors with whom I have discussed
this is that David's description (of which he released a comprehensive
description yesterday, but which he has been proposing for over a
year) is a sensible line box proposal, and the best interpretation of
the spec available.

And since they are the ones writing the browsers, their opinion as to
the proposal's worth counts as a lot more than, say, mine.

> Under my proposal, [...]

See David's comments.

Ian Hickson                            ("`-''-/").___..--''"`-._   
http://www.bath.ac.uk/%7Epy8ieh/        `6_ 6  )   `-.  (     ).`-.__.`)
                                        (_Y_.)'  ._   )  `._ `. ``-..-' fL
Member, Mozilla Quality Assurance     _..`--'_..-_/  /--'_.' ,'
Browser Standards Compliance Team    (il).-''  (li).'  ((!.-'    
Received on Friday, 14 January 2000 12:32:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:52 UTC