2016-03-10 17:13:54 +01:00
|
|
|
/* ==========================================================================
|
|
|
|
BUTTONS
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
/*
|
|
|
|
Default button
|
|
|
|
========================================================================== */
|
|
|
|
|
|
|
|
.btn {
|
2017-09-12 18:01:43 +02:00
|
|
|
/* default */
|
2016-03-10 17:13:54 +01:00
|
|
|
display: inline-block;
|
|
|
|
margin-bottom: 0.25em;
|
2016-03-24 17:14:40 +01:00
|
|
|
padding: 0.5em 1em;
|
2016-03-10 17:13:54 +01:00
|
|
|
font-family: $sans-serif;
|
2016-03-30 22:59:48 +02:00
|
|
|
font-size: $type-size-6;
|
2016-03-10 17:13:54 +01:00
|
|
|
font-weight: bold;
|
|
|
|
text-align: center;
|
2016-03-10 19:06:59 +01:00
|
|
|
text-decoration: none;
|
2017-09-12 18:01:43 +02:00
|
|
|
border-width: 0;
|
2016-03-10 17:13:54 +01:00
|
|
|
border-radius: $border-radius;
|
|
|
|
cursor: pointer;
|
2016-03-21 21:36:24 +01:00
|
|
|
|
2016-03-10 17:13:54 +01:00
|
|
|
.icon {
|
|
|
|
margin-right: 0.5em;
|
|
|
|
}
|
2016-03-21 21:36:24 +01:00
|
|
|
|
2016-03-10 17:13:54 +01:00
|
|
|
.icon + .hidden {
|
2016-08-08 22:01:37 +02:00
|
|
|
margin-left: -0.5em; /* override for hidden text*/
|
2016-03-10 17:13:54 +01:00
|
|
|
}
|
|
|
|
|
2017-09-12 18:01:43 +02:00
|
|
|
/* button colors */
|
|
|
|
$buttoncolors:
|
|
|
|
(primary, $primary-color),
|
|
|
|
(inverse, #fff),
|
|
|
|
(light-outline, transparent),
|
|
|
|
(success, $success-color),
|
|
|
|
(warning, $warning-color),
|
|
|
|
(danger, $danger-color),
|
|
|
|
(info, $info-color),
|
|
|
|
(facebook, $facebook-color),
|
|
|
|
(twitter, $twitter-color),
|
|
|
|
(google-plus, $google-plus-color),
|
|
|
|
(linkedin, $linkedin-color);
|
2016-03-10 17:13:54 +01:00
|
|
|
|
2017-09-12 18:01:43 +02:00
|
|
|
@each $buttoncolor, $color in $buttoncolors {
|
|
|
|
&--#{$buttoncolor} {
|
|
|
|
@include yiq-contrasted($color);
|
|
|
|
@if ($buttoncolor == inverse) {
|
|
|
|
border: 1px solid $border-color;
|
|
|
|
}
|
|
|
|
@if ($buttoncolor == light-outline) {
|
|
|
|
border: 1px solid #fff;
|
|
|
|
}
|
2016-03-10 17:13:54 +01:00
|
|
|
|
2017-09-12 18:01:43 +02:00
|
|
|
&:visited {
|
|
|
|
@include yiq-contrasted($color);
|
|
|
|
}
|
2018-09-05 21:16:31 +02:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
@include yiq-contrasted(mix(#000, $color, 20%));
|
|
|
|
}
|
2016-03-10 17:13:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-12 18:01:43 +02:00
|
|
|
/* fills width of parent container */
|
|
|
|
&--block {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
2016-03-21 21:36:24 +01:00
|
|
|
|
2017-09-12 18:01:43 +02:00
|
|
|
+ .btn--block {
|
|
|
|
margin-top: 0.25em;
|
2016-03-10 17:13:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* disabled */
|
|
|
|
&--disabled {
|
|
|
|
pointer-events: none;
|
|
|
|
cursor: not-allowed;
|
|
|
|
filter: alpha(opacity=65);
|
|
|
|
box-shadow: none;
|
|
|
|
opacity: 0.65;
|
|
|
|
}
|
|
|
|
|
2016-03-24 17:14:40 +01:00
|
|
|
/* extra large button */
|
|
|
|
&--x-large {
|
2016-04-01 18:43:19 +02:00
|
|
|
font-size: $type-size-4;
|
2016-03-24 17:14:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* large button */
|
|
|
|
&--large {
|
2016-04-01 18:43:19 +02:00
|
|
|
font-size: $type-size-5;
|
2016-03-24 17:14:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* small button */
|
|
|
|
&--small {
|
2016-04-01 18:43:19 +02:00
|
|
|
font-size: $type-size-7;
|
2016-03-24 17:14:40 +01:00
|
|
|
}
|
2016-03-21 21:36:24 +01:00
|
|
|
}
|