user3240644
user3240644

Reputation: 2281

Polymer 2 css mixins not taking effect

It seems that my css mixins are not being applied as shown in this plunker . May I know why color: green is not being applied? Thanks.

Upvotes: 0

Views: 150

Answers (1)

Ofisora
Ofisora

Reputation: 2737

You will need to import CSS mixins polyfill if you are using CSS mixins.

<!-- import CSS mixins polyfill -->
<link rel="import" href="/bower_components/shadycss/apply-shim.html">

Source: Click here.

Also, you are using custom-style which you haven't imported. Importing that is needed since you are not importing polymer.html as well in that file.

<link rel="import" href="/bower_components/polymer/lib/elements/custom-style.html">

custom-style is not included with Polymer.Element and must be imported separately. custom-style is included with the legacy polymer.html import.

Working plunker.

Upvotes: 1

Related Questions