Re: [css3-values] use cases and the design of 'cycle()'

On Wednesday 2012-04-25 08:44 -0700, L. David Baron wrote:
> On Tuesday 2012-04-10 02:11 +0800, Kang-Hao (Kenny) Lu wrote:
> > While reviewing CSS3 V&U, I realized that 'cycle()' doesn't really solve
> > a use case I thought it would solve.
> > 
> > Use Case A: In a User Interface built by nesting elements (say,
> > <table>), set background color on the elements alternatively along the
> > nesting level. See picture[1]
> 
> Yes, it doesn't solve this case alone.  (I've also never seen any
> other examples of this case.)
> 
> It does solve this case in combination with variables, though, and
> I think that's a better solution than making cycle() more complex.
> 
> For example:
> 
>   table {
>     var-cycling-background: cycle(white, gray);
>     background: var(cycling-background);
>   }

Actually, I don't think this works, because the thing that's
inherited with variables is syntactic rather than semantic so the
cycle() behavior wouldn't get applied until it's used.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Wednesday, 2 May 2012 16:52:06 UTC