blueprint icon indicating copy to clipboard operation
blueprint copied to clipboard

<Tag> Component text not centered when rendering single characters.

Open braeden opened this issue 2 years ago • 0 comments

Environment

  • Package version(s): 4.3.0
  • Operating System: MacOS
  • Browser name and version: Chrome 102.0.5005.115

Code Sandbox

Link to a minimal repro: https://codesandbox.io/s/blueprint-sandbox-forked-deqbyf?file=/src/index.tsx

image

Steps to reproduce

  1. <Tag> component with single character

Actual behavior

The text isn't quite centered

Expected behavior

I would expect it to be centered, especially since it feels like single numbers is a common use-case for <Tag>.

Possible solution

I think we just need to throw a text-align: center in addition to the current flexbox setup. Happy to put up the PR, just want to make sure it's not going to mess up any expected patterns with text alignment.

Thanks!

braeden avatar Jun 20 '22 19:06 braeden