# ProseMirror with Shadow DOM: locating style-mod generated stylesheet

**URL:** <https://discuss.prosemirror.net/t/prosemirror-with-shadow-dom-locating-style-mod-generated-stylesheet/8538>\
**Category:** Uncategorized\
**Created:** [August 28, 2025, 7:30pm UTC](https://discuss.prosemirror.net/t/prosemirror-with-shadow-dom-locating-style-mod-generated-stylesheet/8538 "2025-08-28T19:30:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ammar](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/ammar/32/4638_2.png) [@Ammar](https://discuss.prosemirror.net/u/Ammar)\
**Post date:** [August 28, 2025, 7:30pm UTC](https://discuss.prosemirror.net/t/prosemirror-with-shadow-dom-locating-style-mod-generated-stylesheet/8538/1 "2025-08-28T19:30:49Z")

</div>

I’m working with **ProseMirror inside a Shadow DOM** , and I noticed that the styles are injected via **style-mod**.

When I inject a stylesheet using style-mod inside the shadow root, the styles are applied correctly. However, the stylesheet itself doesn’t show up in `shadowRoot.styleSheets` or `shadowRoot.adoptedStyleSheets`.

My question is: **where does style-mod keep the generated stylesheet when used inside a Shadow DOM?** Is there a way to access or identify that stylesheet (for debugging or modification)?

Has anyone else dealt with this while embedding ProseMirror in a Shadow DOM?

I realize this is technically a `style-mod` question, but since `style-mod` is by the same author as ProseMirror and is used internally by it, I thought this community might be the best place to ask.

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [August 29, 2025, 3:01pm UTC](https://discuss.prosemirror.net/t/prosemirror-with-shadow-dom-locating-style-mod-generated-stylesheet/8538/2 "2025-08-29T15:01:53Z")

</div>

> [@Ammar](#):
>
> I’m working with **ProseMirror inside a Shadow DOM** , and I noticed that the styles are injected via **style-mod**.

ProseMirror does not inject style sheets and does not depend on style-mod. So I’m going to assume you’re talking about CodeMirror here.

Please don’t ask the same question both on the forum and in the issue tracker. I’ve responded to [your issue](https://github.com/marijnh/style-mod/issues/15).
