From d42c8b528eb595101954f478e0024e3f079f6fbf Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 22 Mar 2017 19:19:26 +0100 Subject: first implementation of fun stats site --- templates/assets/bootstrap/scss/_input-group.scss | 175 ++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 templates/assets/bootstrap/scss/_input-group.scss (limited to 'templates/assets/bootstrap/scss/_input-group.scss') diff --git a/templates/assets/bootstrap/scss/_input-group.scss b/templates/assets/bootstrap/scss/_input-group.scss new file mode 100644 index 0000000..49cdf28 --- /dev/null +++ b/templates/assets/bootstrap/scss/_input-group.scss @@ -0,0 +1,175 @@ +// +// Base styles +// + +.input-group { + position: relative; + display: flex; + width: 100%; + + .form-control { + // Ensure that the input is always above the *appended* addon button for + // proper border colors. + position: relative; + z-index: 2; + flex: 1 1 auto; + // Add width 1% and flex-basis auto to ensure that button will not wrap out + // the column. Applies to IE Edge+ and Firefox. Chrome does not require this. + width: 1%; + margin-bottom: 0; + + // Bring the "active" form control to the front + @include hover-focus-active { + z-index: 3; + } + } +} + +.input-group-addon, +.input-group-btn, +.input-group .form-control { + // Vertically centers the content of the addons within the input group + display: flex; + align-items: center; + + &:not(:first-child):not(:last-child) { + @include border-radius(0); + } +} + +.input-group-addon, +.input-group-btn { + white-space: nowrap; + vertical-align: middle; // Match the inputs +} + + +// Sizing options +// +// Remix the default form control sizing classes into new ones for easier +// manipulation. + +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + @extend .form-control-lg; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + @extend .form-control-sm; +} + + +// +// Text input groups +// + +.input-group-addon { + padding: $input-padding-y $input-padding-x; + margin-bottom: 0; // Allow use of