Using Bootjack CSS in child Polymer elements

96 Views Asked by At

I started using Bootjack, but I cant use the classes in my Polymer elements if I have imported the CSS file in my index.html. It does work if I import the CSS in each component (which prints an warning that I use the CSS file multiple times). Is there a way I could use the CSS file from my index.html?

1

There are 1 best solutions below

4
On BEST ANSWER

You can configure the Polymer transformer to not inline the CSS files then the warnings go away.

Example from another question:

transformers:
- polymer:
    inline_stylesheets:
      lib/bootstrap/css/bootstrap.min.css: false
      lib/css/op.css: false
      lib/font-awesome-4.2.0/css/font-awesome.min.css: false

As far as I know bootjack doesn't provide shadow DOM support therefore there is no other way than referencing the file in every element (might still not work in some cases).