W3C home > Mailing lists > Public > www-style@w3.org > January 2006

::inline Pseudo-Element

From: Daniel Schierbeck <daniel.schierbeck@gmail.com>
Date: Sun, 15 Jan 2006 14:46:12 +0100
Message-ID: <43CA5224.1020309@gmail.com>
To: www-style@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:42 GMT