Re: CSS Transitions



Owen Taylor <otaylor redhat com> wrote:
I think you can quickly get into prohibitively heavy complexity here,
which is why, presumably, that CSS doesn't try to to have the idea of
start and end states.

Indeed.

If I was handling this on the web, I'd probably do something like,
in setup:

  $(button).transitionEnd(
       function() {
           $(this).removeClass('pressing');
       });

When pressed:

 $(button).addClass('pressed').addClass('pressing');

In CSS:

 .button.pressed { background: red; }
 .button.pressing { transition: background 1s; }

I think we possibly should do something similar here. We could do
something like:

 gtk_style_context_add_temporary_class(button,
GTK_STYLE_CLASS_PRESSING);

With the semantics of "temporary" meaning "removed when last transition
finishes". I don't think you'd need many of these style classes to allow
most of what the designers want.

If you want to get an idea of how many transitions there might be, I'd
be happy to write up what I'd like to happen in terms of behaviour.

Allan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]