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
commit da0208da60
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="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

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

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

@ -519,12 +519,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

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

View File

@ -17,6 +17,14 @@ limitations under the License.
<dom-module id="gr-form-styles">
<template>
<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 h2 {
margin-bottom: .3em;

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 {