2017-10-19 9 views
1

ポリマープロジェクトを2.0バージョンにアップグレードしました。その後、divからいくつかのCSSクラスが欠落しています。Polymer 2.0のカスタムスタイルプロパティがdom-moduleで動作しない

<link rel="import" href="bower_components/iron-flex-layout/iron-flex-layout.html"> 

そして私-home.htmlでページには、次のようないくつかのスタイルを持っている私-home.htmlから鉄フレックスlayout.htmlへのリンクがあり

<dom-module id="my-home"> 
<template> 
<style is="custom-style"> 
.flex-vertical { 
    @apply --layout-vertical; 
    height: 100vh; 
} 

.flexchild-vertical { 
    @apply --layout-flex; 
    @apply --layout-horizontal; 
} 
</style> 
</template> 
</dom-module> 

これらのスタイルは鉄フレックスlayout.htmlから呼び出している

--layout-vertical 
--layout-flex 
--layout-horizontal 

しかし、出力にロードされません。

旧バージョン:

enter image description here

アップグレード版:

enter image description here

私は、問題は、そのことがあるかもしれないと思うここに私のブラウザからのスクリーンショットです#shadow-rootが生成されます。

私のコードでスタイルリンク/ htmlリンクなどを変更できますか?

答えて

0

はい!ここからの回答を得ました:https://www.polymer-project.org/2.0/docs/upgrade#class-based-elements-import-the-css-mixin-shim

iron-flex-layoutのバージョンの問題です。私はちょうどそれを更新し、すべてが今は大丈夫です。 https://github.com/PolymerElements/iron-flex-layout

最新バージョン(2.0)ここで<custom-style>オブジェクトの折り返し全体iron-flex-layout.html

内部のスタイルは最新バージョンである必要があり

関連する問題