48 lines
1.3 KiB
SCSS
Executable file
48 lines
1.3 KiB
SCSS
Executable file
@mixin button($size) {
|
|
@include button-layout($size);
|
|
@include shape-style($size);
|
|
@include button-hover();
|
|
font-weight: $fontweight_base;
|
|
}
|
|
|
|
@mixin button-layout($size) {
|
|
padding: $size;
|
|
padding-top: $size/3;
|
|
padding-bottom: $size/3;
|
|
margin:$size/2;
|
|
margin-top: $size/3;
|
|
margin-bottom: $lineheight;
|
|
//font-size: 4.75mm;
|
|
line-height:$lineheight;
|
|
height:auto;
|
|
}
|
|
|
|
@mixin button-hover() {
|
|
transition: background-color .2s, border .2s, box-shadow .2s, color .2s;
|
|
&:hover, &:active {
|
|
background-color:transparent;
|
|
}
|
|
}
|
|
|
|
@mixin button-fullcontrol($background-color, $hover-color, $text-color) {
|
|
@include colorize-shape($background-color);
|
|
outline-color: $background-color;
|
|
color:$text-color;
|
|
&:visited {
|
|
@include colorize-shape($background-color);
|
|
color:$text-color;
|
|
}
|
|
&, &:visited, &:not(.disabled):not(:disabled) {
|
|
&:hover, &:active {
|
|
@include colorize-shape($hover-color);
|
|
color:lighten($text-color, 5%);
|
|
outline-color: $hover-color;
|
|
box-shadow:none;
|
|
}
|
|
}
|
|
}
|
|
|
|
@mixin button-color($background-color) {
|
|
@include button-fullcontrol($background-color, mix($background-color, getTextColorFromBackground($background-color), 85%), getTextColorFromBackground($background-color));
|
|
box-shadow: $narrow-shadow;
|
|
}
|