W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: brainstorm: attributes as virtual tags

From: Dão Gottwald <dao@design-noir.de>
Date: Tue, 24 Apr 2007 17:55:24 +0200
Message-ID: <462E286C.8020905@design-noir.de>
To: Dmitry Turin <html60@narod.ru>
CC: public-html@w3.org

Dmitry Turin schrieb:
> Example 1.
> Let html- or xml-file contain:
> 
> <a a1="x" a2="y" a3="z" a4="w">
> 
> We create css-file:
> 
> a §a1 {
>   color: red;
>   newstring:yes;
> }
> a §a2 {
>   color: blue;
>   newstring:yes;
> }
> a §a3 {
>   color: green;
>   newstring:yes;
> }
> 
> Than browser display <a a1="x" a2="y" a3="z" a4="w"> so, as if it is
> 
> <a a4="w">
>   <span color="red">  x</span><br>
>   <span color="blue"> y</span><br>
>   <span color="green">z</span><br>
> </a>

Try this:

<style>
   a::before {
     content: attr(a1) "\A" attr(a2) "\A" attr(a3) "\A" attr(a4);
     white-space: pre;
   }
</style>
<a a1="x" a2="y" a3="z" a4="w">

No colors here, but still close to your example.

--Dao
Received on Tuesday, 24 April 2007 15:55:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:15:53 GMT