discourse/app/assets/stylesheets/common/components/buttons.css.scss

181 lines
3.0 KiB
SCSS
Raw Normal View History

2013-02-05 13:16:51 -06:00
// --------------------------------------------------
// Buttons
// --------------------------------------------------
// Base
// --------------------------------------------------
.btn {
display: inline-block;
margin: 0;
padding: 6px 12px;
font-weight: 500;
font-size: 14px;
line-height: 18px;
text-align: center;
cursor: pointer;
&:active {
text-shadow: none;
}
&[disabled], &.disabled {
2013-02-05 13:16:51 -06:00
cursor: default;
opacity: 0.4;
}
2013-12-09 15:27:49 -06:00
.fa {
2013-02-05 13:16:51 -06:00
margin-right: 7px;
}
&.no-text {
2013-12-09 15:27:49 -06:00
.fa {
margin-right: 0;
line-height: 10px;
}
}
2013-02-05 13:16:51 -06:00
}
// Default button
// --------------------------------------------------
.btn {
2013-10-28 11:25:52 -05:00
border: none;
color: $primary;
2013-10-28 11:25:52 -05:00
font-weight: normal;
background: scale-color-diff();
2013-02-05 13:16:51 -06:00
&[href] {
color: $primary;
2013-02-05 13:16:51 -06:00
}
&:hover {
background: #aaa;
2013-10-28 11:25:52 -05:00
color: #fff;
2013-02-05 13:16:51 -06:00
}
&:active {
}
&[disabled] {
background: scale-color-diff();
&:hover { color: scale-color($primary, $lightness: 70%); }
cursor: not-allowed;
2013-02-05 13:16:51 -06:00
}
}
// Buttons used in admin panel
// --------------------------------------------------
.btn-admin {
text-align:left;
}
2013-02-05 13:16:51 -06:00
// Primary button
// --------------------------------------------------
.btn-primary {
2013-10-28 11:25:52 -05:00
border: none;
color: $secondary;
font-weight: normal;
color: #fff;
background: $tertiary;
2013-10-28 11:25:52 -05:00
2013-02-05 13:16:51 -06:00
&[href] {
color: $secondary;
2013-02-05 13:16:51 -06:00
}
&:hover {
color: #fff;
background: scale-color($tertiary, $lightness: -20%);
2013-02-05 13:16:51 -06:00
}
&:active {
@include linear-gradient(scale-color($tertiary, $lightness: -20%), scale-color($tertiary, $lightness: -10%));
color: #fff;
2013-02-05 13:16:51 -06:00
}
&[disabled] {
background: $tertiary;
2013-02-05 13:16:51 -06:00
}
2013-02-14 01:56:13 -06:00
}
2013-02-14 01:56:13 -06:00
// Danger button
// --------------------------------------------------
2013-02-14 01:56:13 -06:00
.btn-danger {
color: $secondary;
font-weight: normal;
background: $danger;
2013-02-14 01:56:13 -06:00
&[href] {
color: $secondary;
2013-02-14 01:56:13 -06:00
}
&:hover{
background: scale-color($danger, $lightness: -20%);
2013-02-14 01:56:13 -06:00
}
&:active {
@include linear-gradient(scale-color($danger, $lightness: -20%), $danger);
2013-02-14 01:56:13 -06:00
}
&[disabled] {
background: $danger;
2013-02-14 01:56:13 -06:00
}
2013-02-05 13:16:51 -06:00
}
// Social buttons
// --------------------------------------------------
.btn-social {
color: $secondary;
text-shadow: 0 1px 0 rgba($primary, 0.2);
@include box-shadow(inset 0 1px 0 rgba($primary, 0.1));
2013-02-05 13:16:51 -06:00
&[href] {
color: $secondary;
2013-02-05 13:16:51 -06:00
}
&:before {
margin-right: 7px;
font-family: zocial;
line-height: 0.9;
}
&.google, &.google_oauth2 {
2013-02-05 13:16:51 -06:00
background: $google;
&:before {
content: "G";
}
}
&.facebook {
background: $facebook;
&:before {
content: "f";
}
}
2013-05-23 15:40:50 -05:00
&.cas {
background: $cas;
}
2013-02-05 13:16:51 -06:00
&.twitter {
background: $twitter;
&:before {
content: "T";
}
}
&.yahoo {
background: $yahoo;
&:before {
content: "Y";
}
}
&.github {
background: $github;
&:before {
content: "g";
}
}
2013-02-05 13:16:51 -06:00
}
// Button Sizes
// --------------------------------------------------
// Small
.btn-small {
padding: 3px 6px;
font-size: 12px;
line-height: 16px;
}
// Large
.btn-large {
padding: 9px 18px;
font-size: 16px;
line-height: 20px;
2013-02-14 01:56:13 -06:00
}