palantir/blueprint

Vertical Misalignment when NumericInput is wrapped in a Label (visual bug)

开放

#6,030 创建于 2023年3月17日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (2,167 个派生)batch import
P2Package: coreType: bughelp wanted

仓库指标

星标
 (20,263 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Environment

  • Package version(s): 4.17.6
  • Operating System: MacOS Ventura
  • Browser name and version: Chrome version 111.0.5563.64

Code Sandbox

Link to a minimal repro: Sandbox

Steps to reproduce

  1. Visual bug (appearance)

Actual behavior

Placing NumericInput inside Label causes vertical misalignment of the text input as there is an additional 5px top margin on the text input.

Expected behavior

The text inputs and button inputs should be vertically aligned.

Possible solution

Add CSS property to default the margin-top to 0 on the text input for NumericInput so that even if it is wrapped in a Label there aren't additional margins.

贡献者指南