css style isolation #6396
Replies: 3 comments 10 replies
-
|
We've heard this request multiple times recently. You can find a response here: #6032 and in this canny post . Have you tried |
Beta Was this translation helpful? Give feedback.
-
|
I have the same problem with https://react-day-picker.js.org and other projects where we use Docusaurus. The question is why is Docusaurus overriding the style of HTML elements? Or is it Infima? The CSS cascading issues have been solved since years, why aren't these practices being followed here? Is there anything we can do? Here is what i've tried so far: The "revert: all" workaroundThe trick with The "iframe" workaroundI've tried to use an https://react-day-picker.js.org/render?example=start As you can see it stills inherit style from tables: SandpackI could finally rely on Sandpack as it is a good way to isolate the components, as it recreates a new app without the Docusaurus's chrome. Yet it is slow, the viewport is constrained, requires extra work. I really hope for some inputs! Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
I just want to say that it melts my brain to read threads here from 2021 and 2022 about this obvious issue with style isolation in a library whose sole purpose is generating documentation and showcasing components in isolation. And expecting end users of such a library to simply write their own styles to cancel out the styles applied by the library is just ludicrous — clear proof that someone doesn’t understand the problem. Ignoring the fact that it’s a ridiculous amount of work to fix this obvious issue in a framework we are using. It will not work, because when we attempt it, we risk contaminating components with those cancellation styles ourselves — especially because Docusaurus uses some What Docusaurus should do is wrap dynamically styled content with some The fact that the community constantly complains about this and still hasn’t come up with a good solution should be a clear indication that this is a real issue for anyone considering Docusaurus. I don't even want to think about how many developer hours Docusaurus has wasted, because I’m sure a significant number of projects have had to deal with this issue and all of them spend time debugging it. The problem itself wasn’t the biggest concern - the attitude toward it and the lack of a proper solution are. This issue is exactly why I’ll avoid this framework next time. Writing a SPA application from scratch will take less time than dealing with this. |
Beta Was this translation helpful? Give feedback.





Uh oh!
There was an error while loading. Please reload this page.
-
docusaurus is a very useful tool, I love it, we are creating our own component library, the demo of the component library, and eventually rendering in docusaurus, but I found a problem, some of the global styles of docusaurus's own themes affect the React components in the demo. Is there any good advice or elegant way to solve this problem?
Beta Was this translation helpful? Give feedback.
All reactions