Skip to content

The theme() function from the Tailwind config is not expanded in arbitrary values #14892

@Serator

Description

@Serator

What version of Tailwind CSS are you using?

3.4.14

Reproduction URL

https://play.tailwindcss.com/jhNKe63ed5

Describe your issue

tailwind.config.js

module.exports = {
  theme: {
    boxShadow: {
      base: '0 0 0 theme(spacing.2) green inset',
    },
  },
}

HTML

<div class="[box-shadow:_theme(boxShadow.base)]">❌</div>

<div class="shadow-base">✅</div>
image

The theme() function does not expand to its actual value when an arbitrary property is used with theme().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions