Fix mixin for general button styles

Using the placeholder selector, we weren't overwriting the rules in the
mixin called with `@include` in some cases because in the generated CSS
the placeholder selector appeared before the code generated by the calls
to `@include`.
This commit is contained in:
Javi Martín
2021-06-03 01:57:51 +02:00
parent de27c7a56c
commit 9d72aed37d

View File

@@ -1,4 +1,4 @@
%button {
@mixin base-button {
font-size: $base-font-size;
&:focus,
@@ -7,16 +7,20 @@
}
}
%button {
@include base-button;
}
@mixin regular-button($color: $brand) {
@include button($background: $color);
@include inverted-selection;
@extend %button;
@include base-button;
}
@mixin hollow-button($color: $link) {
@include button($style: hollow, $background: $color);
@include normal-selection;
@extend %button;
@include base-button;
margin-bottom: 0;
}