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

not-prose doesn't ignore the element itself #299

Closed
jonnitto opened this issue Mar 1, 2023 · 0 comments · Fixed by #301
Closed

not-prose doesn't ignore the element itself #299

jonnitto opened this issue Mar 1, 2023 · 0 comments · Fixed by #301

Comments

@jonnitto
Copy link
Contributor

jonnitto commented Mar 1, 2023

What version of @tailwindcss/typography are you using?

v0.5.9

What version of Node.js are you using?

browser

What browser are you using?

Occurs on all

What operating system are you using?

macOS

Reproduction repository

https://play.tailwindcss.com/Y1RYnKWHcJ

Describe your issue

When an element has the not-prose class, only child elements gets ignored. But it would be useful to have also the element itself ignored. For example for link components who get inserted inside a prose element

Example:

https://play.tailwindcss.com/Y1RYnKWHcJ

The generated CSS by the CDN is:

.prose :where(a):not(:where([class~="not-prose"] *)) {
  color: var(--tw-prose-links);
  text-decoration: underline;
  font-weight: 500;
}

but should be

.prose :where(a):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
  color: var(--tw-prose-links);
  text-decoration: underline;
  font-weight: 500;
}

Like that, the element itself would also be ignored.

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