Skip to content

The not-prose class let's some CSS properties through #398

@SanderSander

Description

@SanderSander

What version of @tailwindcss/typography are you using?

0.5.16

What version of Node.js are you using?

23.6

What browser are you using?

N/A

What operating system are you using?

Mixed

Reproduction repository

https://play.tailwindcss.com/LcEFGWUZX3

Describe your issue

When using the class not-prose some css settings are getting through.

app.css

@import 'tailwindcss';
@plugin "@tailwindcss/typography" {
    className: 'prose-name'
}
.prose-name {
     /** **/
    --tw-prose-invert-th-borders: oklch(44.6% 0.03 256.802);
    --tw-prose-invert-td-borders: oklch(37.3% 0.034 259.733);
    font-size: 1rem;
    line-height: 1.75;
}
.prose-name {
    color: var(--tw-prose-body);
    max-width: 65ch;
}

The line-height and font-size are defined in

lineHeight: round(24 / 14),

I understand that all the generate selectors looks like :where(h2):not(:where([class~="not-prose-name"],[class~="not-prose-name"] *)) {

But this isn't the case for the properties color font-size and line-height defined on the main css class.

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