Closed condorheroblog closed 3 months ago
@condorheroblog oke, I got it, I will refactor and add a prefix to the class.
Which one do you like, CSS in JS or BEM😁
Which one do you like, CSS in JS or BEM😁
ah. Im still use tailwindcss. but I add prefix class
I updated and added the prefix class,
Sorry, my problem is still not solved.
The reason is that tailwind.css
will package a preset style - https://tailwindcss.com/docs/preflight#disabling-preflight, and the CSS in it is global.
I think reactjs-tiptap-editor
, as a plugin, has no reason to change the user's global CSS style.
Also, the style names of tailwind.css
are very simple, which is very likely to conflict with the user's type. It would be fine if all styles can have a prefix classname.
@condorheroblog oke, let me try, yesterday I tried disabling preflight, and UI is like the 90s =)) I think because I do not add a prefix to the class yet
@condorheroblog you can try install a new version, I hope it works as well
oh. =))) look this xD
It looks weird, maybe we need to use https://www.radix-ui.com/themes/docs/components/button to replace the native button
shadcn is using the native button. btw can you screenshot editor on your project, I want to see it look how maybe I will add a props resets CSS to load the reset CSS file or not, because the editor needs to reset CSS to it display with style from editor instead of use the global CSS of app
It looks like that.
@condorheroblog yea, the same, https://reactjs-tiptap-editor-playground.vercel.app/
It looks like that.
I update the style. you can install the latest version.
You Rock, Thanks👍
You Rock, Thanks👍
Looks great! I hope it works just as well.
I'm very sorry, I'll leave a message again.
I use antd in my project, some buttons are so weird.
I saw some global CSS
Developing a component library using tailwind.css
is a real headache problem. I like BEM 😂
@condorheroblog I removed css global. you can check again now
When I introduced the editor's style, my application had a little style confusion.
I checked the content of
reactjs-tiptap-editor/style.css
and found that it was affected by the preset style oftailwind.css
. Here I want to extract a problem. The style of tailwind.css has too large an impact.Maybe we should use CSS in JS solutions or manually manage class names, such as https://github.com/xyflow/xyflow/blob/9b768b2dae9f046c4c10772b267ad3116c3333a5/packages/react/package.json#L45