// // Forms - sizing - material - mirrors bootstrap/forms.less with custom sizing // // LEAVE THIS IDENTICAL TO THE BOOTSTRAP FILE - DO NOT CUSTOMIZE HERE. // // NOTE: this is intentionally kept structurally _identical_ to the bootstrap/forms.less file to make it easier // to identify differences in sizing approaches to form inputs. // -------------------------------------------------- legend { margin-bottom: @md-input-line-height-computed; font-size: (@md-input-font-size-base * 1.5); } // Adjust output element output { padding-top: (@md-input-padding-base-vertical + 1); font-size: @md-input-font-size-base; line-height: @md-input-line-height-base; } .form-control { height: @md-input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) padding: @md-input-padding-base-vertical @md-input-padding-base-horizontal; font-size: @md-input-font-size-base; line-height: @md-input-line-height-base; } // Special styles for iOS temporal inputs // // In Mobile Safari, setting `display: block` on temporal inputs causes the // text within the input to become vertically misaligned. As a workaround, we // set a pixel line-height that matches the given height of the input, but only // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848 // // Note that as of 8.3, iOS doesn't support `datetime` or `week`. @media screen and (-webkit-min-device-pixel-ratio: 0) { input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { &.form-control { line-height: @md-input-height-base; } &.input-sm, .input-group-sm & { line-height: @md-input-height-small; } &.input-lg, .input-group-lg & { line-height: @md-input-height-large; } } } .radio, .checkbox { label { min-height: @md-input-line-height-computed; // Ensure the input doesn't jump when there is no text } } // Static form control text // // Apply class to a `p` element to make any string of text align with labels in // a horizontal form layout. .form-control-static { // Size it appropriately next to real form controls padding-top: (@md-input-padding-base-vertical + 1); padding-bottom: (@md-input-padding-base-vertical + 1); min-height: (@md-input-line-height-computed + @md-input-font-size-base); } // Form control sizing // // Relative text size, padding, and border-radii changes for form controls. For // horizontal sizing, wrap controls in the predefined grid classes. `