Fork me on GitHub
#devcards
<
2022-05-18
>
Galaux06:05:32

Hey everyone. I'm starting to use Devcards and was wondering whether there was a way to have my components displayed in an iframe or something: I'd like my cards to be isolated from Devcard's CSS and be displayed in a setup that resembles a live system as much as possible compared to being enclosed in divs that hold their own CSS (Devcards CSS).

timothypratley17:05:05

FWIW I've found that using with-redefs is a useful way to mock global state behavior, and changing the index.html file to include or exclude CSS for styling.

rarous12:01:30

You can also use ShadowRoot for styles encapsulation.

Galaux06:05:34

I saw this (closed) PR that would look like what I'd want so … I guess I have my answer as to "is there a way to … ?" https://github.com/bhauman/devcards/pull/131

Galaux06:05:52

Oh and BTW, yes I saw that one can override and even completely remove DevCards' CSS, this is what I'm doing at the moment but – apart from the fact that the whole DevCard page doesn't look good with no style – my components are still rendered in a bunch of <div >s that mess up some of my components (components that are pages actually).

Galaux07:05:26

I hope I'm not giving a wrong idea about Devcards here 😳 : the project rocks, kudos to bhauman 🎩