Skip to content

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

Open
@faiz9068

Description

@faiz9068

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

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