From 277f8b1ddced04d7fdaf75037fb1cac8ff711682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 29 Oct 2022 01:50:32 +0200 Subject: [PATCH] Revert "Use the same color for solid and hollow buttons" Back in commit 5dbd69486, I said: > I'm choosing to use the same color for solid and hollow buttons > because these elements are usually isolated and so from the UX > perspective they are similar; links, on the other hand, are often in > the middle of some text. However, I made a mistake. The crucial factor is that solid buttons might have a light background if we choose the brand color to be a light one, and in this case they automatically get black text. However, hollow buttons always have a light background and so we can't use a light color for the text and border of these buttons. --- app/assets/stylesheets/layout.scss | 3 ++- app/assets/stylesheets/mixins/buttons.scss | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 12dd06c92..8cdf08793 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -134,8 +134,9 @@ button, } .button.hollow { - @include brand-text; + @include normal-selection; border: 1px solid; + color: $anchor-color; } .button.hollow.error { diff --git a/app/assets/stylesheets/mixins/buttons.scss b/app/assets/stylesheets/mixins/buttons.scss index 90d2ad04b..4ca8e0de6 100644 --- a/app/assets/stylesheets/mixins/buttons.scss +++ b/app/assets/stylesheets/mixins/buttons.scss @@ -23,7 +23,7 @@ @include base-button; } -@mixin hollow-button($color: $brand) { +@mixin hollow-button($color: $anchor-color) { @include button($style: hollow, $background: $color); @include normal-selection; @include base-button;