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

Re: New feature. Content templates

From: Jerome Leclanche <adys.wh@gmail.com>
Date: Thu, 15 Mar 2012 20:36:54 +0000
Message-ID: <CAFd36BidivwEZHUfndZbUfezCy3NhsptoU4pyOSOp+Va9qqLKQ@mail.gmail.com>
To: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Cc: Alexander Shpack <shadowkin@gmail.com>, www-style <www-style@w3.org>
On Thu, Mar 15, 2012 at 9:46 AM, Benjamin Hawkes-Lewis <
bhawkeslewis@googlemail.com> wrote:

> On Thu, Mar 15, 2012 at 8:41 AM, Alexander Shpack <shadowkin@gmail.com>
> wrote:
> > Main goal: more flexible content constructor, based on HTML templates
> >
> > Usage:
> >
> > content: pattern(#id);
> >
> > where id = unique identifier
> >
> >
> > Example
> >
> > Code:
> >
> > <div><span id="contentPattern">This is </span>madness!</div>
> > <div id="content">SPARTA!</div>
> >
> > #content {
> >  content: pattern(contentPattern);
> > }
> >
> > Result:
> >
> > This is madness!
> > This is SPARTA!
>
> Hmm. Can you give an example of where you'd use this in a real design?
>
> --
> Benjamin Hawkes-Lewis
>
>
That's an interesting idea. I'd use text() rather than pattern() though.

A real world example could be a text preview of a form/email being sent...
something that needs its content to be updated live. Maybe one of those
"fill-a-word" forms.
This can all be done in easy and simple javascript though, so I don't
actually see much *use* for it, but I still think it's an excellent idea.

J. Leclanche
Received on Thursday, 15 March 2012 20:37:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:52 GMT