Re: New display value "footnote"

On Thu, 19 Sep 2002, Stuart Ballard wrote:
> Ian Hickson wrote:
>>
>> 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.

   ::footnote { content: none; }

...is the closest you'll get to the ::footnote pseudo-element not
existing. ('display' doesn't apply to ::footnote for various technical
reasons like the fact that it wouldn't make any sense.)


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

It still "exists", it just doesn't appear in the rendering tree.


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

I don't think there's a use case for that. It is quite possible that an
author would use a counter _other_ than the automatic 'footnote' counter,
e.g. to get around the fact that said counter is indeed automatic, or to
have two simultaneous footnote counters.

My interpretation of your proposal gives the same effect, but is more in
line with the CSS model and does not artificially limit the author's
possibilities.

Also, your version would mean

   a[href]::after { content: footnote; }
   a[href]::footnote { content: attr(href); }

...wouldn't work (unless you extended your idea to look for a 'footnote'
counter in ::before and ::after and any other in-flow pseudo-elements).


>> It's a bit of a hack but I suppose it could work.
> There's worse already in CSS...

I'm not convinced there is...

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 19 September 2002 16:36:43 UTC