portabletext/react-portabletext

Issues using with Nextjs and tailwind

hawlinbuttzbbq opened this issue · 1 comments

I am using Sanity.io in my Nextjs project. My nextjs app uses Tailwind. The issue is that on my frontend where users can see my site the styling is not matching what is shown in Sanity.io backend. Some examples would be that my bullet list and number list are missing the dots or the numbers as well as the indent. If I go to my global.css and remove @tailwind base; then everything shows correctly on the frontend as it show on Sanity.io backend. It's like Tailwind has conflicts with PortableText.

Again the formatting that is presented on Sanity backend does not show the same while using the default settings Nextjs with Tailwind. However if I remove the following from the default global.css @tailwind base; everything present on Nextjs frontend the way it should The only problem is that I need Tailwind

By default lists and such are unstyled in Tailwind - you can learn more about it here: https://tailwindcss.com/docs/preflight#lists-are-unstyled

Tailwind does have some utility classes to add ordered, unordered, numbered lists etc.: https://tailwindcss.com/docs/list-style-type