Extract code to define brand background

Setting the color to `$white` or `#fff` while setting the background to
`$brand` is a pattern we were using in many places. Since we're going to
edit it in order to fix the `::selection` behavior, we're defining the
pattern in one place.
This commit is contained in:
Javi Martín
2021-03-12 19:32:13 +01:00
parent 8ec7f0efc0
commit e2d540d203
5 changed files with 18 additions and 18 deletions

View File

@@ -102,8 +102,7 @@
} }
&.current-phase-tab a { &.current-phase-tab a {
background: $brand; @include brand-background;
color: $white;
padding-top: $line-height / 2; padding-top: $line-height / 2;
&:hover { &:hover {
@@ -141,9 +140,8 @@
.budget-next-phase, .budget-next-phase,
.budget-prev-phase-disabled, .budget-prev-phase-disabled,
.budget-next-phase-disabled { .budget-next-phase-disabled {
background: $brand; @extend %brand-background;
border-radius: rem-calc(3); border-radius: rem-calc(3);
color: $white;
display: flex; display: flex;
font-size: rem-calc(36); font-size: rem-calc(36);
height: 1em * 4 / 3; height: 1em * 4 / 3;

View File

@@ -2,8 +2,7 @@
// //
.ui-datepicker-header { .ui-datepicker-header {
background: $brand; @extend %brand-background;
color: #fff;
font-weight: bold; font-weight: bold;
} }
@@ -16,8 +15,7 @@
.ui-state-hover, .ui-state-hover,
.ui-state-active { .ui-state-active {
background: $brand; @extend %brand-background;
color: #fff;
} }
thead { thead {

View File

@@ -30,8 +30,7 @@
// ----------------- // -----------------
::selection { ::selection {
color: #fff; @include brand-background;
background-color: $brand;
} }
html, html,
@@ -386,7 +385,7 @@ a {
} }
.pagination .current { .pagination .current {
background: $brand; @extend %brand-background;
} }
.pagination li { .pagination li {
@@ -489,7 +488,7 @@ a {
body > header, body > header,
.wrapper > header { .wrapper > header {
background: $brand; @extend %brand-background;
border-bottom: 1px solid $border; border-bottom: 1px solid $border;
margin-bottom: $line-height; margin-bottom: $line-height;
@@ -552,8 +551,7 @@ body > header,
} }
.top-bar { .top-bar {
background: $brand !important; @extend %brand-background;
color: #fff;
padding-bottom: 0; padding-bottom: 0;
padding-top: 0; padding-top: 0;
@@ -941,8 +939,7 @@ footer {
&:hover, &:hover,
&.is-active { &.is-active {
background: $brand; @extend %brand-background;
color: #fff;
} }
} }

View File

@@ -239,8 +239,7 @@
&:hover, &:hover,
&:active { &:active {
background: $brand; @extend %brand-background;
color: #fff;
text-decoration: none; text-decoration: none;
} }
} }

View File

@@ -0,0 +1,8 @@
@mixin brand-background {
background-color: $brand;
color: $white;
}
%brand-background {
@include brand-background;
}