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

Focus outline issue on radio buttons and checkboxes in Firefox browser #3916

Closed
ajanickiv opened this issue Dec 29, 2020 · 1 comment · Fixed by #3918
Closed

Focus outline issue on radio buttons and checkboxes in Firefox browser #3916

ajanickiv opened this issue Dec 29, 2020 · 1 comment · Fixed by #3918
Labels
Type: Bug A problem in the code

Comments

@ajanickiv
Copy link

Describe the bug

The focus outline for radio buttons and checkboxes extends left about 2 rems past the radio button and checkbox display area

Steps to reproduce the bug

  1. Open Firefox browser
  2. Go to https://designsystem.digital.gov/components/form-controls/#radio-buttons or https://designsystem.digital.gov/components/form-controls/#checkbox
  3. Focus on radiobutton/checkbox

Expected behavior

Focus outlines the radio button and checkbox like it does in other browsers

Screenshots

Firefox

image
image

Chrome

image
image

System setup

  • V2.10.0
  • Laptop
  • Windows 10
  • Firefox 84.0.1 (64-bit)

Additional context

Custom CSS that fixes the problem

@-moz-document url-prefix() {
    .checkbox-radio-focus {
        display: flex;
        text-indent: 0;
        padding-left: 0;
    }
    .checkbox-radio-focus-tile {
        text-indent: 0;
        padding-left: 0.5rem !important;
    }
    .checkbox-radio-focus-tile-hint {
        text-indent: 2rem;
    }
}
@ajanickiv ajanickiv added the Type: Bug A problem in the code label Dec 29, 2020
@mejiaj
Copy link
Contributor

mejiaj commented Jan 5, 2021

Good find @ajanickiv! I found removing text-indent from the ::before worked as well.

I have a PR open for this in: #3918.

@mejiaj mejiaj added this to Development review in USWDS Sprint Board Jan 5, 2021
USWDS Sprint Board automation moved this from Development review to Done Jan 5, 2021
This was referenced Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug A problem in the code
Projects
Development

Successfully merging a pull request may close this issue.

2 participants