tailwindcss-typography icon indicating copy to clipboard operation
tailwindcss-typography copied to clipboard

String selectors broken in Typography plugin after upgrading to Tailwind CSS v4

Open faiz9068 opened this issue 8 months ago • 0 comments

What version of @tailwindcss/typography are you using?

"^0.5.16"

What version of Node.js are you using?

v22.13.1

What browser are you using?

chrome

What operating system are you using?

windows

Reproduction repository

.

Describe your issue

Description

After upgrading to Tailwind CSS v4, previously working string selectors in the Typography plugin configuration now cause PostCSS "Unknown word" errors. This appears to be a regression as these selectors worked in v3.x.

Previously Working Code (Tailwind CSS v3.x)

typography: {
  DEFAULT: {
    css: {
      "pre code": false,
      "code::before": false,
      "code::after": false
    }
  }
}

Error After v4 Upgrade

[ERROR] [postcss] Unknown word
  Stack trace:
    at Input.error (node_modules\postcss\lib\input.js:109:16)

Steps to Reproduce

  1. Upgrade from Tailwind CSS v3.x to v4
  2. Use string selectors in Typography plugin configuration

Additional Information

  • This worked in Tailwind CSS v3.x
  • Affects all string selectors in Typography configuration
  • Appears to be a regression rather than intended behavior

faiz9068 avatar Feb 20 '25 08:02 faiz9068