You need to convert the external stylesheet into a style module, and include that inside your component. Regular stylesheet imports end up at the root level of the page, and won’t affect elements inside shadow roots, including Polymer elements.
https://www.polymer-project.org/1.0/docs/devguide/styling#style-modules That’s for Polymer 1.x, but it’s the same for 2.x as well. HTH, Jouni keskiviikko 7. kesäkuuta 2017 10.52.30 UTC+3 [email protected] kirjoitti: > > Hi, > > I try to use Stimulsoft Reports.JS ( > https://www.stimulsoft.com/en/products/reports-js) as a web component. > > I succeeded to import external JavaScript to use their functions in my > component. > > However I do not understand how can I import their css files. It works > easily with an > <link href="css/stimulsoft.viewer.office2013.whiteblue.css" rel= > "stylesheet"> > for a basic html file. But it doesn't work for a web component in Polymer. > > I do not have any error, the file is recovered by Polymer but it's like > the code inside is not used... > > The css is minified and it's in a file, I do not want to modify it. I just > want to import it and apply it on my component. How can I do this with > Polymer ? > > Thanks in advance. > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/6ea99a6c-32fe-4e88-b11a-5dd48909dcde%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
