Fast: Allow color recipes to accept string color values

Created on 22 Apr 2019  路  5Comments  路  Source: microsoft/fast

Currently, color recipes accept either a DesignSystem or a function that accepts a design-system and returns a color. Somtimes, we see this used in a fassion similar to the following:

neutralForegroundRest(() => "#FFF")

Instead of passing a function that returns a string literal, we should just accept a string literal as a paramater type - when the argument is a string, treat the string as a color string, similar to the way we treat the return value of a function argument.

fast-colors fast-foundation done good-first-issue improvement

Most helpful comment

@vitokhangnguyen yep - still active!

All 5 comments

I would like to work on this as my first contribution if possible.

@timb15 sure - feel free to send a PR!

Hi,
Is this one still active? It's been a while so I am wondering if I can give it a try.

@vitokhangnguyen yep - still active!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings