Skip to content

3.1.0 "unbalanced brackets" error when using theme function with bracket notation #8562

Closed
@fab120

Description

@fab120

What version of Tailwind CSS are you using?

v3.1.0

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

  • laravel-mix 6.0.49
  • play.tailwindcss.com

What version of Node.js are you using?

v18.3.0

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction URL

https://play.tailwindcss.com/kLuW3Vrpv6?file=css

Describe your issue

In Tailwindcss v3.1.0 this css

.test-width {
  width: theme('width[1/12]');
}

give this error:
Error: Path is invalid. Has unbalanced brackets: width['1

while in Tailwindcss v3.0.24 it compiles correctly to

.test-width {
  width: 8.33333%;
}

Metadata

Metadata

Assignees

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