Use variables in dialog and comment styling

Also cleans up some inconsistent styling in the various subcomponents of
the settings view.

Change-Id: I7b4487f84717cadd82c790785c3a83cf68eb8ce8
This commit is contained in:
Kasper Nilsson 2018-04-17 16:23:08 +02:00
parent 839fb99f30
commit 7c394e06e4
10 changed files with 27 additions and 9 deletions

View File

@ -26,6 +26,7 @@ limitations under the License.
<template> <template>
<style include="shared-styles"> <style include="shared-styles">
:host { :host {
background-color: var(--dialog-background-color);
display: block; display: block;
padding: 1em; padding: 1em;
} }

View File

@ -34,17 +34,18 @@ limitations under the License.
padding: .5em .7em; padding: .5em .7em;
} }
#container { #container {
background-color: #fcfad6; background-color: var(--comment-background-color);
border: 1px solid #bbb; border: 1px solid var(--border-color);
color: var(--comment-text-color);
display: block; display: block;
margin-bottom: 1px; margin-bottom: 1px;
white-space: normal; white-space: normal;
} }
#container.unresolved { #container.unresolved {
background-color: #fcfaa6; background-color: var(--unresolved-comment-background-color);
} }
#commentInfoContainer { #commentInfoContainer {
border-top: 1px dotted #bbb; border-top: 1px dotted var(--border-color);
display: flex; display: flex;
} }
#unresolvedLabel { #unresolvedLabel {

View File

@ -76,7 +76,7 @@ limitations under the License.
} }
.draftLabel, .draftLabel,
.draftTooltip { .draftTooltip {
color: #999; color: var(--deemphasized-text-color);
display: none; display: none;
} }
.date { .date {
@ -151,7 +151,7 @@ limitations under the License.
margin-left: .4em; margin-left: .4em;
} }
.robotId { .robotId {
color: #808080; color: var(--deemphasized-text-color);
margin-bottom: .8em; margin-bottom: .8em;
margin-top: -.4em; margin-top: -.4em;
} }
@ -168,7 +168,7 @@ limitations under the License.
display: none; display: none;
} }
label.show-hide { label.show-hide {
color: var(--primary-text-color); color: var(--comment-text-color);
cursor: pointer; cursor: pointer;
display: block; display: block;
font-size: .8rem; font-size: .8rem;
@ -201,7 +201,7 @@ limitations under the License.
margin: 0; margin: 0;
} }
.resolve label { .resolve label {
color: #333; color: var(--comment-text-color);
font-size: var(--font-size-small); font-size: var(--font-size-small);
} }
gr-confirm-dialog .main { gr-confirm-dialog .main {

View File

@ -44,6 +44,11 @@ limitations under the License.
.actions { .actions {
padding: 1em 1.5em; padding: 1em 1.5em;
} }
.header,
.mainContainer,
.actions {
background-color: var(--dialog-background-color);
}
.header { .header {
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
font-family: var(--font-family-bold); font-family: var(--font-family-bold);

View File

@ -79,6 +79,7 @@ limitations under the License.
If you lose it, you will need to generate a new one. If you lose it, you will need to generate a new one.
</section> </section>
<gr-button <gr-button
link
class="closeButton" class="closeButton"
on-tap="_closeOverlay">Close</gr-button> on-tap="_closeOverlay">Close</gr-button>
</div> </div>

View File

@ -74,12 +74,14 @@ limitations under the License.
<td>[[_getStatusLabel(key.valid)]]</td> <td>[[_getStatusLabel(key.valid)]]</td>
<td> <td>
<gr-button <gr-button
link
on-tap="_showKey" on-tap="_showKey"
data-index$="[[index]]" data-index$="[[index]]"
link>Click to View</gr-button> link>Click to View</gr-button>
</td> </td>
<td> <td>
<gr-button <gr-button
link
data-index$="[[index]]" data-index$="[[index]]"
on-tap="_handleDeleteKey">Delete</gr-button> on-tap="_handleDeleteKey">Delete</gr-button>
</td> </td>
@ -123,6 +125,7 @@ limitations under the License.
</section> </section>
<gr-button <gr-button
id="addButton" id="addButton"
link
disabled$="[[_computeAddButtonDisabled(_newKey)]]" disabled$="[[_computeAddButtonDisabled(_newKey)]]"
on-tap="_handleAddKey">Add new SSH key</gr-button> on-tap="_handleAddKey">Add new SSH key</gr-button>
</fieldset> </fieldset>

View File

@ -23,6 +23,7 @@ limitations under the License.
<template> <template>
<style include="shared-styles"> <style include="shared-styles">
:host { :host {
color: var(--primary-text-color);
display: block; display: block;
max-height: 90vh; max-height: 90vh;
} }

View File

@ -23,7 +23,7 @@ limitations under the License.
<template> <template>
<style include="shared-styles"> <style include="shared-styles">
:host { :host {
background: var(--view-background-color); background: var(--dialog-background-color);
box-shadow: rgba(0, 0, 0, 0.3) 0 1px 3px; box-shadow: rgba(0, 0, 0, 0.3) 0 1px 3px;
} }

View File

@ -81,6 +81,10 @@ limitations under the License.
--diff-highlight-range-color: rgba(255, 213, 0, 0.5); --diff-highlight-range-color: rgba(255, 213, 0, 0.5);
--diff-highlight-range-hover-color: rgba(255, 255, 0, 0.5); --diff-highlight-range-hover-color: rgba(255, 255, 0, 0.5);
--comment-text-color: #000;
--comment-background-color: #fcfad6;
--unresolved-comment-background-color: #fcfaa6;
--edit-mode-background-color: #ebf5fb; --edit-mode-background-color: #ebf5fb;
--syntax-default-color: var(--primary-text-color); --syntax-default-color: var(--primary-text-color);

View File

@ -36,7 +36,9 @@ limitations under the License.
input, input,
iron-autogrow-textarea { iron-autogrow-textarea {
background-color: inherit; background-color: inherit;
border: 1px solid var(--border-color);
box-sizing: border-box; box-sizing: border-box;
color: var(--primary-text-color);
margin: 0; margin: 0;
padding: 0; padding: 0;
} }