Skip to content

USWDS: Breadcrumb - Checkbox/radio components don't work if label class doesn't end with usa-checkbox__label or usa-radio__label #4262

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
merged 1 commit into from
Jul 30, 2021

Conversation

sembrat
Copy link

@sembrat sembrat commented Jul 12, 2021

Fixes #4251.

Description

Resolves a Sass selector issue where checkbox and radio components were only being styled if the usa-*__label was the last CSS class. One would expect this should work if the CSS class is present within the element regardless of position, due to modifiers and application-specific overrides or expansions.

Additional information

See #4251 for the original report and suggested fix.

Before you hit Submit, make sure you’ve done whichever of these applies to you:

  • [] Follow the 18F Front End Coding Style Guide and Accessibility Guide.
  • [] Run npm test and make sure the tests for the files you have changed have passed.
  • [] Run your code through HTML_CodeSniffer and make sure it’s error free.
  • Title your pull request using this format: [Website] - [UI component]: Brief statement describing what this pull request solves.

@jrglasgow
Copy link

this pull request fixed it on my site, I approve

Copy link
Contributor

@thisisdano thisisdano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice fix. Thank you!

@thisisdano thisisdano merged commit 4a8dd88 into uswds:develop Jul 30, 2021
@sembrat sembrat deleted the 4251-label-class-selector branch August 2, 2021 00:41
@thisisdano thisisdano mentioned this pull request Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checkbox/radio components don't work if label class doesn't end with usa-checkbox__label or usa-radio__label
3 participants