-
Notifications
You must be signed in to change notification settings - Fork 1.1k
USWDS - Input: Move input width classes out of usa-form package #6232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+54
−44
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c336522
Include usa-input width variants in usa-input package
aduth 7107844
Merge branch 'develop' of https://github.com/uswds/uswds into aduth-i…
a744483
Remove usa-form maxw:none; move usa-input-group widths
0eeb861
Restore max-width: none for usa-range and usa-select
a8a5c1f
Create $system-input-widths map; generate width classes from map
7db0bf4
Reduce specificity on max-width:none
eb51128
Add comment to explain use of :where()
6d3483d
Add utility class controls
1b98b49
Run prettier
ccd9bf4
Format code
d9e1740
Add usa-form parent to input width classes
d6d2eb4
Revert where() for max-width on child elements
03640e8
Revert "Revert where() for max-width on child elements"
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
<label class="usa-label" for="input-type-text">Text input label</label> | ||
<input class="usa-input" id="input-type-text" name="input-type-text" type="text"> | ||
<input class="usa-input{% if utilities %} {{ utilities }}{% endif %}" id="input-type-text" name="input-type-text" type="text"> | ||
|
||
<label class="usa-label" for="input-focus">Text input focused</label> | ||
<input class="usa-input usa-focus" id="input-focus" name="input-focus" type="text"> | ||
<input class="usa-input usa-focus{% if utilities %} {{ utilities }}{% endif %}" id="input-focus" name="input-focus" type="text"> | ||
|
||
<div class="usa-form-group usa-form-group--error"> | ||
<label class="usa-label usa-label--error" for="input-error">Text input error</label> | ||
<span class="usa-error-message" id="input-error-message" role="alert">Helpful error message</span> | ||
<input class="usa-input usa-input--error" id="input-error" name="input-error" type="text" aria-describedby="input-error-message"> | ||
<input class="usa-input usa-input--error{% if utilities %} {{ utilities }}{% endif %}" id="input-error" name="input-error" type="text" aria-describedby="input-error-message"> | ||
</div> | ||
|
||
<label class="usa-label" for="input-success">Text input success</label> | ||
<input class="usa-input usa-input--success" id="input-success" name="input-success" type="text"> | ||
<input class="usa-input usa-input--success{% if utilities %} {{ utilities }}{% endif %}" id="input-success" name="input-success" type="text"> | ||
|
||
<label class="usa-label" for="input-type-textarea">Text area label</label> | ||
<textarea class="usa-textarea" id="input-type-textarea" name="input-type-textarea"></textarea> | ||
<textarea class="usa-textarea{% if utilities %} {{ utilities }}{% endif %}" id="input-type-textarea" name="input-type-textarea"></textarea> | ||
|
||
<label class="usa-label" for="input-disabled">Text input disabled</label> | ||
<input class="usa-input" id="input-disabled" name="input-disabled" type="text" disabled> | ||
<input class="usa-input{% if utilities %} {{ utilities }}{% endif %}" id="input-disabled" name="input-disabled" type="text" disabled> | ||
|
||
<label class="usa-label" for="input-type-textarea-disabled">Text area disabled</label> | ||
<textarea class="usa-textarea" id="input-type-textarea-disabled" name="input-type-textarea-disabled" disabled></textarea> | ||
<textarea class="usa-textarea{% if utilities %} {{ utilities }}{% endif %}" id="input-type-textarea-disabled" name="input-type-textarea-disabled" disabled></textarea> | ||
|
||
<label class="usa-label" for="input-aria-disabled">Text input aria-disabled</label> | ||
<input class="usa-input" id="input-aria-disabled" name="input-aria-disabled" type="text" aria-disabled="true"> | ||
<input class="usa-input{% if utilities %} {{ utilities }}{% endif %}" id="input-aria-disabled" name="input-aria-disabled" type="text" aria-disabled="true"> | ||
|
||
<label class="usa-label" for="input-type-textarea-aria-disabled">Text area aria-disabled</label> | ||
<textarea class="usa-textarea" id="input-type-textarea-aria-disabled" name="input-type-textarea-aria-disabled" aria-disabled="true"></textarea> | ||
<textarea class="usa-textarea{% if utilities %} {{ utilities }}{% endif %}" id="input-type-textarea-aria-disabled" name="input-type-textarea-aria-disabled" aria-disabled="true"></textarea> |
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
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
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
11 changes: 11 additions & 0 deletions
11
packages/uswds-core/src/styles/tokens/units/input-widths.scss
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
$system-input-widths: ( | ||
"2xs": 5ex, | ||
"xs": 9ex, | ||
"sm": 13ex, | ||
"small": 13ex, | ||
"md": 20ex, | ||
"medium": 20ex, | ||
"lg": 30ex, | ||
"xl": 40ex, | ||
"2xl": 50ex, | ||
); |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.