Re: [css3-content] "content" property, replaced elements, and width

On Mon, May 10, 2010 at 8:02 AM, Daniel Glazman
<daniel.glazman@disruptive-innovations.com> wrote:
> Le 09/05/10 19:04, Tab Atkins Jr. a écrit :
>
>> p { content: url(image); }
>> p::before { content: "foo"; }
>>
>> I presume it should fall under the same "undefined" banner that
>> setting img::before does, correct?
>
> Sigh.
> Imagine a CMS where the following styles are enforced by the system:
>
>  img.companyLogo {
>    content: url(logo.png);
>  }
>
>  img:not(.validatedByComDpt).companyLogo::before {
>    background-color: red;
>    color: black;
>    font-weight: bold;
>    content: "VALIDATION REQUIRED";
>  }

I understand the use-case, but that doesn't say anything about the
problem.  ::before is a child of the element it's specified on.
Replaced elements officially have no children that CSS can know about.

What you want is ::outside::before. ^_^

~TJ

Received on Monday, 10 May 2010 15:48:36 UTC