123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648 |
- // Core button style
- // Note that these styles include methods to render buttons the same x-browser, described here:
- // http: //cbjdigital.com/blog/2010/08/bulletproof_css_input_button_heights
- // input[type=submit],
- // input[type=reset],
- // input[type=button],
- .button {
- border-radius: 3px;
- font-family: Open Sans,Arial,sans-serif;
- width: auto;
- height: 2.4em;
- padding: 0 1em;
- font-size: 0.9em;
- font-weight: normal;
- vertical-align: middle;
- display: inline-block;
- background-color: $color-button;
- border: 1px solid $color-button;
- color: $color-white;
- text-decoration: none;
- text-transform: uppercase;
- white-space: nowrap;
- position: relative;
- overflow: hidden;
- box-sizing: border-box;
- -webkit-font-smoothing: auto;
- // stylelint-disable-next-line property-no-vendor-prefix
- -moz-appearance: none;
- transition: background-color 0.1s ease;
- &:hover {
- color: $color-teal;
- }
- &.yes {
- background-color: $color-button-yes;
- border: 1px solid $color-button-yes;
- &.button-secondary {
- border: 1px solid $color-button-yes;
- color: $color-button-yes;
- background-color: transparent;
- }
- &:hover {
- color: $color-white;
- border-color: transparent;
- background-color: $color-button-yes-hover;
- }
- &.button-nobg:hover {
- color: $color-button-yes;
- background-color: transparent;
- }
- }
- &.warning {
- background-color: $color-button-warning;
- border: 1px solid $color-button-warning;
- &.button-secondary {
- border: 1px solid $color-button-warning;
- color: $color-button-warning;
- background-color: transparent;
- }
- &:hover {
- color: $color-white;
- border-color: transparent;
- background-color: $color-button-warning-hover;
- }
- &.button-nobg:hover {
- color: $color-button-warning;
- background-color: transparent;
- }
- }
- &.no,
- &.serious {
- background-color: $color-button-no;
- border: 1px solid $color-button-no;
- &.button-secondary {
- border: 1px solid $color-button-no;
- color: $color-button-no;
- background-color: transparent;
- }
- &:hover {
- color: $color-white;
- border-color: transparent;
- background-color: $color-button-no-hover;
- }
- &.button-nobg:hover {
- color: $color-button-no;
- background-color: transparent;
- }
- }
- &.button-nobg {
- border: 0;
- background-color: transparent;
- }
- &.bicolor {
- border: 1px solid transparent;
- padding-left: 3.5em;
- &:before { // iconfont
- font-size: 1rem;
- position: absolute;
- left: 0;
- top: 0;
- width: 2em;
- line-height: 1.85em;
- height: 100%;
- text-align: center;
- background-color: rgba(0, 0, 0, 0.2);
- display: block;
- border-top-left-radius: inherit;
- border-bottom-left-radius: inherit;
- }
- .icon-wrapper {
- background-color: rgba(0, 0, 0, 0.2);
- display: block;
- position: absolute;
- left: 0;
- top: 0;
- width: 3em;
- line-height: 1.85em;
- height: 100%;
- text-align: center;
- border-top-left-radius: inherit;
- border-bottom-left-radius: inherit;
- }
- &.button--icon {
- &:before {
- display: none; // TODO: remove once the icon font styles are gone
- }
- .icon {
- @include svg-icon(1rem);
- padding: 0.75em;
- }
- }
- &.button--icon-flipped {
- .icon {
- transform: scaleX(-1);
- }
- }
- &.button-secondary {
- border: 1px solid rgba(0, 0, 0, 0.2);
- }
- }
- &.button-small.bicolor {
- padding-left: 3.5em;
- .icon-wrapper {
- width: 2em;
- }
- &.button--icon .icon {
- @include svg-icon(0.9rem);
- padding: 0.25em;
- }
- }
- // + input[type=submit],
- // + input[type=reset],
- // + input[type=button],
- + .button {
- // + button {
- margin-left: 1em;
- }
- // A completely unstyled button
- &.unbutton {
- border-radius: 0;
- width: auto;
- height: auto;
- padding: 0;
- font-size: inherit;
- font-weight: normal;
- vertical-align: middle;
- display: inline;
- background-color: transparent;
- border: 0;
- color: inherit;
- text-decoration: none;
- text-transform: uppercase;
- white-space: nowrap;
- position: relative;
- overflow: hidden;
- box-sizing: border-box;
- -webkit-font-smoothing: auto;
- // stylelint-disable-next-line property-no-vendor-prefix
- -moz-appearance: none;
- }
- &:hover {
- background-color: $color-button-hover;
- color: $color-white;
- border-color: transparent;
- &.hover-no {
- background-color: $color-button-no;
- }
- }
- &.button-longrunning {
- span { // iconfont
- @include transition(all 0.3s ease);
- transform: scale(0.9);
- display: inline-block;
- height: 0.9em;
- position: relative;
- opacity: 0;
- width: 0;
- visibility: hidden;
- text-align: center;
- padding-right: 0;
- }
- em {
- font-style: normal;
- }
- &.button-longrunning-active span { // iconfont
- transform: scale(1);
- visibility: visible;
- width: 1em;
- height: 1em;
- opacity: 0.8;
- padding-right: 0.5em;
- }
- span.icon-spinner:after { // iconfont
- text-align: center;
- position: absolute;
- left: 0;
- margin: 0;
- line-height: 1em;
- display: inline-block;
- font-size: 1em;
- }
- svg.icon-spinner {
- @include transition(all 0.3s ease);
- display: none;
- }
- &.button-longrunning-active svg.icon-spinner {
- @include svg-icon();
- transform: scale(1);
- display: inline-block;
- opacity: 0.8;
- padding: 0;
- margin-right: 0.5em;
- }
- &.button-longrunning-active .button-longrunning__icon {
- display: none;
- }
- }
- &:disabled,
- &[disabled],
- &.disabled {
- background-color: $color-grey-3;
- border-color: $color-grey-3;
- color: $color-grey-2;
- cursor: default;
- }
- &.button-secondary:disabled,
- &.button-secondary[disabled],
- &.button-secondary.disabled {
- background-color: $color-white;
- border-color: $color-grey-3;
- color: $color-grey-3;
- }
- &.button-nostroke {
- border: 0;
- }
- &.button--icon {
- .icon {
- @include svg-icon(1.5em);
- }
- }
- &.button-strokeonhover {
- border: 1px solid transparent;
- &:hover {
- border-color: $color-grey-2;
- }
- &.button-nobg:hover {
- background-color: transparent;
- }
- }
- &.text-notransform {
- text-transform: initial;
- }
- &.button--icon {
- .icon {
- @include svg-icon(1.5em);
- }
- }
- @include media-breakpoint-up(sm) {
- font-size: 0.95em;
- padding: 0 1.4em;
- height: 3em;
- &.bicolor {
- padding-left: 3.7em;
- &:before {
- width: 2em;
- line-height: 2.2em;
- font-size: 1.1rem;
- }
- }
- &.button-small.bicolor {
- // line-height: 2.2em;
- padding-left: 3em;
- &:before {
- width: 1.8em;
- line-height: 1.65em;
- }
- }
- }
- }
- .button-small {
- padding: 0 0.8em;
- height: 2em;
- font-size: 0.95em;
- }
- .button-secondary {
- color: $color-button;
- background-color: transparent;
- }
- // Buttons which are only an icon
- .button.icon.text-replace { // iconfont
- font-size: 0; // unavoidable duplication of setting in icons.scss
- width: 1.8rem;
- height: 1.8rem;
- &:before {
- line-height: 1.7em;
- }
- @include media-breakpoint-up(sm) {
- width: 2.2rem;
- height: 2.2rem;
- &:before {
- line-height: 2.1em;
- }
- &.button-small {
- height: 1.8rem;
- width: 1.8rem;
- // stylelint-disable-next-line max-nesting-depth
- &:before {
- line-height: 1.7em;
- }
- }
- }
- }
- .button--icon.text-replace {
- font-size: 0;
- text-align: center;
- .icon {
- font-size: initial;
- @include svg-icon(1rem, middle);
- padding: 0.5em;
- }
- &.button-small {
- line-height: 1.7rem;
- .icon {
- padding: 0.25em;
- }
- }
- @include media-breakpoint-up(sm) {
- width: 2.2rem;
- height: 2.2rem;
- &.button-small {
- height: 1.8rem;
- width: 1.8rem;
- }
- }
- }
- button.button.bicolor .icon-wrapper {
- line-height: 1.65em; // work around differences in a and button elements
- }
- .button-neutral {
- color: $color-grey-2;
- &:hover {
- color: $color-teal;
- }
- }
- .yes {
- background-color: $color-button-yes;
- border: 1px solid $color-button-yes;
- &.button-secondary {
- border: 1px solid $color-button-yes;
- color: $color-button-yes;
- background-color: transparent;
- }
- &:hover {
- color: $color-white;
- border-color: transparent;
- background-color: $color-button-yes-hover;
- }
- &.button-nobg:hover {
- color: $color-button-yes;
- background-color: transparent;
- }
- }
- .no,
- .serious {
- background-color: $color-button-no;
- border: 1px solid $color-button-no;
- &.button-secondary {
- border: 1px solid $color-button-no;
- color: $color-button-no;
- background-color: transparent;
- }
- &:hover {
- color: $color-white;
- border-color: transparent;
- background-color: $color-button-no-hover;
- }
- &.button-nobg:hover {
- color: $color-button-no;
- background-color: transparent;
- }
- }
- .button-nobg {
- border: 0;
- background-color: transparent;
- }
- .bicolor {
- border: 0;
- padding-left: 3.5em;
- &:before {
- font-size: 1rem;
- position: absolute;
- left: 0;
- top: 0;
- width: 2em;
- line-height: 1.85em;
- height: 100%;
- text-align: center;
- background-color: rgba(0, 0, 0, 0.2);
- display: block;
- }
- }
- .button-small.bicolor {
- padding-left: 3.5em;
- &:before {
- width: 2em;
- font-size: 0.8rem;
- line-height: 1.65em;
- }
- }
- a.button {
- line-height: 2.4em;
- height: auto;
- &.button-small {
- line-height: 1.85em;
- }
- @include media-breakpoint-up(sm) {
- line-height: 2.9em;
- }
- }
- // Special styles to counteract Firefox's completely unwarranted assumptions about button styles
- input[type=submit],
- input[type=reset],
- input[type=button],
- button {
- padding: 0 1em;
- @include media-breakpoint-up(sm) {
- &.button-small {
- height: 2em;
- }
- }
- }
- .button-group {
- @include clearfix;
- input[type=submit],
- input[type=reset],
- input[type=button],
- .button,
- button {
- border-radius: 0;
- float: left;
- margin-right: 1px;
- margin-left: 0;
- &:only-child {
- border-radius: 3px;
- }
- &:first-child {
- border-radius: 3px 0 0 3px;
- }
- &:last-child {
- border-radius: 0 3px 3px 0;
- margin-right: 0;
- }
- }
- &.button-group-square {
- &,
- input[type=submit],
- input[type=reset],
- input[type=button],
- .button,
- button {
- border-radius: 0;
- }
- }
- }
- .multiple {
- padding: 0;
- max-width: 1024px - 50px;
- overflow: hidden;
- > li {
- @include row();
- border-radius: 2px;
- position: relative;
- overflow: hidden;
- background-color: $color-white;
- padding: 1em 10em 1em 1.5em; // 10em padding leaves room for controls
- margin-bottom: 1em;
- border: 1px solid lighten($color-grey-4, 3%); // really trying to avoid creating more greys, but this one is better than grey 4 or 5
- }
- &.moving {
- position: relative;
- }
- li.moving {
- position: absolute;
- width: 100%;
- }
- fieldset {
- padding-top: 0;
- padding-bottom: 0;
- }
- // Object controls
- .controls {
- position: absolute;
- z-index: 1;
- right: 1em;
- top: 1em;
- color: $color-white;
- li {
- float: left;
- margin-right: 1px;
- &:last-child {
- margin-right: 0;
- }
- }
- .disabled {
- display: none;
- visibility: hidden;
- }
- }
- }
- // wrapper around add button for multiple objects
- .add {
- font-weight: 700;
- cursor: pointer;
- margin-top: 0;
- margin-bottom: 0;
- padding-top: 1em;
- padding-bottom: 2em;
- clear: both;
- }
|