// - - - - - - - - - - - - - - - - - - - - - - - - - // Buttons // - - - - - - - - - - - - - - - - - - - - - - - - - @mixin CHAMELEON-forms-buttons { .#{$button-namespace} { @extend %font-family-primary; box-shadow: none; color: #fff; border: 0; border-radius: 0; cursor: pointer; height: 40px; display: inline-block; font-size: rem-calc(15px); font-weight: 600; line-height: 1em; margin: 0; padding: 12px 35px; position: relative; text-align: center; text-decoration: none; text-shadow: 0 1px 0 rgba(0, 0, 0, .1); transition: all .2s ease-in-out; user-select: none; appearance: none; &:hover { text-decoration: none; } &:focus { outline: 0; } &.is-loading { padding-right: 30px; padding-left: 40px; &:before { content: ""; position: absolute; top: 50%; left: 15px; margin-top: -5px; display: inline-block; width: 10px; height: 10px; border-width: 2px; border-style: solid; border-color: currentColor; border-right-color: transparent; border-radius: 50%; animation: 1s linear infinite btn-spin; } } &--small { padding: 7px 20px; font-size: rem-calc(12px); height: 30px; line-height: 1.2em; &.is-loading { padding-left: 30px; padding-right: 10px; &:before { left: 10px; } } } &--primary { background-color: $color-primary; border: 1px solid $color-primary; color: #fff; &:hover { background-color: lighten($color-primary, 5%); color: #fff; } &:active { background-color: darken($color-primary, 5%); color: #fff; } &.ghosted { border: 1px solid $color-primary; color: $color-primary; background-color: transparent; text-shadow: none; &:hover { background-color: $color-primary; color: #fff; } &:active { background-color: darken($color-primary, 5%); } } } &--secondary { background-color: $color-white; border: 1px solid $color-white; color: $color-primary; text-shadow: none; &:hover { background-color: lighten($color-white, 5%); color: $color-primary; } &:active { background-color: darken($color-white, 5%); color: $color-primary; } &.ghosted { background-color: transparent; border: 1px solid $color-white; color: $color-white; &:hover { background-color: $color-white; color: $color-primary; } &:active { background-color: darken($color-white, 5%); } } } &--tertiary { font-weight: 400; color: $color-primary; padding-right: 10px; padding-left: 0; @media #{$medium-up} { font-size: rem-calc(15px); } &:after { content: 'ยป'; color: inherit; right: -5px; transform: translateX(0) scale(.8); transition: transform 300ms cubic-bezier(0.155, 1.105, 0.295, 1.12); position: absolute; } &:hover:after { transform: translateX(5px) scale(1); } } &--neutral { background: $color-slate; border: 1px solid darken($color-slate , 3%); color: #fff; text-shadow: none; &:hover { background: lighten($color-slate, 5%); } &:active { background: darken($color-slate, 5%); } } &--disabled { cursor: not-allowed; opacity: .7; background: #d4d4d4; border: 1px solid darken(#d4d4d4, 10%); color: #444444; text-shadow: none; &:hover, &:active { background: #d4d4d4; color: #444444; border: 1px solid darken(#d4d4d4, 10%); } } } .#{$button-namespace}--google, .#{$button-namespace}--github { background: #fff; color: $color-silver; border: 1px solid $color-smoke; padding-left: 40px; padding-right: 15px; text-shadow: none; &:before { background-repeat: no-repeat; background-position: center center; position: absolute; display: inline-block; content: ""; width: 34px; height: 34px; top: 2px; left: 2px; } &--active, &:hover { background-color: $color-primary; border-color: darken($color-primary, 5%); color: #fff; } } .#{$button-namespace}--google { &:before { background-image: file-url('ui_icons/google.svg'); } &--active:before, &:hover:before { background-image: file-url('ui_icons/google--active.svg'); } } .#{$button-namespace}--github { &:before { background-image: file-url('ui_icons/github.svg'); } &--active:before, &:hover:before { background-image: file-url('ui_icons/github--active.svg'); } } .btn-group { .#{$button-namespace} { display: table; @media #{$medium-up} { display: inline-block; } + .#{$button-namespace} { margin-top: 5px; @media #{$medium-up} { margin-top: 0; } } } .#{$button-namespace} + .#{$button-namespace} { margin-left: 0; @media #{$medium-up} { margin-left: 10px; } } } } @keyframes btn-spin { 100%{ transform: rotate(360deg) } }