Skip to content

Conversation

@crswll
Copy link
Contributor

@crswll crswll commented Jun 1, 2021

We noticed we were able to do:

.test {
  color: theme('colors.someFunction')
}

but we were unable to do:

.test {
  color: theme('textColor.someFunction')
}

so this resolves that.

I left a few comments below because I feel like I'll need to adjust a bit.

'transitionTimingFunction',
'backgroundImage',
'backgroundSize',
'backgroundColor',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was having a hard time understanding why this was here. I removed it and it didn't break any tests so that's good but I can't help but feel like I'm missing something.

}

if (themeSection === 'colors') {
if (['colors', 'textColor', 'backgroundColor', 'borderColor'].includes(themeSection)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do something less explicit here like themeSection === 'colors' || themeSection.toLowerCase().endsWith('color')?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would prefer to be explicit personally. We are missing a bunch of things in this list though, like divideColor, gradientColorStops, placeholderColor, ringColor, ringOffsetColor, fill, stroke, and the brand new caretColor plugin so will want to get updated for those.

This is probably going to be annoying to maintain so might be worth thinking through a strategy that is more automatic but I don't have any good ideas that immediately come to mind :/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the other items for now and alphabetized. Everything I can think of feels either limiting or gross right now. Will think about it a bit more.

@RobinMalfait
Copy link
Member

Hey! Thank you for your PR!
Much appreciated! 🙏

I had to rebase, and made some changes. I didn't have access rights to push directly to your branch, so I create a new PR and started from your commits: #5871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants