Merged
Conversation
aduth
commented
Apr 6, 2021
4aa8918 to
4c62728
Compare
**Why**: To match USWDS intended load order of stylesheets, to allow utility classes to take precedent over component styles, and to facilitate a potential future use of USWDS 2.11.0 package subsetting.
**Why**: Avoid changing file structure for built output, while retaining the ability to point to dependency source in development in a way that's compatible with the copied dependency in the build distributable. Also, nicer paths.
4c62728 to
8de7e24
Compare
**Why**: Guarantee USWDS always takes precedent over symlink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why: To match USWDS intended load order of stylesheets, to allow utility classes to take precedence over component styles, and to facilitate a potential future use of USWDS 2.11.0 package subsetting.
USWDS loads utility stylesheets after components, allowing for those utility classes to apply usually as expected as an override to the component style selectors of equal specificity, as an alternative to resorting to
$utilities-use-important.Previously, we imported all USWDS styles prior to loading our own component overrides. Thus, the component overrides could take precedence over the utility classes. For example, it was not possible to use margin utility classes with the unstyled button (observed in 18F/identity-idp#4869).
Note that depending on the selector used for a component's styles, a utility class may still "lose" to a component's own styles. If this proves to be problematic (or is argued to be problematic now), it may be worth reevaluating to consider using the
$utilities-use-importanttheme setting value, which applies!importantto all utility classes.