2017-07-08 7 views
0

ポリマー2.0(https://www.polymer-project.org/2.0/docs/devguide/style-shadow-dom#style-modules)のスタイルモジュールを使用しています。ポリマー2.0スタイルモジュールの共有スタイルがウェブページにCSSソースを印刷します

スタイルが機能しています。しかし、クロムでは、cssのコンテンツはウェブページにぎこちないように見える。 Firefoxで完全に動作します。 Chromeでこれを修正するにはどうすればよいですか?前もって感謝します。ここで

は私が持っているものです。

LBW-CSS-styles.html

<dom-module id="lbw-css-styles"> 
    <template> 
    <style> 
    :root { 
    background-color:green; 
... 
    </style> 
    </template> 
</dom-module> 

ページ-test.htmlという

<link rel="import" href="bower_components/polymer/polymer.html"> 
<link rel="import" href="bower_components/polymer/polymer-element.html"> 
<link rel="import" href="lbw-css-styles.html"> 

<dom-module id="page-test"> 
    <template> 
    <style include="lbw-css-styles"> 
... 
    </style> 
    </template> 

    <script> 
    Polymer({ 
     is: 'page-test', 
    </script> 
</dom-module> 

答えて

0

はそれを考え出しました。私のCSSは、 ":root"セレクタを参照しましたが、ポリマー2.0では廃止されました。推奨されないセレクターを削除すると、問題が解決されます。

関連する問題