Skip to content
Discussion options

You must be logged in to vote

This is a limitation of CSS, rather than a bug in Tailwind. --spacing() is syntactical sugar for calc(var(--spacing) * <int>) and as per the specification:

The initial-value must be computationally independent.

Where computationally independent is defined as:

A property value is computationally independent if it can be converted into a computed value using only the value of the property on the element, and "global" information that cannot be changed by CSS.

Example 4

[…] On the other hand, 3em is not computationally independent, […]. Neither is a value with a var() function, because it relies on the value of a custom property.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Serator
Comment options

Answer selected by Serator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #19628 on January 31, 2026 14:10.