GSS migration: mixin definition for a transition with multiple transition-property

2015-04-20 Thread Benjamin V.
Hello,

I am currently migrating a GWT project to use new GSS features. But I am 
struggling in finding a mixin definition for a transition with multiple 
transition property.

Old CSS code before GWT 2.7 was:

.class {
  transition: literal(opacity .5s linear 0s, visibility 0s linear .5s);
  -webkit-transition: literal(opacity .5s linear 0s, visibility 0s linear 
.5s);
}

Now I want to use a mixin for that:

@defmixin transitions(TRANSITIONS) {
  -webkit-transition: TRANSITIONS;
  -moz-transition: TRANSITIONS;
  transition: TRANSITIONS;
}

.class {
  @mixin transitions(opacity .5s linear 0s, visibility 0s linear .5s);
}

Not surprisingly the code cannot be compiled. The error message is The 
number of arguments of the mixin and the corresponding definition are 
different. I tried to escape the comma with an unicode sequence but with 
no success.

So how I can perform a successful migration of the old code?




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GSS migration: mixin definition for a transition with multiple transition-property

2015-04-20 Thread Benjamin V.
Yes, that works. But it is a bit unintuitive as I have multiple different 
transitions properties in one stylesheet. So I have to define multiple 
similiar property variables which are all only used once.


Am Montag, 20. April 2015 15:55:22 UTC+2 schrieb Jens:

 Does it work if you create a constant for the properties? E.g.:

 @def MY_TRANSITION_PROPERTIES opacity .5s linear 0s, visibility 0s linear 
 .5s;

 .class {
   @mixin transitions(MY_TRANSITION_PROPERTIES);
 }



 -- J.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.