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

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

From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
Date: Thu, 26 Apr 2012 00:10:18 +0800
Message-ID: <4F9821EA.6060508@csail.mit.edu>
To: "L. David Baron" <dbaron@dbaron.org>
CC: WWW Style <www-style@w3.org>
(12/04/25 23:44), 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.)

I agree that this case isn't common, but still, in my situation I never
need B and C.

> 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);
>   }

This seems like an interesting solution. I don't have objection to keep
the current definition as it it, but I want to mention that after I
realized that 'cycle()' doesn't work with my case I asked about "how do
I do this in CSS?" in a channel of mostly Web developers, a guy did say
"in the future, you can use cycle()".

I guess this is learnable but who knows.

Received on Wednesday, 25 April 2012 16:10:51 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:13 UTC