Skip to content
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

Text wrapping on inline small radios #4873

Open
amyb-hiveit opened this issue Mar 21, 2024 · 0 comments
Open

Text wrapping on inline small radios #4873

amyb-hiveit opened this issue Mar 21, 2024 · 0 comments
Labels
awaiting triage Needs triaging by team 🐛 bug Something isn't working the way it should (including incorrect wording in documentation)

Comments

@amyb-hiveit
Copy link

Description of the issue

When using inline small radios the text can wrap:

radios

I think this is due to max-width: calc(100% - 74px) on .govuk-radios__label, it needs to be adjusted down a bit for small radios.

Steps to reproduce the issue

  • Add the govuk-radios--inline govuk-radios--small classes to a radio group:
    <div class="govuk-radios govuk-radios--inline govuk-radios--small">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sortControlsForm-sortBy-newest" name="sortBy" type="radio" value="newest">
        <label class="govuk-label govuk-radios__label" for="sortControlsForm-sortBy-newest">Newest</label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="sortControlsForm-sortBy-title" name="sortBy" type="radio" value="title">
        <label class="govuk-label govuk-radios__label" for="sortControlsForm-sortBy-title">A to Z</label>
      </div>
    </div>
    

Actual vs expected behaviour

The text wraps when there are multiple words.

It shouldn't wrap unless the container constrains the space.

Environment (where applicable)

  • GOV.UK Frontend Version: 5.2.0
@amyb-hiveit amyb-hiveit added awaiting triage Needs triaging by team 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage Needs triaging by team 🐛 bug Something isn't working the way it should (including incorrect wording in documentation)
Projects
Status: Backlog 🏃🏼‍♀️
Development

No branches or pull requests

1 participant