---
title: "Discussion on \"Using tailwindcss with web components and ShadowDOM in LitElement\" | Hashnode"
description: "Discussion on \"Using tailwindcss with web components and ShadowDOM in LitElement\". We recently wanted to use tailwindcss to help developers at one of our customers create maintainable\nand scalable styling. At the same time we were creating web components for a design system. This\nraises one big issue with tailwind since we were goi..."
url: "https://hashnode.com/posts/using-tailwindcss-with-web-components-and-shadowdom-in-litelement/6372143ca49f113eedbc36ad"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using tailwindcss with web components and ShadowDOM in LitElement](https://software-engineering-corner.zuehlke.com/using-tailwindcss-with-web-components-and-shadowdom-in-litelement?utm_source=hashnode&utm_medium=feed)

We recently wanted to use tailwindcss to help developers at one of our customers create maintainable and scalable styling. At the same time we were creating web components for a design system. This raises one big issue with tailwind since we were goi...

Nov 14, 2022 · 4 min read · software-engineering-corner.zuehlke.com  
Updated Dec 15, 2022  
Read the article

-   [#web-development](https://hashnode.com/tag/web-development)
-   [#web-components](https://hashnode.com/tag/web-components)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#tailwind-css](https://hashnode.com/tag/tailwind-css)

## Written by

[Patrick Walther](https://hashnode.com/@r3dDoX)

@r3dDoX · Switzerland

  
[View profile](https://hashnode.com/@r3dDoX)

Lead Software Architect @ DSI Engineering

I'm interested in all things web!

## Responses 1

Markdown supported · ⌘↵ to post

[Patrick Walther](https://hashnode.com/@r3dDoX)

[Mar 29, 2023](https://hashnode.com/posts/using-tailwindcss-with-web-components-and-shadowdom-in-litelement/6372143ca49f113eedbc36ad/comment/6424408e509c0c9e8981b0ca)

One optimisation we did in the meantime was to pull `unsafeCSS` out into a baseComponent so it is only ran once. In the solution above unsafeCSS will parse the CSS for every component, which is unnecessary.
