Skip to content

[css-forms-1] Double border style for progres, meter and input[type=checkbox][switch] #11841

Closed
@lukewarlow

Description

@lukewarlow
Member

Per https://drafts.csswg.org/css-forms/#layout

Meter, Progress and switch inputs get a double border, once on the "host" element, once on the inner track.

input:not([type=file], [type=range]),
...
::track,
meter,
progress {
  border: 1px solid currentColor;
  background-color: transparent;
}

I think the meter, and progress elements should be removed from this second rule (they also already get a transparent background-color from the base rule). [type=checkbox][switch] should also be added to the not selector on the first line.

Activity

nt1m

nt1m commented on Mar 5, 2025

@nt1m
Member

Yeah, the UA styles are definitely not finished. I'm hoping implementation/prototyping/polyfills might be able to help finalize the final set of CSS (like it did for select).

changed the title [-][css-forms-1] Double border style for progress and meter[/-] [+][css-forms-1] Double border style for progres, meter and input[type=checkbox][switch][/+] on Mar 9, 2025
lukewarlow

lukewarlow commented on Mar 9, 2025

@lukewarlow
MemberAuthor

The same also applies for switch elements.

lukewarlow

lukewarlow commented on Mar 9, 2025

@lukewarlow
MemberAuthor

Alternative to my suggestion in OP we could remove the border from the track and add it to the host element. Which in my prototyping of switch seems to get you more logical sizing and positioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @nt1m@lukewarlow

      Issue actions

        [css-forms-1] Double border style for progres, meter and input[type=checkbox][switch] · Issue #11841 · w3c/csswg-drafts