Skip to content

Tailwind error when using theme() in css #8824

@VarinderS

Description

@VarinderS

Adding following styles to css leads to an error:

.test {
  --shadow: theme("boxShadow.glow-8/28/20");
  box-shadow: var(---shadow);
}

error:

'boxShadow.glow-8/28' does not exist in your theme config. Did you mean 'boxShadow.glow-8/28/20'?

What version of Tailwind CSS are you using?

v3.1.5

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

NextJS 12.1.0

What version of Node.js are you using?

v16.2.0

What browser are you using?

N/A

What operating system are you using?

Windows

Reproduction URL

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

Describe your issue

Adding styles that contain more than one forward slash / returns an error when it's used via theme() function, for example: theme("boxShadow.glow-6/30/40")

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