Replace more CSS vars with constants

Swaps out various shades of red and black with --error-text-color and
--deemphasized-text-color, respectively.

Also removes some vestigial CSS that was never applied, and a hard-coded
check for a specific color in gr-autocomplete_test.

Change-Id: Ideee67300d8bbaa8e86fb1a2991492fa22a2ac43
This commit is contained in:
Kasper Nilsson 2018-05-09 20:18:20 -07:00
parent be341b5c42
commit 4313467582
14 changed files with 13 additions and 24 deletions

View File

@ -32,7 +32,7 @@ limitations under the License.
<style include="shared-styles"></style>
<style include="gr-subpage-styles">
h3.edited:after {
color: #444;
color: var(--deemphasized-text-color);
content: ' *';
}
.inputUpdateBtn {

View File

@ -33,7 +33,7 @@ limitations under the License.
<style="shared-styles"></style>
<style include="gr-subpage-styles">
h2.edited:after {
color: #444;
color: var(--deemphasized-text-color);
content: ' *';
}
.loading,

View File

@ -178,7 +178,7 @@ limitations under the License.
display: none;
}
.warning {
color: #d14836;
color: var(--error-text-color);
}
hr {
border: 0;

View File

@ -55,7 +55,7 @@ limitations under the License.
width: 100%;
}
.warning {
color: red;
color: var(--error-text-color);
}
</style>
<gr-confirm-dialog

View File

@ -122,7 +122,7 @@ limitations under the License.
text-overflow: ellipsis;
}
.oldPath {
color: #999;
color: var(--deemphasized-text-color);
}
.comments,
.stats {

View File

@ -49,12 +49,6 @@ limitations under the License.
gr-account-chip {
margin-top: .3em;
}
.remove {
color: #999;
}
.remove {
font-size: var(--font-size-small);
}
gr-button {
--gr-button: {
padding-left: 0;

View File

@ -212,7 +212,6 @@ limitations under the License.
font-size: var(--font-size-small);
}
gr-confirm-dialog .main {
background-color: #fef;
display: flex;
flex-direction: column;
width: 100%;

View File

@ -77,7 +77,7 @@ limitations under the License.
}
.navLink:not([href]),
.downloadLink:not([href]) {
color: #999;
color: var(--deemphasized-text-color);
}
.navLinks {
align-items: center;
@ -189,7 +189,7 @@ limitations under the License.
text-decoration: none;
}
.mobileNavLink:not([href]) {
color: #bbb;
color: var(--deemphasized-text-color);
}
.jumpToFileContainer {
display: block;

View File

@ -127,10 +127,10 @@ limitations under the License.
font-size: 1.2rem;
}
.errorMoreInfo {
color: #999;
color: var(--deemphasized-text-color);
}
.feedback {
color: #b71c1c;
color: var(--error-text-color);
}
</style>
<gr-fixed-panel id="header">

View File

@ -52,7 +52,7 @@ limitations under the License.
font-family: var(--font-family-bold);
}
.alreadySubmittedText {
color: red;
color: var(--error-text-color);
margin: 0 2em;
padding: .5em;
}

View File

@ -59,7 +59,7 @@ limitations under the License.
}
paper-input.warnUncommitted {
--paper-input-container-input: {
color: #ff0000;
color: var(--error-text-color);
font-size: var(--font-size-normal);
}
}

View File

@ -507,12 +507,8 @@ limitations under the License.
element.text = 'blah blah blah';
MockInteractions.blur(element.$.input);
assert.isTrue(inputClassList.contains('warnUncommitted'));
assert.equal(getComputedStyle(element.$.input.inputElement).color,
'rgb(255, 0, 0)');
MockInteractions.focus(element.$.input);
assert.isFalse(inputClassList.contains('warnUncommitted'));
assert.notEqual(getComputedStyle(element.$.input.inputElement).color,
'rgb(255, 0, 0)ed');
});
test('disabled', () => {

View File

@ -69,7 +69,7 @@ limitations under the License.
@apply --gr-dropdown-item;
}
li .itemAction.disabled {
color: #ccc;
color: var(--deemphasized-text-color);
cursor: default;
}
li .itemAction:link,

View File

@ -37,7 +37,7 @@ limitations under the License.
max-width: none;
}
h2.edited:after {
color: #444;
color: var(--deemphasized-text-color);
content: ' *';
}
.loading {