-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply custom styling through MUI theme definition #205
Comments
This is an interesting idea. The motivation definitely makes sense. I haven't used this type of functionality much within MUI but seems like it could be useful to support with mui-tiptap. I don't have time at the moment to dig into this myself, but if it's straightforward to add, open to suggestions around implementation and/or PRs later. |
Hi, can you btw suggest, hot to do it? In my application mui-tiptap does not use mui theme styles, how did you do it? |
(For my reference later) This seems relevant to the request here https://mui.com/material-ui/customization/creating-themed-components/. I haven't used this before, and seems it may require some fairly significant refactoring compared to the existing usage of tss-react for styles within mui-tiptap now, but maybe the right approach if we want this theme-based customizability of individual components to be possible. |
Side note that with MUI v6, when using themed components, we should probably try to avoid patterns that are not compatible with pigment CSS, like https://mui.com/material-ui/migration/migrating-to-pigment-css/#migrating-custom-theme |
Is your feature request related to a problem? Please describe.
I am not sure whether there's just documentation missing or this isn't possible yet, but I was unable to figure out how to do it.
Describe the solution you'd like
In my project I have defined a theme for MUI stylings, and the TipTap is properly using them. However, in my case, I need to be able to override styles for particular components, only when they're used inside TipTap. For example, here's how I can style a button from a theme definition file:
In a similar fashion, I'd like to be able to select the tiptap root and then apply relative styling for classes that are inside it, maybe something like this:
I understand I can wrap the editor in a box and then put styling in there and select classes I need to change, but it would be much better to be able to select the editors components from the theme. Thank you!
The text was updated successfully, but these errors were encountered: