4

I'm developing a web application that uses HTML 5 native web components. My problem is that I have a lot of common CSS for all of these and I use font awesome to have nice icons. Right now I put all my styles inside "/deep" shadow piercing but Chrome says : "/deep/ combinator is deprecated." Do you have any suggestions on how can I have global CSS and CSS libraries (like font awesome) available on the whole app ?

Thanks :)

Supersharp
  • 26,125
  • 8
  • 76
  • 119
Nicolas Garin
  • 213
  • 3
  • 11

1 Answers1

5

You could include the CSS font file globally, with the <link rel="stylesheet"> element.

That you'll have to import it locally in every Custom Element's <template>, in a <style> element, using the @import url CSS rule.

There's a running example in this answer.

Community
  • 1
  • 1
Supersharp
  • 26,125
  • 8
  • 76
  • 119
  • Thank you for your response, I think indeed that this is the cleaner solution. I didn't wanted to do it because I need to include it in all my components. – Nicolas Garin Jul 22 '16 at 13:02