Skip to content
Discussion options

You must be logged in to vote

Seems to be a bug in @tailwindcss/typography when the following criteria are met:

  • multiple ::before rules in the same selector (in your case, the ol li::before,ul li::before)
  • darkMode set to class
  • dark:prose class exists

This results in an erroneous rule as the following:

.dark .dark\:prose :where(ol li,ul li):not(:where([class~="not-prose"] *))::before,::before {
  /* … */
}

In particular, the lone ::before selector at the end (minimum reproduction Tailwind Play).

Workaround

As a workaround for now, you can slightly tweak the config CSS to be like the following:

-  'ol li::before,ul li::before': {
-    // …
+  'ol li, ul li': {
+    '&::before': {
+      // …
+    },
   },

Tailwind Pla…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PsyGik
Comment options

Answer selected by PsyGik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants