Allow values of .5
and -.5
without leading zeros
#3009
Merged
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.
External contribution: originally in #3008
Thanks @dmethvin-gov!
Preview
Allow
.5
and-.5
without leading zeroDescription
The USDS website uses Jekyll and its build process generates numbers like
.5
rather than0.5
. Those are valid in CSS so they should be accepted.I hope this is the right branch for the PR, it would be good to get this into final 2.0 so Jekyll sites will work.
Additional information
Related to #2866 and #2867, should fix uswds/uswds-sandbox#18.
I attempted to run
npm test
but got cascading errors once it reached "fractal component". The same errors occur on 2.0/beta7 so I don't think this change caused them.