Friday, April 24, 2015

Re: GSS mixin restricted ?

@Julien: thanks for the quick answer.
Stupid of mine not to think about your approach, so simple ;)

Anyway: I tried it, but the GWT/GSS compiler doesn't seem to like the @if conditions inside the @defmixin {}. I get an error :(
My tryout code:

@defmixin slideInToRight() {
@if is("browser.engine",  "webkit") {
-webkit-transform: translate(-40%, 0);
-webkit-transition: transform 1s, opacity 2s;
}
}

.Content {
@mixin slideInToRight();
}

When I remove the inside @if, it works however. But with the inside @if (like above) I do get the following exception:
What to do ? ;) (BTW: I use GWT 2.7.0, sorry, can't try it on the trunc at the moment)

----------------------
00:07:29,829 [ERROR] Generator 'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator' threw an exception while rebinding 'com.bla.loginflow.resources.LoginFlowResources'
java.lang.IllegalStateException: null at com.google.gwt.thirdparty.guava.common.base.Preconditions.checkState(Preconditions.java:161) at com.google.gwt.thirdparty.common.css.compiler.passes.CreateConditionalNodes.createConditionalRuleNode(CreateConditionalNodes.java:122) at com.google.gwt.thirdparty.common.css.compiler.passes.CreateConditionalNodes.leaveUnknownAtRule(CreateConditionalNodes.java:93) at com.google.gwt.thirdparty.common.css.compiler.ast.DefaultVisitController$VisitUnknownAtRuleState.doVisit(DefaultVisitController.java:1774) at com.google.gwt.thirdparty.common.css.compiler.ast.DefaultVisitController.startVisit(DefaultVisitController.java:1995) at com.google.gwt.thirdparty.common.css.compiler.passes.CreateConditionalNodes.runPass(CreateConditionalNodes.java:184) at com.google.gwt.resources.rg.GssResourceGenerator.finalizeTree(GssResourceGenerator.java:596) at com.google.gwt.resources.rg.GssResourceGenerator.parseResources(GssResourceGenerator.java:770) at com.google.gwt.resources.rg.GssResourceGenerator.prepare(GssResourceGenerator.java:479) at com.google.gwt.resources.rg.CssResourceGenerator.prepare(CssResourceGenerator.java:527) at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1013) at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:1039) at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.generateIncrementally(AbstractClientBundleGenerator.java:419) at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:754) at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:160) at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79) at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276) at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:152) at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:613) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:483) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) at com.google.gwt.core.shared.GWT.createImpl(GWT.java:83) at com.google.gwt.core.client.GWT.create(GWT.java:86)
----------------------



--
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+unsubscribe@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.

No comments:

Post a Comment