Re: [css3-gcpm] Use of string(...) outside of margin boxes

Also sprach Peter Moulder:

 > Named strings were apparently designed for use in margin boxes, but I
 > don't see anything in the text that says that string(...) can only be
 > used in margin boxes.

Correct.

I can see use cases for named strings outside of margin boxes. For
example, one could write:

  #foo { display: none; string-set: foo content(); }
  #bar { content: string(foo) }

to move the content of #foo to #bar. But it doesn't work that well as
only the text and not the structure is copied.

   [excellent analysis deleted]

 > The simplest way to resolve all of these would be to say that string(...)
 > outside of @page rules is either an invalid value or evaluates to the
 > empty string.  (Just as only certain properties apply to margin boxes,
 > so too we could say that certain values of those properties are only
 > legal when applied to margin boxes.)

Agreed, saying that it evaluates to the empty string is my preferred
solution. Unless someone can think of use cases that are worth
untangling string-set for general use?

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Thursday, 20 October 2011 23:15:04 UTC