palantir/blueprint

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

Open

#6,030 opened on Mar 17, 2023

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (2,167 forks)batch import
P2Package: coreType: bughelp wanted

Repository metrics

Stars
 (20,263 stars)
PR merge metrics
 (Avg merge 43d 10h) (27 merged PRs in 30d)

Description

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.

Contributor guide