N
Nuxt3mo ago
Fedox

Whitespaces being removed

Heya, this is my Paragraph tag:
<p class="note-content text-lg max-w-prose text-left">

long text


with


some

spacings
</p>
<p class="note-content text-lg max-w-prose text-left">

long text


with


some

spacings
</p>
And here is the note-content class:
@utility note-content {
font-family: 'Playfair', serif !important;
font-weight: 400;
white-space: pre-wrap !important;
}
@utility note-content {
font-family: 'Playfair', serif !important;
font-weight: 400;
white-space: pre-wrap !important;
}
And the whitespaces are being removed, someone has a idea why?
3 Replies
kapa.ai
kapa.ai3mo ago
Hi @Fedox. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but the knowledge sources do not contain explicit information about why whitespaces might be removed from a paragraph tag in Nuxt, even when using the CSS property white-space: pre-wrap. There is no mention of Nuxt or Nuxt UI altering whitespace handling in rendered HTML, nor any known issues with prose or typography components in Nuxt UI Pro or Nuxt Content that would strip whitespace in this way. However, the sources do discuss how Nuxt UI Pro and Nuxt Content provide pre-styled prose components for consistent typography, but they do not mention any modifications to whitespace handling in paragraph tags or custom classes like note-content Nuxt UI Pro Typography Prose Components in Nuxt Content. If you are using Nuxt Content or Nuxt UI Pro's prose components, it's possible that their internal styles or rendering logic could affect whitespace, but this is not documented in the provided sources. If you suspect this is the case, you might try using a plain <p> tag without any Nuxt-specific components or styles to see if the issue persists. If you need more detailed troubleshooting, please provide additional context about your usage of Nuxt modules or components, or consult the official documentation for updates. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@1121449150140141648> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Fedox
FedoxOP3mo ago
I changed it to a pre tag, its working now.

Did you find this page helpful?