cferdinandi / cferdinandi/kelp

link inside label creates margin on checkbox

Open
#285 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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);
}

Image

I expected the checkbox and label to be aligned even with a link in the label.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.