-
I've am building a react widget that external websites can add by adding it via the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's a common practice to use iframe when you want to inject a widget in another website. Almost every site does this about embedding (Youtube, Facebook, Twitter, etc) Apart from daisyUI, Tailwind CSS has some global reset styles called Let me know if you have a question. |
Beta Was this translation helpful? Give feedback.
It's a common practice to use iframe when you want to inject a widget in another website. Almost every site does this about embedding (Youtube, Facebook, Twitter, etc)
Because usually you wouldn't want the host website ti manipulate the content or style of your widget in anyway.
But if you don't want to use iframe, there are other solutions like adding a prefix to class names, scoping and mangling styles, or using PostCSS plugins for other style manipulations.
About the base styles, daisyUI has a
themeRoot
config where you can set a specific CSS selector instead of document root.Apart from daisyUI, Tailwind CSS has some global reset styles called
preflight
. Don't disable it, but you can …