From 9ac8ddb6bfae4cff95153d09939a41515daf6c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 11 Oct 2022 20:59:15 +0200 Subject: [PATCH] Unify dark and brand-secondary SCSS variables We were using each one half the time, while they both had the same value by default. It was impossible to know when me meant "use a dark color here" or "use the secondary brand color" here. So now we're only using one variable, so it's easy it'll be easy to add CSS custom properties to overwrite this variable. We're choosing `brand-secondary` because its name makes it less problematic to use a light color. --- app/assets/stylesheets/_consul_settings.scss | 1 - app/assets/stylesheets/budgets/phases.scss | 6 +----- app/assets/stylesheets/layout.scss | 2 +- app/assets/stylesheets/participation.scss | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/_consul_settings.scss b/app/assets/stylesheets/_consul_settings.scss index b32848839..3c0ba8981 100644 --- a/app/assets/stylesheets/_consul_settings.scss +++ b/app/assets/stylesheets/_consul_settings.scss @@ -64,7 +64,6 @@ $font-family-serif: Georgia, "Times New Roman", Times, serif !default; $brand: #004a83 !default; $brand-secondary: darken($brand, 10%) !default; -$dark: $brand-secondary !default; $text-medium: #515151 !default; $text-light: #bfbfbf !default; diff --git a/app/assets/stylesheets/budgets/phases.scss b/app/assets/stylesheets/budgets/phases.scss index 4a2e2af77..750b965c7 100644 --- a/app/assets/stylesheets/budgets/phases.scss +++ b/app/assets/stylesheets/budgets/phases.scss @@ -87,7 +87,7 @@ &[aria-selected="true"], &.is-active { - @include background-with-text-contrast($dark); + @include background-with-text-contrast($brand-secondary); font-weight: normal; } @@ -100,10 +100,6 @@ &.current-phase-tab a { @include background-with-text-contrast($brand-secondary); padding-top: $line-height / 2; - - &:hover { - background: $dark; - } } } diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index e29345fcf..12dd06c92 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -689,7 +689,7 @@ body > header, } .top-links { - @include background-with-text-contrast($dark); + @include background-with-text-contrast($brand-secondary); display: flex; flex-wrap: wrap; font-size: $small-font-size; diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 3d1507b1a..a388687be 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -1482,7 +1482,7 @@ cursor: pointer; &:hover { - @include background-with-text-contrast($dark); + @include background-with-text-contrast($brand-secondary); text-decoration: none; } }