Code for the littler Buttons the Computer used in the Turing Machine portion of the book.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
buttons-computer/sass/mixins/_button.scss

54 lines
1.1 KiB

// Button variant mixin
@mixin button-variant($color: $primary-color) {
background: $color;
border-color: darken($color, 3%);
color: $light-color;
&:focus {
@include control-shadow($color);
}
&:focus,
&:hover {
background: darken($color, 2%);
border-color: darken($color, 5%);
color: $light-color;
}
&:active,
&.active {
background: darken($color, 7%);
border-color: darken($color, 10%);
color: $light-color;
}
&.loading {
&::after {
border-bottom-color: $light-color;
border-left-color: $light-color;
}
}
}
@mixin button-outline-variant($color: $primary-color) {
background: $light-color;
border-color: $color;
color: $color;
&:focus {
@include control-shadow($color);
}
&:focus,
&:hover {
background: lighten($color, 50%);
border-color: darken($color, 2%);
color: $color;
}
&:active,
&.active {
background: $color;
border-color: darken($color, 5%);
color: $light-color;
}
&.loading {
&::after {
border-bottom-color: $color;
border-left-color: $color;
}
}
}