Closed artemchs closed 2 weeks ago
The reason for this is that Mantine Tiptap doesn't come with default styles for lists and tables. As a result, the list bullets and numbers, for instance, follow the browser's default styling.
The tw_base
style we imported has removed all of the browser's default styles, allowing for easier customization and a more consistent appearance across different browsers. Because of this, you won't see any styling for these undefined elements.
To address this, I recommend defining these styles yourself in globals.css:
// globals.css
ul {
list-style: disc;
}
ol {
list-style: decimal;
}
// ...
Or try just remove tw_base to see if it's working:
@layer mantine, tw_components, tw_utilities;
/* import tailwind */
@import "tailwindcss/components" layer(tw_components);
@import "tailwindcss/utilities" layer(tw_utilities);
/* import mantine */
@import "@mantine/core/styles.layer.css";
@import "@mantine/tiptap/styles.layer.css"; // note that you should import the layer one
Alternatively, a more practical solution might be to request that Mantine provide these styles so that others could also benefit from this.
Thanks!
Minimal reproduction: https://github.com/artemchs/next-app-mantine-tailwind-template
Description
When using the Mantine TipTap rich text editor (installed according to the official documentation at https://mantine.dev/x/tiptap/), there are rendering issues with lists and tables when Tailwind and tailwind-preset-mantine are present in the project. These elements render correctly when Mantine is used standalone without Tailwind.
Current Behavior
Expected Behavior
Steps to Reproduce
Technical Details
Possible Cause
The issue appears to be related to style conflicts between Tailwind's CSS and Mantine's TipTap styles. When Tailwind is removed, the components render correctly, indicating a CSS specificity or override issue.
Additional Notes
This issue specifically affects the visual rendering of elements and does not impact the functional behavior of the editor. The HTML structure is correct, but the styles are not being applied as expected.