Closed anselmbradford closed 3 weeks ago
Name | Link |
---|---|
Latest commit | 20b9076365f4f19617ddaf78544af089ddf7d042 |
Latest deploy log | https://app.netlify.com/sites/cfpb-design-system/deploys/66bfc484e69fcd0008bc72b0 |
Deploy Preview | https://deploy-preview-2019--cfpb-design-system.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
These are adjustments based on what's needed in https://github.com/cfpb/consumerfinance.gov/pull/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