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

On Tue, 26 Jun 2001, fantasai wrote:
> Ian Hickson wrote:
>> In the context of the [CSS2] content property, the same applies:
>> |content: ''| takes up room (just like an empty inline) and
>> |content: none| or whatever it ends up being called just doesn't
>> exist in the rendering tree.
>
> The fact that you're taking the box itself out of the rendering tree
> means you're fiddling with something other than the box's content.

That's a very poor explanation, I'm sorry. It only works for generated
content, and not in the context that we are speaking about. Let me try
again, this time covering the extended 'content' as well:

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).


> ==========================================================
>> [...]
>>>> This is what my proposal (given above) does, except
>>>> with one property, by making it possible to say:
>>>>
>>>>    content: replaced(lala), 'some-content';
>>>>
>>>> ...where "lala" is used if possible, and otherwise 'some-content'
>>>> is used instead. The working group generally feels that it is
>>>> better to not add new properties if that can be avoided.
>>>
>>> Avoided by what, making function notation modify the meaning of
>>> the ~property~?
>>
>> Well it doesn't change the meaning of the property itself.
>
> 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?"

Same answer. ("Because that's what it's defined as being." or "Why
not?" depending on how I feel.)


>>> As I've pointed out in English above, the values for replacing
>>> content and replacing elements mean different things.
>>
>> I'm confused.
>>
>> Here are the cases I see need supporting for replacing
>> the content of elements:
>>
>>    1. Don't replace anything, let the DOM determine what
>>       is used.
>>
>>    2. Replace all the children of the element with a new
>>       set of content with its own formatting rules, for
>>       example mixed text and images. ("generated content")
>>
>>    3. Replace all the children of the element with a
>>       single item that is out of the scope of the
>>       stylesheet. ("replaced content")
>>
>> None of these replace the element itself. When I've said
>> "replaced element" I have always meant "replaced content"
>> (and I apologise for not being clear).
>
> In the first two instances, 'content' (auto or explicit) only
> affects the stuff inside the element's CSS box.

Ok...


> In the last instance, 'content' would not only affect the stuff
> inside the element's CSS box, but also change the nature of the CSS
> box.

That depends on your point of view. IMHO, it changes the box's content
from being in-flow to being replaced. The box itself stays the same
(inline, block, table-cell, whatever).


> The content of the CSS box is its document content.
>
> Now, if I put the CSS box in an HTML document, the style rules will
> inherit through the box and affect its content (the document
> content).
>
> I can replace the document content in the CSS box with some other
> content.
>
> The rules still inherit through the CSS box.
>
> Now, suppose I decided to replace the CSS box with another document
> (like what happens with IFRAME).
>
> The rules don't inherit through the replaced CSS box, and they don't
> affect the inserted content.
>
> Do you see what I'm getting at?

Yes. I just don't think it's a big deal. :-)

-- 
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, 27 June 2001 03:54:30 UTC