cferdinandi / cferdinandi/kelp
link inside label creates margin on checkbox
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 646
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
When adding a link to a label of a checkbox (i.e. for linking privacy policy that needs to be accepted), the following rule adds a margin to the checkbox, making it unaligned with the label text anymore.
:where(input, textarea, select):not(:last-child, [aria-invalid=true])
Specificity: (0,1,0)
{
margin-block-end: var(--size-xl);
}
I expected the checkbox and label to be aligned even with a link in the label.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the rule :where(input, textarea, select):not(:last-child, [aria-invalid=true]) in the project’s CSS and inspect how it applies to a checkbox inside a label containing a link. Reproduce the checkbox-and-label example from the issue, then verify that the checkbox remains aligned without breaking the intended spacing for other inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100