Re: New display value "footnote"

Ian Hickson wrote:
> On Thu, 19 Sep 2002, Stuart Ballard wrote:
> 
>>Can't you just say that the ::footnote pseudo-element doesn't exist at
>>all unless "content: footnote" is specified on the relevant element,
>>and then say that the default value of the "content" property on the
>>::footnote pseudo-element is "contents"?
> 
> 
> So what you are saying is that the 'content' property on the '::footnote'
> pseudo-element has an initial value ('normal') which computes to 'none' in
> the usual case but 'contents' if the element itself uses the counter
> 'footnote' (directly or indirectly) somewhere in _its_ 'content' property?

You could do it that way, but it's not quite what I was envisioning.

I was imagining that the ::footnote pseudo-element would simply *not 
exist* if no element uses the 'footnote' counter in its content 
property. Kind of like the ::first-line pseudo-element would (I imagine) 
not exist for an element that, for whatever reason, contained no line 
boxes (a replaced element, say).

The difference becomes apparent if I try to do something like:

fn::footnote { content: 'Hello, I'm a footnote' }

*without* specifying content: footnote for any of the actual fn 
elements. With your interpretation, I'd still get a footnote for every 
fn element but no way to get to them from the actual 'fn' elements. With 
mine, the fn::footnote selector wouldn't match anything. Essentially, 
the difference between our interpretation is whether this combination:

fn::footnote { content: 'A footnote' }
fn[note] { content: footnote }

<fn/><fn/><fn note="true"/><fn/><fn/>

gives one footnote or five.

> It's a bit of a hack but I suppose it could work.

There's worse already in CSS...

Stuart.

-- 
Stuart Ballard, Programmer
NetReach - Internet Solutions
(215) 283-2300, ext. 126
http://www.netreach.com/

Received on Thursday, 19 September 2002 16:09:22 UTC