Skip to content

[css-forms-1] use calc-size() for improved sizing of <button> and <select> #12085

Open
@dbaron

Description

@dbaron

In #12019 (comment) and in the related presentation I proposed that we change the styles that are currently (for <button> and <select>):

  min-block-size: max(24px, 1lh);
  min-inline-size: 24px;

into:

  min-block-size: calc-size(auto, max(24px, 1lh, size));
  min-inline-size: calc-size(auto, max(24px, size));

This has the advantage that (as described in the examples in the presentation) we no longer override the intrinsic size of the text in the button or select, and thus it defaults to reasonable sizing behavior in flexbox and grid (rather than being willing to shrink down very small).

We didn't resolve on doing that in that issue, and this separate issue is to discuss whether we should in fact make that change. (I think we probably should.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions