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

checkbox invalid state #44

Closed
basaran opened this issue Oct 24, 2021 · 2 comments · Fixed by #45
Closed

checkbox invalid state #44

basaran opened this issue Oct 24, 2021 · 2 comments · Fixed by #45
Labels
bug Something isn't working

Comments

@basaran
Copy link

basaran commented Oct 24, 2021

Hello, I'm probably doing something wrong but this is what I get when I invalidate checkboxes:

checkbox

I investigated a bit, and noticed this css padding the aria-invalid:

input[aria-invalid],
select[aria-invalid],
textarea[aria-invalid] {
    padding-right: 2rem;
    background-position: center right 0.75rem;
    background-repeat: no-repeat;
    background-size: 1rem auto;
}

I ended up overriding the checkboxes:

input[aria-invalid][type="checkbox"] {
    padding-right: 0rem;
    background: none;
}

checkbox-after

Do you think the original css should be modified with a :not() ? for checboxes? I will test the radio buttons shortly.

@lucaslarroche
Copy link
Member

Thank you. That's a confirmed bug.
:not([type="checkbox"]):not([type="radio"]) is the right way to do it.

I will make a patch.

@lucaslarroche lucaslarroche added the bug Something isn't working label Oct 25, 2021
@basaran
Copy link
Author

basaran commented Oct 25, 2021

thank you for the pico css. She has significantly improved my drafting efforts since the last few days I met her :)

@lucaslarroche lucaslarroche linked a pull request Oct 25, 2021 that will close this issue
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants