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.
These are adjustments based on what's needed in cfpb/consumerfinance.gov#8514
Next steps would be merging this, releasing v3.x, and then updating 8514
Explanation of changes is below:
I removed the underscore prefix to some scss filenames. This is a Sass convention on files that are included in other files. However, underscore or no underscore works, and if we have
index.js
and_index.scss
they won't appear together in the file order, which seems wrong. Best to not bake in magic characters in the filenames.CSS custom variables (custom properties) are a runtime variable that is processed by the browser. This means when the scss files are built, it doesn't know which CSS variables are used or not, so it includes them all wherever the scss from the DS are used. This leads to a lot of duplicates. Instead, they should be included once in the main CSS so that they are available globally, but defined in only one place. To accomplish this, I wrapped them in a Sass mixin, which means they will only be included where the Sass mixin is included.
Some variables are in components and some are in the global vars in the
/abstracts/
directory. I moved some more vars to the global space that are referenced elsewhere in the cfgov codebase. Eventually, placing them in one space or the other should be sorted out to be more consistent. This can be re-examined in a web component future.Changes
Testing