Merge changes Ia2549551,Ia82f8347,Ideee6730

* changes:
  Use CSS constant for assignee color
  Use CSS constants in gr-form-styles
  Replace more CSS vars with constants
This commit is contained in:
Kasper Nilsson
2018-05-14 22:00:42 +00:00
committed by Gerrit Code Review
17 changed files with 26 additions and 25 deletions

View File

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

View File

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

View File

@@ -46,7 +46,7 @@ limitations under the License.
font-family: var(--font-family-bold); font-family: var(--font-family-bold);
} }
:host([highlight]) { :host([highlight]) {
background-color: #fcfad6; background-color: var(--assignee-highlight-color);
} }
.container { .container {
position: relative; position: relative;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -46,6 +46,10 @@ limitations under the License.
--dropdown-background-color: #fff; --dropdown-background-color: #fff;
--select-background-color: rgb(248, 248, 248);
--assignee-highlight-color: #fcfad6;
/* Font sizes */ /* Font sizes */
--font-size-normal: 1rem; --font-size-normal: 1rem;
--font-size-small: .92rem; --font-size-small: .92rem;

View File

@@ -17,6 +17,14 @@ limitations under the License.
<dom-module id="gr-form-styles"> <dom-module id="gr-form-styles">
<template> <template>
<style> <style>
.gr-form-styles input {
background-color: var(--view-background-color);
color: var(--primary-text-color);
}
.gr-form-styles select {
background-color: var(--select-background-color);
color: var(--primary-text-color);
}
.gr-form-styles h1, .gr-form-styles h1,
.gr-form-styles h2 { .gr-form-styles h2 {
margin-bottom: .3em; margin-bottom: .3em;

View File

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