W3C home > Mailing lists > Public > www-style@w3.org > May 2012

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

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 2 May 2012 12:51:36 -0400
To: www-style@w3.org
Message-ID: <20120502165136.GA8111@crum.dbaron.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:53 GMT