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

Re: ::inline Pseudo-Element

From: Ben Ward <benmward@gmail.com>
Date: Sun, 15 Jan 2006 13:59:02 +0000
Message-ID: <ef5d0f2f0601150559u515cb0a2t95e7c95dc97a13c2@mail.gmail.com>
To: www-style@w3.org
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:
  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.
  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).

Received on Sunday, 15 January 2006 13:59:06 UTC

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