How do I customize twitter bootstrap's various input sizes without using !important?

前端 未结 3 991
小蘑菇
小蘑菇 2021-01-30 17:05

Bootstrap\'s input sizes only expand by width, whereas the buttons expand by both height and font size. (see pic) I\'m trying to customize the inputs to expand by height and fon

3条回答
  •  误落风尘
    2021-01-30 17:59

    If you're working off of the bootstrap .less files

    an easy solution would be to add an extra entry like:

    .form-fatter {
      // Set font for forms
      label,
      input,
      button,
      select,
      textarea {
        // Increase the default with 20%
        #font > .shorthand(@baseFontSize*1.2,normal,@baseLineHeight*1.2); 
      }
    }
    

    in your html

    ...

提交回复
热议问题