W3C home > Mailing lists > Public > www-style@w3.org > October 2011

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

From: Håkon Wium Lie <howcome@opera.com>
Date: Fri, 21 Oct 2011 01:14:23 +0200
Message-ID: <20128.43855.262875.881988@gargle.gargle.HOWL>
To: Peter Moulder <peter.moulder@monash.edu>
Cc: www-style@w3.org
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.


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 Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Thursday, 20 October 2011 23:15:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:06 UTC