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

Element gets wrapped in div when styles are applied #16

Open
nparashar150 opened this issue Oct 8, 2024 · 0 comments
Open

Element gets wrapped in div when styles are applied #16

nparashar150 opened this issue Oct 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nparashar150
Copy link
Owner

Describe the issue
When a class is applied to an element, it gets wrapped in an additional div rather than appending the class directly to the element.

To Reproduce
Steps to reproduce the behavior:

  1. Use this input: > what **is** this?2. Compile to HTML.
    It outputs: <blockquote class="p-4 my-4 border-s-4 border-gray-300">what <strong>is</strong> this?</blockquote>

  2. Now use this input: ["[&>*>strong]:text-pink-500"] > what **is** this?
    It outputs: <div class="[&amp;>*>strong]:text-pink-500"><blockquote class="p-4 my-4 border-s-4 border-gray-300">what <strong>is</strong> this?</blockquote></div>

Expected behavior
The class should be applied directly to the blockquote, like this:
<blockquote class="p-4 my-4 border-s-4 border-gray-300 [&>*>strong]:text-pink-500">what <strong>is</strong> this?</blockquote>

Additional context
Avoid unnecessary wrapping in div when applying classes, and append the class to the target block-level element (e.g., blockquote) instead.

@nparashar150 nparashar150 added the bug Something isn't working label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant