Skip to content

Cannot use theme() within calc() in arbitrary value #7309

@Redmega

Description

@Redmega

What version of Tailwind CSS are you using?

v3.0.18

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

Next.js 12.0.8, Webpack ^5, PostCSS ^8.4.5

What version of Node.js are you using?

v16.13.1

What browser are you using?

Firefox, Chrome

What operating system are you using?

Ubuntu

Reproduction URL

https://play.tailwindcss.com/zsAHSyoNVo

Describe your issue

I posted to a closed issue, reposting here in the hopes that it doesn't get lost again: #6791

I'm facing this same issue trying to get calc() to work with theme() in an arbitrary value. According to the intellisense it's valid, but the css never actually gets generated/injected:

h-[calc(100%-theme('spacing.16'))]

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