W3C home > Mailing lists > Public > www-style@w3.org > March 2012

[css3-gcpm] Content templates

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Thu, 15 Mar 2012 12:22:30 +0100
Message-Id: <9E7C4AF1-576C-4497-9768-6515AB493EC2@crissov.de>
To: www-style <www-style@w3.org>
Alexander Shpack:

> Main goal: more flexible content constructor, based on HTML templates

The ‘content’ property is, despite its name, still only to be used for style, not content. HTML and other document languages have to deal with macros themselves (e.g. local entity references in SGML and XML).

I agree, though, that the Web languages, i.e. HTML+CSS, are not as feature-rich as, say, TeX in this regard, unless preprocessed or scripted.

> content: pattern(#id);

Selectors in values are always a bad idea.

See GCPM or Content for an alternate proposal that seems to come close to what you desire.

> <div><span id="contentPattern">This is </span>madness!</div>
> <div id="content">SPARTA!</div>
> #content {content: pattern(contentPattern);}

Since the ‘content’ property replaces default content with its value, the second line would read:

  This is 

With ‘string-set’ the CSS for your example would look something like this:

  #contentPattern {string-set: pattern contents;}
  #content        {content: string(pattern) contents;}
Received on Thursday, 15 March 2012 11:23:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:57 UTC