With Bootstrap CSS you can define buttons to be large, small, or normal. However, in some cases I would like to use large buttons (that is, add the
btn-lg class) conditionally, as in, only if the screen size is
md or larger.
A clumsy workaround is to include the button twice: once with
btn-lg and once without, the regular one with
visible-xs-(something) and the large one with
hidden-xs, see live example.
Is there a smarter way to do this? Can I define a button to use the
btn-lg class only on certain display sizes, or is there some kind of ‘auto size class’ that effectively results in btn-lg in some cases and regular buttons in others?