ni / nimble

The NI Nimble Design System
https://nimble.ni.dev
MIT License
29 stars 9 forks source link

nimble-checkbox has incorrect height #2091

Open mollykreis opened 1 month ago

mollykreis commented 1 month ago

🐛 Bug Report

The nimble-checkbox height currently is driven by the line height of its text, which isn't the way the component should be. As a result, the checkbox without text is 16px tall, and the checkbox with text is 18px tall.

💻 Repro or Code Sample

🤔 Expected Behavior

The checkbox should have a height that isn't controlled by the line height of the text. According to @NIbokeefe, we also need to make sure it is a multiple of 4, since that is standard for all nimble sizes. We may need to work with him to nail down the exact size it should be (20px?).

😯 Current Behavior

The height of the checkbox is the maximum of the checkbox square size (16px) and the text's line height (by default 18px).

💁 Possible Solution

🔦 Context

🌍 Your Environment

jattasNI commented 1 month ago

@fredvisser will add some more context about a related challenge of figuring out how apps should position a checkbox in a 2-column layout where other components will be 32 pixels tall.