Re: Generated and replaced content module (was RE: BR element and generated content)

fantasai wrote:
> 
> BTW, here's a copy of a message of mine on this topic. Håkon also had some
> comments, I'll ask him if I can forward them here. ...

Here's Håkon's reply to that message, with my comments interlaced:

-------- Original Message --------
Subject: Re: content: require-font()
Resent-Date: Tue, 08 May 2007 17:37:16 +0000
Resent-From: w3c-css-wg@w3.org
Date: Tue, 08 May 2007 13:36:50 -0500
From: fantasai
To: Håkon Wium Lie
CC: w3c-css-wg@w3.org
References: <17984.16975.95899.919070@gargle.gargle.HOWL>


Håkon Wium Lie wrote:
 > Also sprach fantasai:
 >
 >  > I wrote up the proposal here:
 >  >    http://csswg.inkedblade.net/ideas/image-replacement
 >
 > Great!
 >
 > The writeup shows the problem with "content/contents" -- one of your
 > example uses "content" (singular):
 >
 >   h1      { content: require-font(biggy) content, url(replacement.png) }
 >
 > the others use "contents" (plural), e.g.:
 >
 >   h1 { font-family: Zapfino, cursive;
 >      content: require-font("Zapfino") contents; }
 >
 > This is why I think "self" is better.

I think 'contents' is more accurate. 'self' to me seems to imply that the
element itself is added or removed from its content list. Maybe some other
name would be appropriate.

Note that you can combine contents with other content:

   content: "prepend" contents "append";

It represents the actual contents of the element, not the element itself.

 > Also, the keyword should be
 > optional -- this was agreed upon and there should be examples showing
 > this.

The examples are all from the F2F minutes. You can add additional
examples, but please don't change the ones there (except for typos
of course :)

 >  > We need to discuss the 'content' property. 'contents' isn't the only
 >  > part that needs discussion. ...
 >  >
 >  > I think what we need is a pared down CSS3 Generated Content module. It
 >  > needs to include
 >  >    - stuff from CSS2.1
 >  >    - ::marker and ::line-marker
 >  >    - 'content' property with
 >  >         - 'contents' keyword
 >  >         - any necessary "I want nothing" keywords
 >  >         - comma-separated fallbacks
 >  >         - require-font()
 >  > and that's it.
 >
 > I agree that we need this discussion and your list is a good starting
 > point. The GCPM draft also uses these:
 >
 >   target-counter()
 >   target-counters()
 >   target-text()
 >   target-move()
 >   self

Let's discuss these. I'd like to add only features that we consider
stable enough for implementation in the near future, and leave the
rest in our more experimental GCPM draft for further work. I'd like
to get a stable spec out for a) content on all elements, like Opera
has implemented iirc, and for b) content fallbacks. I think the
combination of those two is pretty important for web designers right
now. We might not have the resources to take it to CR right now, but
it would help if we had a spec that defines blockers like what the
none values are and that reflects all the resolutions we've made on
this topic so far.

 >   before
 >   after
 >   first-letter

These are in CSS2.1, so of course.

 > For math, I also think we need:
 >
 >   ::outside

I remember hixie brought up problems with that. Don't remember what they were, though.

~fantasai


=========================================
And Håkon's reply to /that/:



-------- Original Message --------
Subject: contents vs. self vs. ...
Resent-Date: Fri, 11 May 2007 10:09:39 +0000
Resent-From: w3c-css-wg@w3.org
Date: Fri, 11 May 2007 12:09:12 +0200
From: Håkon Wium Lie
To: fantasai
CC: w3c-css-wg@w3.org
References: <17984.16975.95899.919070@gargle.gargle.HOWL>	<4640C342.3070901@inkedblade.net>


Also sprach fantasai:

  > > I suggest using "self" instead of "contents" for this. Because:
  > >
  > >   - "self" is shorter
  > >   - "self" has no singular/plural dilemma
  > >   - "contents" is very close to the name of a property

  > I think 'contents' is more accurate. 'self' to me seems to imply that the
  > element itself is added or removed from its content list. Maybe some other
  > name would be appropriate.

Another argument for 'contents' is that is is used in a WD since 2003:

   http://www.w3.org/TR/2003/WD-css3-content-20030514/#contents0

So, I can live with it although I still think "self" is better.

I'll change GCPM to use "contents" unless I hear more support for
"self".

-h&kon

Received on Thursday, 17 January 2008 22:17:34 UTC