::inline Pseudo-Element

OK, I've found a better use-case for an ::inside pseudo-element.

When doing image-replacement in (X)HTML on, for example, headings, you 
often need to, either manually or through a script, wrap <span/> tags 
around the text inside the <hx/> elements.

 <h1 class="abc"><span>This will be replaced with an image</span></h1>

 h1.abc > span { display: none; }
 h1.abc { background-image: ...; }

If ::inside was implemented, that wouldn't be neccesary

 <h1 class="abc">This will be replaced with an image</h1>

 h1.abc::inside { display: none; }
 h1.abc { background-image: ...; }

Since the ::inside pseudo-element would take the place of <span/>

 <element>
   <element::inside>
     <child/>
     <child/>
     <child/>
   </element::inside>
 </element>


Cheers,
Daniel Schierbeck

Received on Sunday, 15 January 2006 13:46:26 UTC