Bootstrap class: .form-control

<input class="form-control" type="text" placeholder="Default input">

Preview

Sass source

/* _forms.scss:7 */
.form-control {
  display: block;
  width: 100%;
  height: $input-height;
  padding: $input-padding-y $input-padding-x;
  font-size: $font-size-base;
  line-height: $input-line-height;
  color: $input-color;
  background-color: $input-bg;
  background-clip: padding-box;
  border: $input-border-width solid $input-border-color;

  // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
  @if $enable-rounded {
    // Manually use the if/else instead of the mixin to account for iOS override
    border-radius: $input-border-radius;
  } @else {
    // Otherwise undo the iOS default
    border-radius: 0;
  }

  @include box-shadow($input-box-shadow);
  @include transition($input-transition);

  // Unstyle the caret on `<select>`s in IE10+.
  &::-ms-expand {
    background-color: transparent;
    border: 0;
  }

  // Customize the `:focus` state to imitate native WebKit styles.
  @include form-control-focus();

  // Placeholder
  &::placeholder {
    color: $input-placeholder-color;
    // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
    opacity: 1;
  }

  // Disabled and read-only inputs
  //
  // HTML5 says that controls under a fieldset > legend:first-child won't be
  // disabled if the fieldset is disabled. Due to implementation difficulty, we
  // don't honor that edge case; we style them as disabled anyway.
  &:disabled,
  &[readonly] {
    background-color: $input-disabled-bg;
    // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
    opacity: 1;
  }
}

/* _forms.scss:293 */
.form-control {
  display: inline-block;
  width: auto; // Prevent labels from stacking above inputs in `.form-group`
  vertical-align: middle;
}

Uses variables

Code copied to the clipboard.

Copying failed

/* _forms.scss:7 */
$input-height
$input-padding-y
$input-padding-x
$font-size-base
$input-line-height
$input-color
$input-bg
$input-border-width
$input-border-color
$enable-rounded
$input-border-radius
$input-box-shadow
$input-transition
$input-placeholder-color
$input-disabled-bg

/* _forms.scss:293 */

More in Bootstrap Forms