<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pete Carapetyan</title>
    <description>The latest articles on DEV Community by Pete Carapetyan (@petecarapetyan).</description>
    <link>https://dev.to/petecarapetyan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F184455%2Fca5dac0c-5740-44f7-8d6c-e2a0b914a51a.jpeg</url>
      <title>DEV Community: Pete Carapetyan</title>
      <link>https://dev.to/petecarapetyan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/petecarapetyan"/>
    <language>en</language>
    <item>
      <title>Consuming a separate stylesheet with Lit &amp; TS</title>
      <dc:creator>Pete Carapetyan</dc:creator>
      <pubDate>Sun, 19 Apr 2020 11:18:45 +0000</pubDate>
      <link>https://dev.to/petecarapetyan/consuming-a-separate-stylesheet-with-lit-ts-1g10</link>
      <guid>https://dev.to/petecarapetyan/consuming-a-separate-stylesheet-with-lit-ts-1g10</guid>
      <description>&lt;h1&gt;
  
  
  Sometimes, you let an outsider in:
&lt;/h1&gt;

&lt;p&gt;If the metaphor for LitElement coding practices was a club, then it would be a &lt;em&gt;very exclusive&lt;/em&gt; club. Typescript, Web Component and browser standards, even commonly accepted libraries and coding practices are all pretty tightly adhered to by this club - if one thinks in that metaphor.&lt;/p&gt;

&lt;p&gt;What you don't do is just bring in jquery or jsx or a bunch of legacy cowboy-coder stuff into a Web Component - at least by the ethic referenced above. &lt;/p&gt;

&lt;p&gt;So it's a &lt;strong&gt;bit of a shock&lt;/strong&gt; to think about bringing an external stylesheet into your otherwise locked down, and compact, typescript coded Web Component.&lt;/p&gt;

&lt;h2&gt;
  
  
  It's still more important to know when not to do this:
&lt;/h2&gt;

&lt;p&gt;If you're using Lit and TS you're already not a cowboy coder - you would have never walked through that wall of fire in the first place.&lt;/p&gt;

&lt;p&gt;So this article assumes you've thought about the many reasons not to bring in an external CSS file into your Web Component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nofg3fsW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/neamjxg5iwhj6sqp5gcs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nofg3fsW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/neamjxg5iwhj6sqp5gcs.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Benny Powers makes it possible:
&lt;/h2&gt;

&lt;p&gt;Credits in the project itself - but if you want to combine Lit and TS and your own external CSS file in a Web Component you might find &lt;a href="https://github.com/petecarapetyan/lit-css-ts-MVP"&gt;this project&lt;/a&gt; helpful.&lt;/p&gt;

&lt;p&gt;Photo by fran hogan on Unsplash&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>lit</category>
      <category>css</category>
      <category>rollup</category>
    </item>
  </channel>
</rss>
