W3C home > Mailing lists > Public > www-style@w3.org > July 2001

Re: replaced inlines [was: vertical-align content-generated image?]

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 4 Jul 2001 17:10:38 -0700 (Pacific Daylight Time)
To: fantasai <fantasai@escape.com>
cc: <www-style@w3.org>
Message-ID: <Pine.WNT.4.31.0107041656100.1552-100000@HIXIE.netscape.com>
On Wed, 4 Jul 2001, fantasai wrote:
>> In the context of the extended content property, if you have <div/>
>> in your document, then:
>>    div { display: block; content: none; }
>> ...is the same as <div/>, whereas
>>    div { display: block; content: ''; }
>> ...is the same as <div><span/></div>. The first has an intrinsic
>> height of 0, whereas the second has an intrinsic height equal to
>> the line height (typically 1.2em).
> Ah, then a string creates not only content, but an inline box around
> it as well.

Yes, see http://www.w3.org/TR/REC-CSS2/visuren.html#anonymous

> So, what happens if the element in question is "display: inline"?

If the element in question is an inline box, then I believe the
proposed value none should be indistinguishable from the value ''.

>>> Then how come a url causes two different results based on whether
>>> it's in the url() notation or the replaced() notation?
>> "Then how come a counter identifier causes two different results
>> based on whether it's in the counter() notation or the counters()
>> notation?"
> counter() and counters() both return type string, do they not? And
> the content property treats that string value as it does any other
> string value, does it not?
> AFAICT, the url() notation takes a string and returns type URI,
> which is handled differently from type string.

In the context of the 'content' property I imagine it returning the
type 'mixed context replaced content' (i.e., it is replaced content
but in the context of mixed data: it can appear in the middle of text,
and doesn't directly replace the element itself).

> The replaced() notation also takes a string, but what does
> replaced() return?

'replaced content' (it's own context, i.e. it makes the element be a
replaced element, so the 'height' and 'width' properties affect it
even if it is inline).

Not that I'd ever thought of it this way before.

Ian Hickson                                            )\     _. - ._.)   fL
Invited Expert, CSS Working Group                     /. `- '  (  `--'
The views expressed in this message are strictly      `- , ) -> ) \
personal and not those of Netscape or Mozilla. ________ (.' \) (.' -' ______
Received on Wednesday, 4 July 2001 20:10:47 UTC

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