Visitar URL original
USWDS - Feature Request: Limited spacing of the InputPrefix results in overlapped text · Issue #5558 · uswds/uswds · GitHub
Skip to content

USWDS - Feature Request: Limited spacing of the InputPrefix results in overlapped text #5558

Closed as not planned

Description

@dakota002

Describe the bug

Stylings introduced in #5063 have broken the visual behavior of the input-prefixes

Steps to reproduce the bug

I have made a small demo that replicates this bug at https://codesandbox.io/s/funny-artem-s4q8v2?file=/src/App.js

Expected Behavior

The prefix spacing should not be limited in size to allow for larger words as prefixes, and should apply the same effect to spans or other non-input fields.

This was the previous functionality in https://github.com/uswds/uswds/tree/v3.1.0, which looked like this:
image

Related code

No response

Screenshots

An example from gcn.nasa.gov. This screenshot shows the overlapping text:
image

In this screenshot, I have disabled the position: absolute styling to show the text that was covered. ('From' and 'Subject')
image

System setup

USWDS version 3.6.0

Additional context

No response

Code of Conduct

Activity

  1. added
    Needs: ConfirmationReported behavior needs validation. Remove after recording reproduction or investigation results.
    on Oct 12, 2023
  2. added
    Role: DevDev expertise is relevant. Project Active Role tracks ownership; this label is not an assignment.
    and removed on Oct 26, 2023
  3. added
    Package: Prefix/SuffixWork affecting Prefix/Suffix. Apply only when this area helps route or find the issue.
    on Oct 26, 2023
  4. lpsinger commented on Nov 3, 2023

    @lpsinger
    Contributor

    I wonder if there is a workaround that we can apply to our custom SCSS so that we can keep using the latest version of USWDS until this is fixed.

  5. mahoneycm commented on Nov 3, 2023

    @mahoneycm
    Contributor

    Confirming I'm able to reproduce the bug.
    Update for added clarity: Confirming that replacing an icon with text can cause text overlap due to the method we use to add margin to the input prefix. This example was made in USWDS Storybook:

    Image

    Looks like it's coming from the way we're setting the padding to be equal to the icon width:

    .usa-input-prefix + input {
    @include u-padding-left($icon-offset);
    @include u-padding-right($input-padding);
    }

    We may want to reconsider how this padding is measured while testing for disabled and focus styles.

  6. added and removed
    Needs: ConfirmationReported behavior needs validation. Remove after recording reproduction or investigation results.
    on Nov 3, 2023
  7. 32 remaining items

  8. added
    Needs: RefinementScope or acceptance criteria are missing. Remove once the issue is actionable.
    and removed
    Needs: DiscussionAn unresolved decision blocks progress. Name the decision; remove this label when decided.
    on Nov 14, 2024
  9. dakota002 commented on Nov 14, 2024

    @dakota002
    Author

    Thanks @mahoneycm, we ended up going the utility class route. Appreciate you all looking into this

  10. moved this from Needs refinement to Backlog in USWDS Core Project Dataon Feb 5, 2025
  11. added
    Status: not plannedA documented decision not to pursue work now. Use GitHub closure reason when the decision is final.
    on May 2, 2026
  12. annepetersen commented on May 2, 2026

    @annepetersen
    Contributor

    Hi there: this is one of many submitted PRs/issues that have languished here. USWDS is currently understaffed, so I'm closing items that aren’t as high on the priority list right now, including this one, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: RefinementScope or acceptance criteria are missing. Remove once the issue is actionable.Package: Prefix/SuffixWork affecting Prefix/Suffix. Apply only when this area helps route or find the issue.Role: DevDev expertise is relevant. Project Active Role tracks ownership; this label is not an assignment.Status: not plannedA documented decision not to pursue work now. Use GitHub closure reason when the decision is final.Type: Feature RequestCompatibility label; native Enhancement type is authoritative. Retained for templates/search links.reconsider laterDeferred idea.

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions