Skip to content

Commit

Permalink
fix(cc-logs): fix spacing between metadata and message
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesoyres-cc committed Apr 11, 2024
1 parent ca7cacb commit a7534ef
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/cc-logs/cc-logs.js
Expand Up @@ -826,6 +826,10 @@ export class CcLogs extends LitElement {
.map((metadata) => this._renderMetadata(metadata))
.filter((t) => t != null);

if (metadata.length === 0) {
return null;
}

// keep this on one line to make sure we do not break the white-space css rule
return html`<span class="metadata--wrapper">${join(metadata, html`&nbsp;`)}</span>`;
}
Expand Down Expand Up @@ -871,6 +875,8 @@ export class CcLogs extends LitElement {
border: 1px solid var(--cc-color-border-neutral, #aaa);
background-color: var(--cc-color-bg-default, #fff);
border-radius: var(--cc-border-radius-default, 0.25em);
--font-size: 0.875em;
}
:focus {
Expand All @@ -888,7 +894,7 @@ export class CcLogs extends LitElement {
.logs_container {
flex: 1;
font-family: var(--cc-ff-monospace, monospace);
font-size: 0.875em;
font-size: var(--font-size);
}
.log {
Expand Down Expand Up @@ -975,6 +981,10 @@ export class CcLogs extends LitElement {
.metadata {
display: inline-block;
}
.metadata--wrapper {
margin-right: var(--font-size);
}
.strong {
font-weight: bold;
Expand Down

0 comments on commit a7534ef

Please sign in to comment.