[css3-content] suggestions and comments

This e-mail addresses several aspects in relation to the CSS3 Generated 
and Replaced Content Module.



|| PROPOSAL ||


* :replaced pseudo-class *

This pseudo-class can be used for styling a replaced element.

 EXAMPLE

   img{
    display:inline;
    content:attr(src,url),attr(alt),attr(src);
   }
   img:replaced{
    display:inline-block;
   }


* ::line(arguments) pseudo-element *

This pseudo-element can be used to style individual lines. It can accept 
arguments, just like :nth-child(). This can replace ::line-marker in the 
current css3-content WD, since that isn't needed anymore.

 EXAMPLE

   pre::line{
    display:list-item;
    color:#000;
    background:#fff;
   }
   pre::line(2n){
    background:#ccc;
   }
   pre::line::marker{
    /* generate line numbers */
   }



|| COMMENTS ||


- 4.2. Inserting content into an element: the '::before' and '::after' 
pseudo-elements

>  An anonymous table cell box is generated around the '::before'
>  content in this case, resulting in a 3×2 table.

How is this possible? I though that ::before and ::after worked like this:

 EXAMPLE

   <span><::before/>actual content<::after/></span>


If you replace the SPAN element with a TD element. How can it ever be 
generated _before_ the TD element and not generated as a child of the TD 
element, what one would expect?


- 4.3. Wrapping elements in pseudo-elements with '::outside'

Why doesn't ::outside(1) inherits from ::outside(2)? If it creates this 
markup:

 EXAMPLE

   <::outside(2)><::outside(1)><span/></::outside(1)></::outside(2)>


It would make more sense if (1) inherits from (2) imo.


- 12. Replaced content

What is the difference:

 EXAMPLE

   element{
    content:"string";
   }
   other-element{
    content:url(string.txt); /* the file contents are: "string" */
   }


It is quite strange that "content" sometimes replaces the element and 
_all_ its children and sometimes it does not. (I am aware this is in 
contradiction with me :replaced proposal, but I'm sure there are some 
good reasons for this, not?)

-- 
 Anne van Kesteren
 <http://annevankesteren.nl/>

Received on Thursday, 4 March 2004 13:36:10 UTC