/* Table of Contents ================================================== # Variables # Button # Sizes # Icons # Colors # Outlines # Links # Styles # Groups # Toolbars # Data Toggles # Media Queries */ /* # Variables ================================================== */ $onblack-colors: ( dark-haze: $color-dark-haze, haze: $color-haze, light-haze: $color-light-haze, white: $color-white ); $onwhite-colors: ( dark-black: $color-dark-black, black: $color-black, light-black: $color-light-black, dark-gray: $color-dark-gray, gray: $color-gray, light-gray: $color-light-gray, lime: $color-lime, green: $color-green, teal: $color-teal, blue: $color-blue, indigo: $color-indigo, purple: $color-purple, pink: $color-pink, red: $color-red, orange: $color-orange, yellow: $color-yellow, primary: $color-primary, secondary: $color-secondary, tertiary: $color-tertiary ); /* # Button ================================================== */ .btn { @include appearance(none); background: $color-light-haze; border: 1px solid $color-light-haze; border-radius: 2px; box-sizing: border-box; color: $color-black; cursor: pointer; display: inline-block; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-size: 11px; font-weight: bold; letter-spacing: 0; line-height: 1; margin: 0; padding: 15px 20px; text-align: center; text-decoration: none; text-rendering: geometricPrecision; text-transform: uppercase; touch-action: manipulation; @include transition(all 0.3s ease-in-out); vertical-align: middle; white-space: nowrap; } .btn:hover, .btn:active, .btn.active, .btn:focus, .open > .dropdown-toggle.btn { background: darken($color-light-haze, 2%); border-color: darken($color-light-haze, 2%); text-decoration: none; } .btn[disabled] { background: lighten($color-light-haze, 2%); border-color: lighten($color-light-haze, 2%); cursor: not-allowed; } /* # Sizes ================================================== */ .btn-large { font-size: 12px; padding: 19px 30px; } .btn-medium { padding: 10px 15px; } .btn-small { padding: 8px 15px; } .btn-mini { font-size: 9px; padding: 7px 10px 6px 10px; } .btn-block { display: block; min-width: 100%; padding-right: 0; padding-left: 0; width: 100%; } /* # Icons ================================================== */ .btn-icon { font-size: 18px; min-width: 42px; padding: 11px 15px 10px 15px; } .btn-icon.btn-large { font-size: 23px; min-width: 52px; padding-bottom: 12px; padding-top: 13px; } .btn-icon.btn-medium { font-size: 15px; min-width: 34px; padding: 8px 10px 7px 10px; } .btn-icon.btn-small { font-size: 14px; min-width: 30px; padding: 6px 7px; } .btn-icon.btn-mini { font-size: 11px; min-width: 25px; padding: 5px 6px; } /* # Colors ================================================== */ @each $name, $color in $onblack-colors { .btn-#{$name} { background: $color; border-color: $color; } .btn-#{$name}:hover, .btn-#{$name}:active, .btn-#{$name}.active, .btn-#{$name}:focus, .open > .dropdown-toggle.btn.btn-#{$name} { background: darken($color, 2%); border-color: darken($color, 2%); } .btn-#{$name}[disabled] { background: lighten($color, 2%); border-color: lighten($color, 2%); } } @each $name, $color in $onwhite-colors { .btn-#{$name} { background: $color; border-color: $color; color: $color-white; } .btn-#{$name}:hover, .btn-#{$name}:active, .btn-#{$name}.active, .btn-#{$name}:focus, .open > .dropdown-toggle.btn.btn-#{$name} { background: darken($color, 2%); border-color: darken($color, 2%); } .btn-#{$name}[disabled] { background: lighten($color, 2%); border-color: lighten($color, 2%); } } /* # Outlines ================================================== */ .btn-outline, .btn-outline[disabled] { background: $color-transparent; color: $color-dark-gray; } .btn-outline:hover, .btn-outline:active, .btn-outline.active, .btn-outline:focus, .open > .dropdown-toggle.btn.btn-outline { background: darken($color-light-haze, 2%); color: $color-black; } @each $name, $color in $onblack-colors { .btn-outline.btn-#{$name}, .btn-outline.btn-#{$name}[disabled] { color: $color; } .btn-outline.btn-#{$name}:hover, .btn-outline.btn-#{$name}:active, .btn-outline.btn-#{$name}.active, .btn-outline.btn-#{$name}:focus, .open > .dropdown-toggle.btn.btn-outline.btn-#{$name} { background: darken($color, 2%); color: $color-black; } } @each $name, $color in $onwhite-colors { .btn-outline.btn-#{$name}, .btn-outline.btn-#{$name}[disabled] { color: $color; } .btn-outline.btn-#{$name}:hover, .btn-outline.btn-#{$name}:active, .btn-outline.btn-#{$name}.active, .btn-outline.btn-#{$name}:focus, .open > .dropdown-toggle.btn.btn-outline.btn-#{$name} { background: darken($color, 2%); color: $color-white; } } /* # Links ================================================== */ .btn-link { background: $color-transparent; border-color: $color-transparent; border-radius: 0; color: $color-gray; padding: 0; } .btn-link:hover, .btn-link:active, .btn-link.active, .btn-link:focus, .btn-link[disabled] { background: $color-transparent; border-color: $color-transparent; color: $color-black; } /* # Styles ================================================== */ .btn-circle { border-radius: 500px; } /* # Groups ================================================== */ .btn-group, .btn-group-vertical { display: inline-block; font-size: 0; position: relative; white-space: nowrap; vertical-align: middle; } .btn-group + .btn-group { margin-left: 5px; } .btn-group.pull-right + .btn-group.pull-right { margin-right: 10px; margin-left: 0; } .btn-group > .dropdown-toggle:not(:first-child) { border-left-color: rgba(0,0,0,0.1); } .btn-group > .btn, .btn-group-vertical > .btn { border-radius: 0; position: relative; } .btn-group > .btn { margin-left: -1px; } .btn-group > .btn:first-child { border-bottom-left-radius: 2px; border-top-left-radius: 2px; margin-left: 0; } .btn-group > .btn:last-child, .btn-group > .dropdown-toggle { border-bottom-right-radius: 2px; border-top-right-radius: 2px; } .btn-group > .btn:active, .btn-group > .btn.active, .btn-group > .btn:hover, .btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group-vertical > .btn:hover, .btn-group-vertical > .btn:active, .btn-group-vertical > .btn.active, .btn-group-vertical > .btn:focus { z-index: 2; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn { border-radius: 0; display: block; margin-left: 0; margin-top: -1px; max-width: 100%; width: 100%; } .btn-group-vertical > .btn:first-child { border-top-right-radius: 2px; border-top-left-radius: 2px; margin-left: 0; } .btn-group-vertical > .btn:last-child, .btn-group-vertical > .dropdown-toggle { border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; } .btn-group-block { border-collapse: separate; display: table; table-layout: fixed; width: 100%; } .btn-group-block > .btn, .btn-group-block > .btn-group { display: table-cell; float: none; width: 1%; } .btn-group-block > .btn-group .btn { width: 100%; } .btn-group-block > .btn { border-right-width: 0; } .btn-group-block > .btn:last-child { border-right-width: 1px; } /* # Toolbars ================================================== */ .btn-toolbar { font-size: 0; margin-bottom: 10px; margin-top: 10px; } .btn-toolbar > .btn + .btn, .btn-toolbar > .btn-group + .btn, .btn-toolbar > .btn + .btn-group { margin-left: 5px; } /* # Data Toggles ================================================== */ [data-toggle="buttons"] > .btn > input[type="radio"], [data-toggle="buttons"] > .btn > input[type="checkbox"] { opacity: 0; position: absolute; z-index: -1; } /* # Media Queries ================================================== */ @media only screen and (max-width: 767px) { .btn-group-responsive > .btn, .btn-group-responsive > .btn-group, .btn-group-responsive > .btn-group > .btn { border-radius: 0; display: block; margin-left: 0; margin-top: -1px; max-width: 100%; width: 100%; } .btn-group-responsive > .btn:first-child { border-top-right-radius: 2px; border-top-left-radius: 2px; margin-left: 0; } .btn-group-responsive > .btn:last-child, .btn-group-responsive > .dropdown-toggle { border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; } .btn-group-vertical-responsive > .btn, .btn-group-vertical-responsive > .btn-group, .btn-group-vertical-responsive > .btn-group > .btn { display: inline-block; margin-left: -1px; margin-top: 0; max-width: initial; width: initial; } .btn-group-vertical-responsive > .btn:first-child { border-bottom-left-radius: 2px; border-top-right-radius: 0; border-top-left-radius: 2px; } .btn-group-vertical-responsive > .btn:last-child, .btn-group-vertical-responsive > .dropdown-toggle { border-bottom-right-radius: 2px; border-bottom-left-radius: 0; border-top-right-radius: 2px; } } @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and ( min--moz-device-pixel-ratio: 2), only screen and ( -o-min-device-pixel-ratio: 2/1), only screen and ( min-device-pixel-ratio: 2), only screen and ( min-resolution: 192dpi), only screen and ( min-resolution: 2dppx) { .btn-group > .dropdown-toggle:not(:first-child) { border-left-width: 0.5px; } }