2019-11-05 12:49:13 +01:00
|
|
|
|
2019-11-05 13:02:01 +01:00
|
|
|
// Mixins, variables and colorizations
|
|
|
|
|
|
|
|
|
|
|
|
@mixin button() {
|
|
|
|
@include borders();
|
|
|
|
@include border-radius();
|
|
|
|
text-shadow: 0px -1px 0px rgba(0,0,0,0.3);
|
|
|
|
}
|
2019-11-05 12:49:13 +01:00
|
|
|
|
2019-11-06 12:18:15 +01:00
|
|
|
// Colorization functions
|
2019-11-05 12:49:13 +01:00
|
|
|
|
2019-11-06 12:18:15 +01:00
|
|
|
@mixin colorize-button() {
|
|
|
|
@each $name, $color in list-colors() {
|
|
|
|
&-#{$name} { @include button-color(get-color($name), #FFF, #000); }
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-06 12:18:15 +01:00
|
|
|
@mixin button-color($background-color, $light-color, $dark-color) {
|
|
|
|
@include background-color($background-color, $light-color, $dark-color);
|
|
|
|
&, &:not(.disabled):not(:disabled) {
|
2019-11-05 12:49:13 +01:00
|
|
|
&:hover, &:active, &:focus, a:hover > &, a:active > &, a:focus > & {
|
2019-11-06 12:18:15 +01:00
|
|
|
@include button-hover($background-color, $light-color, $dark-color);
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-06 12:18:15 +01:00
|
|
|
@mixin button-hover($background-color, $light-color, $dark-color) {
|
|
|
|
@include background-color(lighten($background-color, 10%), $light-color, $dark-color);
|
|
|
|
}
|
|
|
|
|
2019-11-05 12:49:13 +01:00
|
|
|
// 11.1 - Buttons
|
|
|
|
|
|
|
|
.btn {
|
2019-11-05 13:02:01 +01:00
|
|
|
@include button();
|
2019-11-05 13:52:02 +01:00
|
|
|
box-shadow: $inset-shadow, $narrow-shadow;
|
2019-11-05 14:26:55 +01:00
|
|
|
|
2019-11-05 13:02:01 +01:00
|
|
|
&:hover {
|
2019-11-05 13:52:02 +01:00
|
|
|
box-shadow: $inset-shadow, $narrow-shadow;
|
2019-11-05 13:02:01 +01:00
|
|
|
@include button();
|
|
|
|
}
|
2019-11-05 12:49:13 +01:00
|
|
|
|
2019-11-05 13:02:01 +01:00
|
|
|
&:focus {
|
2019-11-05 13:52:02 +01:00
|
|
|
box-shadow: $inset-shadow, $narrow-shadow, 0px 0px 0px 2px rgba(0, 0, 0, 0.3)!important;
|
2019-11-05 13:02:01 +01:00
|
|
|
outline: none;
|
|
|
|
}
|
2019-11-05 12:49:13 +01:00
|
|
|
|
2019-11-05 13:02:01 +01:00
|
|
|
&:active {
|
2019-11-05 13:52:02 +01:00
|
|
|
box-shadow: $inset-shadow-inverted, $narrow-shadow;
|
2019-11-05 13:02:01 +01:00
|
|
|
@include button();
|
|
|
|
|
|
|
|
&:focus {
|
2019-11-05 13:52:02 +01:00
|
|
|
box-shadow: $inset-shadow-inverted, $narrow-shadow, 0px 0px 0px 2px rgba(0, 0, 0, 0.3)!important;
|
2019-11-05 13:02:01 +01:00
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
}
|
2019-11-06 12:18:15 +01:00
|
|
|
|
|
|
|
@include colorize-button();
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.btn-group {
|
2019-11-05 13:02:01 +01:00
|
|
|
box-shadow: none;
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.btn-group .btn {
|
|
|
|
@include border-radius();
|
|
|
|
&:not(:first-child) {
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
}
|
|
|
|
&:not(:last-child) {
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 11.2 - Badges */
|
|
|
|
|
2019-11-05 14:26:55 +01:00
|
|
|
.badge {
|
|
|
|
font-weight:400;
|
|
|
|
|
2019-11-06 12:18:15 +01:00
|
|
|
@include colorize-button();
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 11.3 - Réseaux sociaux */
|
|
|
|
|
|
|
|
.share-buttons {
|
2019-11-05 14:24:23 +01:00
|
|
|
margin-top: $baselinerem;
|
|
|
|
margin-bottom: $baselinerem;
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.reagir {
|
|
|
|
text-align:right;
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn {
|
2019-11-06 12:18:15 +01:00
|
|
|
&-facebook {@include button-color(#3B5998, #FFF, #000);}
|
|
|
|
&-twitter {@include button-color(#55ACEE, #FFF, #000);}
|
|
|
|
&-googleplus {@include button-color(#d34836, #FFF, #000);}
|
|
|
|
&-diaspora {@include button-color(#313739, #FFF, #000);}
|
|
|
|
&-mastodon {@include button-color(#282c37, #FFF, #000);}
|
2019-11-05 12:49:13 +01:00
|
|
|
}
|