2013-02-05 14:16:51 -05:00
|
|
|
// --------------------------------------------------
|
|
|
|
// Buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Base
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
display: inline-block;
|
|
|
|
margin: 0;
|
|
|
|
padding: 6px 12px;
|
|
|
|
font-weight: 500;
|
2018-01-12 17:27:38 -05:00
|
|
|
font-size: $font-0;
|
2018-09-19 08:37:04 -04:00
|
|
|
line-height: $line-height-small;
|
2013-02-05 14:16:51 -05:00
|
|
|
text-align: center;
|
|
|
|
cursor: pointer;
|
2018-06-08 05:49:31 -04:00
|
|
|
transition: all 0.25s;
|
2018-09-19 08:37:04 -04:00
|
|
|
box-sizing: border-box;
|
2018-09-19 09:08:03 -04:00
|
|
|
min-height: 30px;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
transition: color 0.25s;
|
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&:active,
|
|
|
|
&.btn-active {
|
2013-02-05 14:16:51 -05:00
|
|
|
text-shadow: none;
|
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&[disabled],
|
|
|
|
&.disabled {
|
2013-02-05 14:16:51 -05:00
|
|
|
cursor: default;
|
|
|
|
opacity: 0.4;
|
|
|
|
}
|
2013-12-09 16:27:49 -05:00
|
|
|
.fa {
|
2013-02-05 14:16:51 -05:00
|
|
|
margin-right: 7px;
|
|
|
|
}
|
2013-05-07 14:25:41 -04:00
|
|
|
&.no-text {
|
2013-12-09 16:27:49 -05:00
|
|
|
.fa {
|
2013-05-07 14:25:41 -04:00
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
|
2014-07-25 17:08:54 -04:00
|
|
|
.btn.hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2013-02-05 14:16:51 -05:00
|
|
|
// Default button
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn {
|
2013-10-28 12:25:52 -04:00
|
|
|
border: none;
|
2014-05-06 01:50:51 -04:00
|
|
|
color: $primary;
|
2013-10-28 12:25:52 -04:00
|
|
|
font-weight: normal;
|
2018-06-08 05:49:31 -04:00
|
|
|
background: $primary-low;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: $primary-high;
|
|
|
|
}
|
2014-02-12 23:06:49 -05:00
|
|
|
|
2013-02-05 14:16:51 -05:00
|
|
|
&[href] {
|
2014-05-06 01:50:51 -04:00
|
|
|
color: $primary;
|
2018-09-19 08:37:04 -04:00
|
|
|
min-height: unset; // ovverides button defaults
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2018-10-04 17:15:37 -04:00
|
|
|
.discourse-no-touch & {
|
|
|
|
// only allow hover on no-touch devices
|
|
|
|
&:hover,
|
|
|
|
&.btn-hover {
|
|
|
|
background: $primary-medium;
|
|
|
|
color: $secondary;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: $secondary-very-high;
|
|
|
|
}
|
2018-10-04 17:15:37 -04:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&[disabled],
|
|
|
|
&.disabled {
|
|
|
|
background: $primary-low;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: $primary-medium;
|
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&:hover {
|
|
|
|
color: dark-light-choose($primary-low-mid, $secondary-high);
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: $primary-low-mid;
|
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
}
|
2014-02-12 23:06:49 -05:00
|
|
|
cursor: not-allowed;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2017-05-11 14:47:08 -04:00
|
|
|
|
2017-07-27 15:03:41 -04:00
|
|
|
.d-icon {
|
2018-06-08 05:49:31 -04:00
|
|
|
line-height: $line-height-medium; // Match button text line-height
|
2017-05-11 14:47:08 -04:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Primary button
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn-primary {
|
2013-10-28 12:25:52 -04:00
|
|
|
border: none;
|
2013-10-28 13:46:59 -04:00
|
|
|
font-weight: normal;
|
2017-11-27 18:30:12 -05:00
|
|
|
color: $secondary;
|
2015-08-18 16:20:07 -04:00
|
|
|
background: $tertiary;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: currentColor;
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
&[href] {
|
2014-05-06 01:50:51 -04:00
|
|
|
color: $secondary;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2018-10-04 17:15:37 -04:00
|
|
|
.discourse-no-touch & {
|
|
|
|
// only allow hover on no-touch devices
|
|
|
|
&:hover,
|
|
|
|
&.btn-hover {
|
|
|
|
background: dark-light-choose(
|
|
|
|
scale-color($tertiary, $lightness: -20%),
|
|
|
|
scale-color($tertiary, $lightness: 20%)
|
|
|
|
);
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: currentColor;
|
|
|
|
}
|
2018-10-04 17:15:37 -04:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&:active,
|
|
|
|
&.btn-active {
|
2018-08-31 06:14:41 -04:00
|
|
|
@include linear-gradient(
|
|
|
|
scale-color($tertiary, $lightness: -20%),
|
|
|
|
$tertiary
|
|
|
|
);
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&[disabled],
|
|
|
|
&.disabled {
|
2014-05-06 01:50:51 -04:00
|
|
|
background: $tertiary;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: currentColor;
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2013-02-14 02:56:13 -05:00
|
|
|
}
|
2013-02-14 02:47:19 -05:00
|
|
|
|
2013-02-14 02:56:13 -05:00
|
|
|
// Danger button
|
|
|
|
// --------------------------------------------------
|
2013-02-14 02:47:19 -05:00
|
|
|
|
2013-02-14 02:56:13 -05:00
|
|
|
.btn-danger {
|
2014-05-06 01:50:51 -04:00
|
|
|
color: $secondary;
|
2013-10-28 13:46:59 -04:00
|
|
|
font-weight: normal;
|
2014-05-06 01:50:51 -04:00
|
|
|
background: $danger;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: $danger-low;
|
|
|
|
}
|
2013-02-14 02:56:13 -05:00
|
|
|
&[href] {
|
2014-05-06 01:50:51 -04:00
|
|
|
color: $secondary;
|
2013-02-14 02:56:13 -05:00
|
|
|
}
|
2018-10-04 17:15:37 -04:00
|
|
|
.discourse-no-touch & {
|
|
|
|
// only allow hover on no-touch devices
|
|
|
|
&:hover,
|
|
|
|
&.btn-hover {
|
|
|
|
background: dark-light-choose(
|
|
|
|
scale-color($danger, $lightness: -20%),
|
|
|
|
scale-color($danger, $lightness: 20%)
|
|
|
|
);
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: $danger-low;
|
|
|
|
}
|
2018-10-04 17:15:37 -04:00
|
|
|
}
|
2013-02-14 02:56:13 -05:00
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&:active,
|
|
|
|
&.btn-active {
|
2014-05-06 01:50:51 -04:00
|
|
|
@include linear-gradient(scale-color($danger, $lightness: -20%), $danger);
|
2013-02-14 02:56:13 -05:00
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&[disabled],
|
|
|
|
&.disabled {
|
2014-05-06 01:50:51 -04:00
|
|
|
background: $danger;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
|
|
|
color: $danger-low;
|
|
|
|
}
|
2013-02-14 02:56:13 -05:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Social buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn-social {
|
2019-02-01 06:01:59 -05:00
|
|
|
.d-icon {
|
|
|
|
color: #fff;
|
|
|
|
}
|
2018-01-22 21:19:38 -05:00
|
|
|
color: #fff;
|
2018-11-22 10:00:32 -05:00
|
|
|
background: #666;
|
2018-01-22 21:19:38 -05:00
|
|
|
&:hover {
|
|
|
|
color: #fff;
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
&[href] {
|
2014-05-06 01:50:51 -04:00
|
|
|
color: $secondary;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
&:before {
|
2015-07-21 01:46:33 -04:00
|
|
|
margin-right: 9px;
|
2018-02-20 07:29:43 -05:00
|
|
|
font-size: $font-0;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&.google_oauth2 {
|
2013-02-05 14:16:51 -05:00
|
|
|
background: $google;
|
2018-10-24 22:11:19 -04:00
|
|
|
color: #333;
|
|
|
|
border: 1px solid $primary-low;
|
2018-11-26 16:49:57 -05:00
|
|
|
// non-FA SVG icon for Google in login-buttons.hbs
|
|
|
|
.d-icon {
|
|
|
|
opacity: 0.9;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
|
|
|
color: currentColor;
|
|
|
|
background: darken($google, 5%);
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2016-02-24 20:21:59 -05:00
|
|
|
&.instagram {
|
|
|
|
background: $instagram;
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
|
|
|
background: darken($instagram, 15%);
|
|
|
|
}
|
2016-02-24 20:21:59 -05:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
&.facebook {
|
|
|
|
background: $facebook;
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
|
|
|
background: darken($facebook, 15%);
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2013-05-23 16:40:50 -04:00
|
|
|
&.cas {
|
|
|
|
background: $cas;
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
&.twitter {
|
|
|
|
background: $twitter;
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
|
|
|
background: darken($twitter, 10%);
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2013-02-25 23:28:32 -05:00
|
|
|
&.github {
|
|
|
|
background: $github;
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
|
|
|
background: lighten($github, 20%);
|
|
|
|
}
|
2013-02-25 23:28:32 -05:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Button Sizes
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Small
|
|
|
|
|
|
|
|
.btn-small {
|
|
|
|
padding: 3px 6px;
|
2018-01-12 17:27:38 -05:00
|
|
|
font-size: $font-down-1;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Large
|
|
|
|
|
|
|
|
.btn-large {
|
|
|
|
padding: 9px 18px;
|
2018-01-12 17:27:38 -05:00
|
|
|
font-size: $font-up-1;
|
|
|
|
line-height: $line-height-small;
|
2013-02-14 02:56:13 -05:00
|
|
|
}
|
2017-07-24 17:31:14 -04:00
|
|
|
|
|
|
|
.btn-flat {
|
|
|
|
background: transparent;
|
|
|
|
border: 0;
|
|
|
|
outline: 0;
|
2018-01-12 17:27:38 -05:00
|
|
|
line-height: $line-height-small;
|
2019-01-31 14:06:32 -05:00
|
|
|
transition: color 0.25s, background 0.25s;
|
2017-07-27 15:03:41 -04:00
|
|
|
.d-icon {
|
2019-01-31 13:59:49 -05:00
|
|
|
color: $primary-low-mid;
|
|
|
|
}
|
2019-01-31 15:13:22 -05:00
|
|
|
.discourse-no-touch & {
|
|
|
|
&:hover {
|
|
|
|
.d-icon {
|
|
|
|
color: $primary;
|
|
|
|
}
|
2019-01-31 13:59:49 -05:00
|
|
|
}
|
2017-07-25 11:37:32 -04:00
|
|
|
}
|
2017-07-24 17:31:14 -04:00
|
|
|
}
|