Skip to content

Conversation

jonnitto
Copy link
Contributor

@jonnitto jonnitto commented Mar 1, 2023

Closes #299

@vercel
Copy link

vercel bot commented Mar 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
tailwindcss-typography ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 1, 2023 at 9:54PM (UTC)

@adamwathan
Copy link
Member

Hey thanks for the PR! Unfortunately can't merge these changes — we need to use the attribute selector to avoid generating tons and tons of extra CSS. Tailwind uses class selectors to tell if a class has been used, and using attribute selectors is sort of a trick we use to include a class in the selector without Tailwind really "noticing".

If we change these selectors to classes, then using not-prose anywhere will cause a lot of extra CSS to be generated, because Tailwind will generate every selector that includes that class.

Here's the relevant PR was this was changed from a class to an attribute selector in the first place:

#208

If you'd like to open another PR that just makes the change to ignore the not-prose element instead of only descendants we can definitely take a look at that 👍

@adamwathan adamwathan closed this Mar 2, 2023
@jonnitto
Copy link
Contributor Author

jonnitto commented Mar 2, 2023

Thanks, @adamwathan for this explantation. Here's the new PR: #301

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

Successfully merging this pull request may close these issues.

not-prose doesn't ignore the element itself

2 participants