Skip to content

Button/Input Sizing and Alignment Questions #2226

Answered by serifluous
jkiga asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @jkiga ! You've stumbled upon one of the quirks of the system, and the restrictions of working within a consistent 4px spacing & sizing structure.

Our buttons and inputs use shadows for their borders (rather than true borders), so that the full height of a button/input is still a multiple of 4. Shadows don't factor into the browser's size calculations for UI elements, but borders do (i.e., a 1px border would add 2px extra height/width to each element). Not sure if you're familiar or not with the CSS Box model, but that's what's happening here—I'm happy to share more if you're not familiar.

Screenshot of our secondary button if you use inspect its size and border:

However this does ma…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jkiga
Comment options

@serifluous
Comment options

@ceyerkes
Comment options

@jkiga
Comment options

Answer selected by serifluous
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants