mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 12:51:41 -05:00
184 lines
3.4 KiB
SCSS
184 lines
3.4 KiB
SCSS
// --------------------------------------------------
|
|
// Buttons
|
|
// --------------------------------------------------
|
|
|
|
// Base
|
|
// --------------------------------------------------
|
|
|
|
|
|
.btn {
|
|
display: inline-block;
|
|
margin: 0;
|
|
padding: 6px 12px;
|
|
font-weight: 500;
|
|
font-size: 1em;
|
|
line-height: 18px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all .25s;
|
|
|
|
&:active {
|
|
text-shadow: none;
|
|
}
|
|
&[disabled], &.disabled {
|
|
cursor: default;
|
|
opacity: 0.4;
|
|
}
|
|
.fa {
|
|
margin-right: 7px;
|
|
}
|
|
&.no-text {
|
|
.fa {
|
|
margin-right: 0;
|
|
line-height: 10px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.btn.hidden {
|
|
display: none;
|
|
}
|
|
|
|
// Default button
|
|
// --------------------------------------------------
|
|
|
|
.btn {
|
|
border: none;
|
|
color: $primary;
|
|
font-weight: normal;
|
|
background: dark-light-diff($primary, $secondary, 90%, -65%);
|
|
|
|
&[href] {
|
|
color: $primary;
|
|
}
|
|
&:hover {
|
|
background: dark-light-diff($primary, $secondary, 65%, -75%);
|
|
color: #fff;
|
|
}
|
|
&[disabled], &.disabled {
|
|
background: dark-light-diff($primary, $secondary, 90%, -60%);
|
|
&:hover { color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 30%)); }
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
// Primary button
|
|
// --------------------------------------------------
|
|
|
|
.btn-primary {
|
|
border: none;
|
|
font-weight: normal;
|
|
color: dark-light-choose(#fff, scale-color($primary, $lightness: 60%));
|
|
background: $tertiary;
|
|
|
|
&[href] {
|
|
color: $secondary;
|
|
}
|
|
&:hover {
|
|
color: #fff;
|
|
background: dark-light-choose(scale-color($tertiary, $lightness: -20%), scale-color($tertiary, $lightness: -20%));
|
|
}
|
|
&:active {
|
|
@include linear-gradient(scale-color($tertiary, $lightness: -20%), scale-color($tertiary, $lightness: -10%));
|
|
color: #fff;
|
|
}
|
|
&[disabled], &.disabled {
|
|
background: $tertiary;
|
|
}
|
|
}
|
|
|
|
// Danger button
|
|
// --------------------------------------------------
|
|
|
|
.btn-danger {
|
|
color: $secondary;
|
|
font-weight: normal;
|
|
background: $danger;
|
|
&[href] {
|
|
color: $secondary;
|
|
}
|
|
&:hover{
|
|
background: scale-color($danger, $lightness: -20%);
|
|
}
|
|
&:active {
|
|
@include linear-gradient(scale-color($danger, $lightness: -20%), $danger);
|
|
}
|
|
&[disabled], &.disabled {
|
|
background: $danger;
|
|
}
|
|
}
|
|
|
|
// Social buttons
|
|
// --------------------------------------------------
|
|
|
|
.btn-social {
|
|
color: $secondary;
|
|
text-shadow: 0 1px 0 rgba($primary, 0.2);
|
|
box-shadow: inset 0 1px 0 rgba(0,0,0, 0.1);
|
|
&[href] {
|
|
color: $secondary;
|
|
}
|
|
&:before {
|
|
margin-right: 9px;
|
|
font-family: FontAwesome;
|
|
font-size: 17px;
|
|
}
|
|
&.google, &.google_oauth2 {
|
|
background: $google;
|
|
&:before {
|
|
content: $fa-var-google;
|
|
}
|
|
}
|
|
&.instagram {
|
|
background: $instagram;
|
|
&:before {
|
|
content: $fa-var-instagram;
|
|
}
|
|
}
|
|
&.facebook {
|
|
background: $facebook;
|
|
&:before {
|
|
content: $fa-var-facebook;
|
|
}
|
|
}
|
|
&.cas {
|
|
background: $cas;
|
|
}
|
|
&.twitter {
|
|
background: $twitter;
|
|
&:before {
|
|
content: $fa-var-twitter;
|
|
}
|
|
}
|
|
&.yahoo {
|
|
background: $yahoo;
|
|
&:before {
|
|
content: $fa-var-yahoo;
|
|
}
|
|
}
|
|
&.github {
|
|
background: $github;
|
|
&:before {
|
|
content: $fa-var-github;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Button Sizes
|
|
// --------------------------------------------------
|
|
|
|
// Small
|
|
|
|
.btn-small {
|
|
padding: 3px 6px;
|
|
font-size: 0.857em;
|
|
line-height: 16px;
|
|
}
|
|
|
|
// Large
|
|
|
|
.btn-large {
|
|
padding: 9px 18px;
|
|
font-size: 1.143em;
|
|
line-height: 20px;
|
|
}
|