Re: brainstorm: attributes as virtual tags

On May 18, 2007, at 8:58 AM, Dmitry Turin wrote:

>
> Good day, Dao.
> Excuse me for a long break.
>
> DG> <style>
> DG>    a::before {
> DG>      content: attr(a1) "\A" attr(a2) "\A" attr(a3) "\A" attr(a4);
> DG>    }
> DG> </style>
>
> <style>
>    record1::before { content: attr(name) attr(surname) }
>    record2::before { content: attr(name) attr(surname) }
> </style>
> <body>
>   <record1 name= surname= >
>   <record2 name= surname= >
> </body>
>
>     This way don't allow to specify styles for visualization of  
> these attributes
> (like the following)

Sure it does.

  record1::before {
	content: attr(name) attr(surname);
	color: red;
	float: right;.
	/* ... */
}
  record2::before {
	content: attr(name) attr(surname);
	color: blue;
	float: left;
	/* ... */
}

You've always been able to style generated content in some manner.  
CSS2.1 relaxed the restriction on display types and positioning as  
well to allow even greater flexibility.

> [...]
>
>   So we see, that michanism of property "content" is _essentially_  
> narrower,
> than michanism of virtual tags. Virtual tag allow to use even  
> pseudo-classes.

This works with generated content too.  
record1::before:hover :record1::before:active etc. should all work.

>   [...]
>
>
>
> Dmitry Turin
> http://html6.by.ru
> http://sql4.by.ru
> http://computer2.by.ru
>
>

Anyway, Isn't this best left up to the CSS WG? I don't think we have  
the authority to specify new CSS selectors.

- Elliott

Received on Friday, 18 May 2007 16:52:05 UTC