我试图设计一种聚合物成分。
我有一个带有以下样式的html页面:
<head>
<style is="custom-style">
paper-input {
--paper-input-container-focus-color: red;
}
</style>
</head>
一旦meteor渲染页面,样式标记为空,通常情况下。我已经看过几次输入按预期设置的样式。我使用最新的流星铁:路由器和聚合物1.0.6。任何帮助表示赞赏,或者是否有另一种方法来设计组件..
Router.configure({ layoutTemplate:'main' });
路由器
Router.route('/',function() {
this.layout('unauthenticated')
this.render('signin');
});
布局
<template name="unauthenticated">
<body class="verticle layout">
<div class="page">
{{> yield}}
</div>
</body>
</template>
模板
<template name="signin">
<hgroup>
<h1>Sign In</h1>
<h3>Sign in with your Account</h3>
</hgroup>
<paper-material elevation="1">
<form>
<paper-input type="email" label="Email"></paper-input>
<paper-input type="password" label="Password"></paper-input>
</form>
</paper-material>
</template>
进口
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="/components/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="/components/paper-header-panel/paper-header-panel.html">
<link rel="import" href="/components/paper-toolbar/paper-toolbar.html">
<link rel="import" href="/components/paper-material/paper-material.html">
<link rel="import" href="/components/paper-input/paper-input.html">
</head>