Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GWT2.5中的嵌套CSS_Css_Gwt - Fatal编程技术网

GWT2.5中的嵌套CSS

GWT2.5中的嵌套CSS,css,gwt,Css,Gwt,让我们从这句话开始,这是我7年来构建的第一个UI。我对它们什么都不记得了,那时候我对它们也不在行。我是一个中间件的家伙,所以我正在用这些东西重新学习一切 我正试图在GWT2.5中构建一个cssresource包。我的UX家伙给了我这个css @CHARSET "ISO-8859-1"; * { box-sizing: border-box; } html, body { min-height: 100%; } a { text-decoration: none; } .mainhead

让我们从这句话开始,这是我7年来构建的第一个UI。我对它们什么都不记得了,那时候我对它们也不在行。我是一个中间件的家伙,所以我正在用这些东西重新学习一切

我正试图在GWT2.5中构建一个cssresource包。我的UX家伙给了我这个css

@CHARSET "ISO-8859-1";

* {
  box-sizing: border-box;
}

html, body { min-height: 100%; }
a { text-decoration: none; }

.mainheader {
  background: linear-gradient(#3F94BF, #246485);
  padding: 5px;
  text-align: center;
  color: white;
  text-shadow: #222 0px -1px 1px;
  position: fixed;
  width: 100%;
  left: 0;
  transition: all 0.3s ease;
  a {
    position: absolute;
    left: 20px;
    top: 20px;
    color: white;
    font-size: 32px;
  }
}

.pagewrap {
  float: right;
  width: 100%;
  transition: width 0.3s ease;
}

.mainnav {
  position: fixed;
  top: 0;
  width: 0;
  height: 100%;
  background: #3B3B3B;
  overflow: hidden;
  transition: width 0.3s ease;
  a {
    display: block;
    background: linear-gradient(#3E3E3E, #383838);
    border-top: 1px solid #484848;
    border-bottom: 1px solid #2E2E2E;
    color: white;
    padding: 15px;
    &:hover, &:focus {
      background: linear-gradient(#484848, #383838);
    }
  }
  &:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 34px;
    background: linear-gradient(left, rgba(black, 0), rgba(black, 0.4));
  }
}

.content {
  padding: 100px 20px 20px 20px;
}

.closemenu {
  display: none;
}

#mainnav:target {
  width: 20%;
}
#mainnav:target + .pagewrap {
  width: 80%;
  .open-menu {
     display: none; 
  }
  .closemenu {
     display: block;
  }
  .mainheader {
    width: 80%;
    left: 20%;
  }
}
现在当我把它放进去时,我得到了以下错误:

    [DEBUG] [myapp] - Rebinding nope.gwt.client.resources.ITRResources
    [DEBUG] [myapp] - Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
        [DEBUG] [myapp] - Preparing method css
            [INFO] [myapp] - The following problems were detected
                [WARN] [myapp] - Line 20 column 4: encountered "{". Was expecting one of: ":" 
                [WARN] [myapp] - Line 43 column 4: encountered "{". Was expecting one of: ":" 
                [WARN] [myapp] - Line 49 column 19: encountered "&". Was expecting one of: "}" ";" <IDENT> 
                [WARN] [myapp] - Line 77 column 14: encountered ".". Was expecting one of: "}" ";" <IDENT> 
[DEBUG] [myapp] - Rebinding nope.gwt.client.uibinder.SearchPanel.SearchPanelUiBinder
    [DEBUG] [myapp] - Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
        [ERROR] [myapp] - The content of elements must consist of well-formed character data or markup.
        [ERROR] [myapp] - Error parsing XML (line 35): The content of elements must consist of well-formed character data or markup.
[ERROR] [myapp] - Deferred binding failed for 'nope.gwt.client.uibinder.SearchPanel.SearchPanelUiBinder'; expect subsequent failures
[DEBUG] [myapp] - Rebinding com.google.gwt.dom.client.DOMImpl
    [WARN] [myapp] - For the following type(s), generated source was never committed (did you forget to call commit()?)
        [WARN] [myapp] - nope.gwt.client.uibinder.SearchPanel_SearchPanelUiBinderImpl
[ERROR] [myapp] - Unable to load module entry point class nope.gwt.client.myapp (see associated exception for details)
[ERROR] [myapp] - Failed to load module 'myapp' from user agent 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36' at 127.0.0.1:50211
还有我的客户包

public interface ITRResources extends ClientBundle {
    public static final ITRResources INSTANCE = GWT.create(ITRResources.class);

    @Source("itr.css")
    public ITRcss css();

    // @Source("config.xml")
    // public TextResource initialConfiguration();
    //
    // @Source("manual.pdf")
    // public DataResource ownersManual();
}

问问你的“UX家伙”,但这不是CSS(可能是SASS或更少或类似的东西),你是对的。这是无礼的行为。他给了我equiv css,我能够想出如何运行interface generator并让它构建框架。谢谢
public interface ITRResources extends ClientBundle {
    public static final ITRResources INSTANCE = GWT.create(ITRResources.class);

    @Source("itr.css")
    public ITRcss css();

    // @Source("config.xml")
    // public TextResource initialConfiguration();
    //
    // @Source("manual.pdf")
    // public DataResource ownersManual();
}