Skip to content
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

w-full is not respected in Vue Markdown Block Component #2802

Open
FantixX opened this issue Oct 2, 2024 · 1 comment
Open

w-full is not respected in Vue Markdown Block Component #2802

FantixX opened this issue Oct 2, 2024 · 1 comment

Comments

@FantixX
Copy link

FantixX commented Oct 2, 2024

Environment


  • Operating System: Windows_NT
  • Node Version: v20.13.1
  • Nuxt Version: 3.13.2
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Layout:

<template>
    <div class="max-w-6xl brd m-auto flex flex-col items-center brd min-h-dvh prose-lg">
        <NavBar></NavBar>
        <slot></slot>
    </div>
</template>

Component:

<template>
    <div class="brd w-full">
        <div>Component Content</div>
        <slot></slot>
    </div>
</template>

Markdown:

::component-name
Content
::

Expected result
image

Actual result:
image

Describe the bug

Due to the wrapper div which is created by the framework, CSS/Tailwind classes like w-full do not work as expected in a component in markdown. This seems like a big issue, as it makes styling for components used in markdown very unpredictable. Maybe I overlook something, but why should components work differently in markdown compared to when I use them directly in other .vue components?

Additional context

No response

Logs

No response

@larbish
Copy link
Collaborator

larbish commented Oct 3, 2024

ContentRenderer rendered a <div> around the markdown so I f you want to apply the w-full to this div also you can just do this: <ContentRenderer class="w-full" … />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants