Merge pull request #5018 from consul/simplify_main_colors

Remove redundant color definitions
This commit is contained in:
Javi Martín
2022-10-27 15:34:33 +02:00
committed by GitHub
11 changed files with 38 additions and 75 deletions

View File

@@ -135,7 +135,7 @@ $table-header: #ecf1f6;
} }
.title-bar { .title-bar {
color: #000; color: inherit;
position: absolute; position: absolute;
right: 12px; right: 12px;
} }
@@ -204,10 +204,6 @@ $table-header: #ecf1f6;
color: $admin-text; color: $admin-text;
padding: $line-height / 2; padding: $line-height / 2;
label {
color: $white;
}
a { a {
color: inherit; color: inherit;
white-space: nowrap; white-space: nowrap;
@@ -844,6 +840,7 @@ table {
.fullscreen { .fullscreen {
.fullscreen-container { .fullscreen-container {
color: $white;
a { a {
line-height: 3rem; line-height: 3rem;
@@ -856,7 +853,6 @@ table {
.markdown-editor-header { .markdown-editor-header {
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
color: $white;
@include breakpoint(medium) { @include breakpoint(medium) {
line-height: 3rem; line-height: 3rem;
@@ -895,7 +891,7 @@ table {
} }
a { a {
color: $white; color: inherit;
} }
} }
} }

View File

@@ -28,7 +28,6 @@
.ballots-link { .ballots-link {
@include has-fa-icon(archive, solid); @include has-fa-icon(archive, solid);
color: $link;
} }
.results-link { .results-link {

View File

@@ -306,7 +306,6 @@
border-right: 1px solid $border; border-right: 1px solid $border;
[class^="icon-"] { [class^="icon-"] {
color: $text;
display: inline-block; display: inline-block;
font-size: rem-calc(24); font-size: rem-calc(24);
line-height: $line-height; line-height: $line-height;
@@ -358,7 +357,6 @@
.has-tip { .has-tip {
border-bottom: 0; border-bottom: 0;
color: $text;
cursor: auto; cursor: auto;
font-weight: normal; font-weight: normal;
} }
@@ -519,7 +517,6 @@
color: #fff; color: #fff;
h1 { h1 {
color: #fff;
text-align: left; text-align: left;
} }
} }
@@ -680,7 +677,6 @@
} }
p { p {
color: #fff;
font-size: rem-calc(80); font-size: rem-calc(80);
line-height: rem-calc(100); line-height: rem-calc(100);

View File

@@ -14,7 +14,6 @@
.ui-state-default:not(&) { .ui-state-default:not(&) {
background: $highlight; background: $highlight;
color: $text;
} }
} }

View File

@@ -64,7 +64,6 @@
} }
.percentage { .percentage {
color: $text;
display: inline-block; display: inline-block;
font-size: $small-font-size; font-size: $small-font-size;
line-height: $line-height * 2; line-height: $line-height * 2;

View File

@@ -135,11 +135,6 @@ button,
@include inverted-selection; @include inverted-selection;
background: $brand; background: $brand;
&.warning,
&.warning:hover {
color: #000;
}
&.medium { &.medium {
font-size: $small-font-size; font-size: $small-font-size;
} }
@@ -259,15 +254,11 @@ button,
} }
a { a {
color: inherit; @include text-colored-link;
display: inline-block; display: inline-block;
font-weight: bold; font-weight: bold;
position: relative; position: relative;
text-align: left; text-align: left;
&:hover {
color: $link;
}
} }
+ li { + li {
@@ -642,8 +633,7 @@ body > header,
} }
&.is-dropdown-submenu { &.is-dropdown-submenu {
background: $body-background; @extend %body-colors;
color: $text;
margin: 0; margin: 0;
margin-top: rem-calc(-12); margin-top: rem-calc(-12);
padding: 0; padding: 0;
@@ -751,8 +741,6 @@ body > header,
flex-direction: column; flex-direction: column;
@include breakpoint(medium) { @include breakpoint(medium) {
background: $body-background;
color: $text;
flex-direction: row; flex-direction: row;
padding-bottom: 0; padding-bottom: 0;
@@ -790,21 +778,17 @@ body > header,
&:hover { &:hover {
color: $link; color: $link;
} }
}
&:focus {
z-index: 1;
}
&.is-active { &.is-active {
color: #fff;
@include breakpoint(medium) {
@include brand-text; @include brand-text;
border-bottom: 2px solid; border-bottom: 2px solid;
margin-bottom: 1px; margin-bottom: 1px;
} }
} }
&:focus {
z-index: 1;
}
} }
.input-group { .input-group {
@@ -856,7 +840,7 @@ body > header,
margin-bottom: $line-height / 2; margin-bottom: $line-height / 2;
a { a {
color: inherit; @include text-colored-link;
display: inline-block; display: inline-block;
font-weight: bold; font-weight: bold;
margin-right: $line-height / 2; margin-right: $line-height / 2;
@@ -866,10 +850,6 @@ body > header,
@include breakpoint(medium) { @include breakpoint(medium) {
margin-right: $line-height; margin-right: $line-height;
} }
&:hover {
color: $link;
}
} }
.is-active { .is-active {
@@ -1196,10 +1176,6 @@ form {
background-color: $info-bg; background-color: $info-bg;
border-color: $info-border; border-color: $info-border;
color: $color-info; color: $color-info;
a {
color: $link !important;
}
} }
&.warning { &.warning {
@@ -1375,11 +1351,7 @@ form {
} }
.notification-link { .notification-link {
color: inherit; @include text-colored-link;
&:hover {
color: $link;
}
} }
&:hover { &:hover {
@@ -1505,7 +1477,7 @@ table {
.button.button-facebook, .button.button-facebook,
.button.button-google, .button.button-google,
.button.button-wordpress { .button.button-wordpress {
color: $text; color: inherit;
font-weight: bold; font-weight: bold;
&::before { &::before {
@@ -1775,8 +1747,6 @@ table {
// ------------ // ------------
.comments { .comments {
background: $body-background;
background-repeat: repeat-x;
padding-bottom: $line-height * 4; padding-bottom: $line-height * 4;
h2 { h2 {
@@ -1874,11 +1844,9 @@ table {
.delete-comment { .delete-comment {
@include has-fa-icon(trash-alt, regular); @include has-fa-icon(trash-alt, regular);
color: $delete;
&:hover, &:not(:hover):not(:active) {
&:active { color: $delete;
color: $link-hover;
} }
&::before { &::before {
@@ -1941,13 +1909,11 @@ table {
} }
.comment-info { .comment-info {
color: $text-medium;
display: inline-block; display: inline-block;
font-size: $small-font-size; font-size: $small-font-size;
line-height: rem-calc(32); // Same as avatar height line-height: rem-calc(32); // Same as avatar height
.user-name { .user-name {
color: $text;
font-weight: bold; font-weight: bold;
} }
} }
@@ -2635,9 +2601,8 @@ table {
} }
span { span {
background: $body-background; @extend %body-colors;
border-radius: rem-calc(4); border-radius: rem-calc(4);
color: $text;
display: inline-block; display: inline-block;
font-size: $small-font-size; font-size: $small-font-size;
font-weight: bold; font-weight: bold;

View File

@@ -20,7 +20,7 @@
} }
label { label {
color: #fff; color: inherit;
font-size: $tiny-font-size; font-size: $tiny-font-size;
font-weight: normal; font-weight: normal;
} }
@@ -44,8 +44,7 @@
} }
option { option {
background: $body-background; @extend %body-colors;
color: $text;
border: 0; border: 0;
outline: none; outline: none;
} }

View File

@@ -41,6 +41,14 @@
} }
} }
@mixin text-colored-link {
color: inherit;
&:hover {
color: $link;
}
}
@mixin switch { @mixin switch {
@include regular-button; @include regular-button;
border-radius: $line-height; border-radius: $line-height;

View File

@@ -12,6 +12,11 @@
color: $brand; color: $brand;
} }
@mixin body-colors {
background-color: $body-background;
color: $text;
}
@mixin normal-selection { @mixin normal-selection {
&::selection, &::selection,
@@ -36,3 +41,7 @@
%brand-text { %brand-text {
@include brand-text; @include brand-text;
} }
%body-colors {
@include body-colors;
}

View File

@@ -1620,7 +1620,6 @@ $font-awesome-icons: (
.manage-link { .manage-link {
@include has-fa-icon(archive, solid); @include has-fa-icon(archive, solid);
color: $link;
} }
.cards-link { .cards-link {

View File

@@ -81,7 +81,7 @@
} }
.supported { .supported {
color: $text; color: inherit;
margin-top: rem-calc(12); margin-top: rem-calc(12);
} }
} }
@@ -438,7 +438,6 @@
} }
%panel { %panel {
background: $body-background;
border: 1px solid; border: 1px solid;
border-color: #e5e6e9 #dfe0e4 #d0d1d5; border-color: #e5e6e9 #dfe0e4 #d0d1d5;
border-radius: 0; border-radius: 0;
@@ -665,7 +664,6 @@
&:hover { &:hover {
background: $budget-hover; background: $budget-hover;
color: #fff;
cursor: pointer; cursor: pointer;
} }
@@ -934,8 +932,7 @@
margin-top: 0; margin-top: 0;
&:hover { &:hover {
background: $body-background; @extend %body-colors;
color: $text;
} }
} }
@@ -1041,7 +1038,6 @@
.jumbo-budget { .jumbo-budget {
@include full-width-border(bottom, 2px solid $border); @include full-width-border(bottom, 2px solid $border);
background: $body-background;
&.budget-heading { &.budget-heading {
min-height: $line-height * 10; min-height: $line-height * 10;
@@ -1476,9 +1472,8 @@
} }
.zoom-link { .zoom-link {
background: $body-background; @extend %body-colors;
border-radius: rem-calc(48); border-radius: rem-calc(48);
color: $text;
font-size: rem-calc(24); font-size: rem-calc(24);
font-weight: bold; font-weight: bold;
height: rem-calc(48); height: rem-calc(48);
@@ -1616,7 +1611,6 @@
.section-title-divider { .section-title-divider {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
color: #000;
margin: $line-height 0; margin: $line-height 0;
span { span {