Closed
Description
What version of @tailwindcss/typography are you using?
0.5.10
What version of Node.js are you using?
20.8.0
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction repository
cdn test, code provided in issue
Describe your issue
We are using Tailwind Typography in conjunction with https://pagedjs.org/ to generate PDFs. After upgrading to Typography 0.5.10
, we are getting this error:
paged.polyfill.js:30815 Uncaught (in promise) DOMException: Failed to execute 'querySelectorAll' on 'DocumentFragment': '[class~=not-prose] *)):before' is not a valid selector.
at NthOfType.processSelectors (https://unpkg.com/pagedjs/dist/paged.polyfill.js:30815:27)
at NthOfType.afterParsed (https://unpkg.com/pagedjs/dist/paged.polyfill.js:30809:9)
at https://unpkg.com/pagedjs/dist/paged.polyfill.js:424:26
at Array.forEach (<anonymous>)
at Hook.trigger (https://unpkg.com/pagedjs/dist/paged.polyfill.js:423:15)
at Chunker.flow (https://unpkg.com/pagedjs/dist/paged.polyfill.js:2916:33)
at async Previewer.preview (https://unpkg.com/pagedjs/dist/paged.polyfill.js:33178:15)
at async https://unpkg.com/pagedjs/dist/paged.polyfill.js:33240:11
I'm guessing this change may be the culprit:
Remove typography styles from not-prose elements in addition to their children (#301)
I don't actually have a "working" example repo, because 0.5.10
is not on the Tailwind Play CDN yet, so I'm jumping the gun a little bit, but this code here will work once the new version is available:
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.tailwindcss.com?plugins=typography@0.5.10"></script>
</head>
<body>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet ultricies massa. Morbi tempor sodales
hendrerit. Vestibulum at gravida est. Nulla ullamcorper purus vel mauris interdum scelerisque. Duis a vestibulum
velit. Morbi luctus quam at mauris porta eleifend.</p>
</body>
</html>
Metadata
Metadata
Assignees
Labels
No labels