Reference "disabled-light" color by token name in File Input styles #3762
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request seeks to resolve an error which can occur when assigning a non-token value for the
$theme-color-disabled-light
variable, as described in the USWDS v2.4.0 release notes.If a developer assigns the variable value...
... an error occurs during build:
Additional information
Exploring the underlying
color
function source,$value
is only allowed to be passed as a color value in combination with theset-theme
flag, as is done in the_variables.scss
initialization file. By referencing this variable directly without accompanying flags, the build will fail.To allow for theme overrides to take effect, it would seem the most obvious fix is to pass the token name, rather than to reference the variable directly. It appears this is the only file in the repository outside
_variables.scss
which calls thecolor
function with a$theme-color-
-prefixed variable.Originally observed at: 18F/identity-design-system#159