Bootstrap: There's no button size that can be used with the default table

Created on 11 Apr 2016  路  4Comments  路  Source: twbs/bootstrap

It would be really nifty if we had something like the btn-xs in Bootstrap 3, since it allowed to easily add buttons to tables. I think it's a pretty common use case to have tables of data with "Edit", "Remove" etc. buttons at the right end of it.

This is how it looks with btn-sm, it's a bit too big.

screen shot 2016-04-10 at 15 26 37

css feature v4

Most helpful comment

.btn-xs was deliberately removed in v4 馃槩 . See #17029.
I agree, they were handy for high-density tables.

All 4 comments

.btn-xs was deliberately removed in v4 馃槩 . See #17029.
I agree, they were handy for high-density tables.

Hi hi :)

No pressure/rush. Just an open question!
Is there a chance btn-xs would be added back in?

In working in my own CSS projects, the goal/dream was to basically have 1 button size. However, I found that smaller buttons do have their places. The use cases are usually if:

  1. UI / component is more compact/smaller (like the table row example)
  2. Buttons are "less" primary compared to other actions, but still need to be distinct and visible

Github's current UI is a good example where more primary actions use their main button size. But secondary/tertiary buttons use a combination of color and sizing help with action hierarchy.

Hope this makes sense!

Thanks for reading :)

I can't seem to find the reasoning behind this decision in any of the related issues. As already mentioned it's the only size that makes sense inside table cells.

We won't be restoring the .btn-xs class at this point. Right now, the ratios just don't make sense to try to work in given how small, default, and large buttons function in v4. You do have a few options though鈥攃hange the vertical alignment to middle, customize button sizes yourself, change the table padding, etc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kamov picture kamov  路  3Comments

devdelimited picture devdelimited  路  3Comments

IamManchanda picture IamManchanda  路  3Comments

matsava picture matsava  路  3Comments

bellwood picture bellwood  路  3Comments