Re: [css3-content] ::outside future

----- "Boris Zbarsky" <bzbarsky@MIT.EDU> wrote:

> On 6/8/10 8:28 AM, Paul Duffin wrote:
> > In terms of my use case I want to use it to create multiple borders
> around a single element without modifying the markup. e.g.
> 
> This may be better served by something like -moz-border-colors...
> 

I don't know that property so do not know whether it could achieve what I want.

You could of course add or extend the existing CSS properties to support the use case in a similar way to how the background properties were modified to support multiple backgrounds. However, it seems to me that ::outside would have been a far more elegant way of addressing the multiple background use case.

e.g. instead of having N background layers you could simply associated background with ::outside(1) - ::outside(N).

> 
> > As far as the cascade goes I cannot see what the problem is,
> assuming that cascade is as defined in
> http://www.w3.org/TR/CSS2/cascade.html#cascade. The ::outside pseudo
> element behaves like every other pseudo element and inherits from its
> superior parent.
> 
> Does it, though?

I think that it does as 
http://dev.w3.org/csswg/css3-content/#wrapping-elements-in-pseudo-elements-wit explicitly states in the section on ::outside that
"...pseudo-elements inherit from the elements (or pseudo-elements) that generate them..."

The example clearly shows that ::outside(1) inherits from the element. It does not show whether ::outside(2) inherits from ::outside(1) but that is implied by the above statement.

Received on Tuesday, 8 June 2010 14:17:13 UTC