Skip to content

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

Closed
@jonnitto

Description

@jonnitto

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions