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

Re: ::inline Pseudo-Element

From: David Hyatt <hyatt@apple.com>
Date: Sun, 15 Jan 2006 18:38:29 -0800
Message-Id: <EF7FE110-B13C-489A-8F34-9F1C76B04334@apple.com>
Cc: Ben Ward <benmward@gmail.com>, www-style@w3.org
To: Kelly Miller <lightsolphoenix@gmail.com>

I don't like the idea of using pseudo-elements to represent multiple  
backgrounds, as it would make cascading very difficult (e.g., how do  
you just blow away all the multiple backgrounds to replace with your  
own in a more specific rule).  I also think that it is syntactically  
more verbose and more complex than a simple comma-separated list of  

Multiple backgrounds have been fully implemented in Safari 1.3 and  
2.0, and the feedback on the syntax from those who have played around  
with it has been very positive so far.


On Jan 16, 2006, at 7:40 PM, Kelly Miller wrote:

> The content property is restrictive.  Going back to the email I  
> sent in about using a pseudo-element to represent mulitple  
> backgrounds (to simplify the background property) [http:// 
> lists.w3.org/Archives/Public/www-style/2006Jan/0022.html], if it  
> were then possible to attach a z-index value to the background  
> pseudo-element, it would be possible to have mutliple foreground  
> images as well as multiple background images.  Content, on the  
> other hand, is useful for image replacement, but not for when you  
> want an image to overlay text (which does happen).
> Ben Ward wrote:
>> Hi Daniel,
>> This particular use-case is actually solvable in two other ways that
>> doesn't require this new element.
>>> <h1 class="abc"><span>This will be replaced with an image</span></ 
>>> h1>
>>> h1.abc > span { display: none; }
>>> h1.abc { background-image: ...; }
>> Instead, in existing CSS implementations you hide content with a
>> negative text-indent:
>> e.g.
>>  h1.abc { text-indent: -400em; }
>> That is understandably rather hacky, but in CSS3 the content property
>> is extended to apply to all elements, not just ::before and ::after.
>> As such, you can elegantly replace (remove) inner content.
>> e.g.
>>  h1.abc { content: ""; }
>> ::inner does make sense to me in a lot of ways, but I honestly can't
>> think of a use case that isn't covered acceptably by other parts of
>> CSS (not that I've been thinking very hard).
>> Regards,
>> Ben
> -- 
> http://www.mozilla.org/products/firefox/ - Get Firefox!
> http://www.mozilla.org/products/thunderbird/ - Reclaim Your Inbox!
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
Received on Monday, 16 January 2006 02:38:40 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:22 UTC