Merge "Fix display of gr-commit-info in inline header"

This commit is contained in:
Kasper Nilsson
2017-12-14 23:04:11 +00:00
committed by Gerrit Code Review
2 changed files with 17 additions and 12 deletions

View File

@@ -219,6 +219,9 @@ limitations under the License.
.text {
white-space: pre;
}
gr-commit-info {
display: inline-block;
}
@media screen and (min-width: 80em) {
.commitMessage {
max-width: var(--commit-message-max-width, 100ch);

View File

@@ -21,22 +21,24 @@ limitations under the License.
<dom-module id="gr-commit-info">
<template>
<style include="shared-styles">
:host {
.container {
align-items: center;
display: flex;
}
</style>
<template is="dom-if" if="[[_showWebLink]]">
<a target="_blank" rel="noopener"
href$="[[_webLink]]">[[_computeShortHash(commitInfo)]]</a>
</template>
<template is="dom-if" if="[[!_showWebLink]]">
[[_computeShortHash(commitInfo)]]
</template>
<gr-copy-clipboard
hide-input
text="[[commitInfo.commit]]">
</gr-copy-clipboard>
<div class="container">
<template is="dom-if" if="[[_showWebLink]]">
<a target="_blank" rel="noopener"
href$="[[_webLink]]">[[_computeShortHash(commitInfo)]]</a>
</template>
<template is="dom-if" if="[[!_showWebLink]]">
[[_computeShortHash(commitInfo)]]
</template>
<gr-copy-clipboard
hide-input
text="[[commitInfo.commit]]">
</gr-copy-clipboard>
</div>
</template>
<script src="gr-commit-info.js"></script>
</dom-module>