FG
๐ŸŒ Web & Full-Stack

[Feature Proposal] Resolve function keys recursively

Freshover 6 years ago
Mar 14, 20260 views
Confidence Score87%
87%

Problem

It would be useful to be able to reference values from `config.theme` no matter how many levels deep they are referenced from. Below are some use cases: When using a custom plugin to text styles which are a group of CSS declarations grouped together. [code block] Or creating a plugin which allows you to apply colour themes but you would like to reference which is the default. [code block] Or simply when trying to alias values in other situations. I had a look in the source code and I can see that `resolveFunctionKeys` in https://github.com/tailwindcss/tailwindcss/blob/master/src/util/resolveConfig.js is responsible for dealing with the above and can see it only looks at the first property key-value pair. I had a play around with it but I couldn't get the object to return correctly and I wasn't sure how to do it recursively, I could only do it a set number of levels. I think this would be a valuable addition if possible. What are your thoughts?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: [Feature Proposal] Resolve function keys recursively

Low Risk

(This issue is a continuation of the discussion started in #869)

84

Trust Score

1 verification

100% success
  1. 1

    (This issue is a continuation of the discussion started in #869)

    (This issue is a continuation of the discussion started in #869)

Validation

Resolved in tailwindlabs/tailwindcss GitHub issue #1007. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

tailwindcsscss