Skip to content

Arbitrary properties no longer work in v4.1.0 #17489

@pmlk

Description

@pmlk

What version of Tailwind CSS are you using?

v4.1.0

What build tool (or framework if it abstracts the build tool) are you using?

@tailwindcss/cli

What version of Node.js are you using?

v23.9.0

What browser are you using?

Chrome, Safari, or N/A

What operating system are you using?

macOS

Reproduction URL

https://github.com/pmlk/tailwindcss-issue-v4-1-0

Describe your issue

Arbitrary properties no longer seem to work, e.g. <h1 class="[background-color:red;]">foo</h1> will no longer render a red background on the element.

Steps to reproduce with the reproduction repo:

  1. npm run build
    • generates dist/styles.css and
    • copies src/index.html to dist/index.html
  2. open dist/index.html
    • background of the <h1> is not red but SHOULD be red
  3. edit the version of @tailwindcss/cli in package.json to 4.0.17
  4. npm update
  5. npm run build
  6. open dist/index.html
    • background of the <h1> is red as expected

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