twind icon indicating copy to clipboard operation
twind copied to clipboard

Error with text colours when retrieved via theme helper

Open alshdotme opened this issue 2 years ago • 1 comments

I'm using Twind v0.16.16

Say I have the following setup in my theme:

   colors: {
      ...
      brand: {
        darker: 'rgba(7, 87, 0, 1)',
        DEFAULT: 'rgba(11, 138, 0, 1)',
        'tint-25': 'rgba(194, 226, 191, 1)',
      },
     ...
    },

and I reference this colour palette for my text colors using the Theme helper:

    textColor: theme => ({
      ...
      brand: {
        darker: theme('colors.brand.darker'),
        DEFAULT: theme('colors.brand'),
      },
      ...
    }),

Now when trying to apply the class text-brand-darker I get the error Unknown theme value "textColor[brand-darker]".

If I use bg-brand-darker this works as expected.

Here's a sandbox replicating the problem.

alshdotme avatar Mar 31 '22 06:03 alshdotme

Thanks you the report and the reproduction. I'll take a look.

sastan avatar Apr 23 '22 05:04 sastan

Hey folks. This issue hasn't received any traction for 90 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

stale[bot] avatar Feb 17 '23 07:02 stale[bot]

Hey folks. This issue hasn't received any traction for 90 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

stale[bot] avatar Dec 15 '23 04:12 stale[bot]