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:
@@ -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;
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -239,8 +239,7 @@
|
|||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:active {
|
&:active {
|
||||||
background: $brand;
|
@extend %brand-background;
|
||||||
color: #fff;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
8
app/assets/stylesheets/mixins/colors.scss
Normal file
8
app/assets/stylesheets/mixins/colors.scss
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
@mixin brand-background {
|
||||||
|
background-color: $brand;
|
||||||
|
color: $white;
|
||||||
|
}
|
||||||
|
|
||||||
|
%brand-background {
|
||||||
|
@include brand-background;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user