From 9d72aed37d63f866ef053dc2c93ce3a4c14d4519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 3 Jun 2021 01:57:51 +0200 Subject: [PATCH] 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`. --- app/assets/stylesheets/mixins/buttons.scss | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/mixins/buttons.scss b/app/assets/stylesheets/mixins/buttons.scss index 9e6fea4a1..5ef6a960d 100644 --- a/app/assets/stylesheets/mixins/buttons.scss +++ b/app/assets/stylesheets/mixins/buttons.scss @@ -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; }