Skip to content

[css-forms-1] Add 24px sizing rule for checkbox and radio inputs #12489

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions css-forms-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,14 @@ ISSUE: Refine meter, progress, switch and range input styling.

```css
input:is([type=checkbox]:not([switch]), [type=radio]) {
width: 1em;
height: 1em;
/* These size rules ensure accessibility by following WCAG rules:
* https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html */
block-size: max(1em, 24px);
inline-size: max(1em, 24px);

/* This font-size rule ensures the checkmark fills the containing box. */
font-size: max(1em, 24px);

Comment on lines +846 to +853
Copy link
Member

@nt1m nt1m Jul 16, 2025

Choose a reason for hiding this comment

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

font-size would control both block-size and inline-size technically, so this would have the same effect.

    block-size: 1em;
    inline-size: 1em;
    font-size: max(1em, 24px);

cc @fantasai to look at this

display: inline-flex;
align-items: center;
justify-content: center;
Expand Down