Skip to content

Commit 2911146

Browse files
author
Dennis Labordus
committed
Separate styling in component.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 4a52726 commit 2911146

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/compas/CompasAutoAlignment.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {customElement, html, LitElement, property, TemplateResult} from "lit-element";
1+
import {css, customElement, html, LitElement, property, TemplateResult} from "lit-element";
22
import {get, translate} from "lit-translate";
33

44
import {newLogEvent, newOpenDocEvent, newWizardEvent} from "../foundation.js";
@@ -58,7 +58,7 @@ export default class CompasAutoAlignmentElement extends LitElement {
5858
return html `
5959
${this.doc?.querySelector(':root > Substation')
6060
? html`
61-
<section tabindex="0">
61+
<section id="substationsToAlign" tabindex="0">
6262
<mwc-list multi required>
6363
${Array.from(this.doc.querySelectorAll(':root > Substation') ?? [])
6464
.map(substation =>
@@ -73,10 +73,16 @@ export default class CompasAutoAlignmentElement extends LitElement {
7373
</section>
7474
`
7575
: html`
76-
<section tabindex="0">
77-
<span style="color: var(--base1)">${translate('compas.autoAlignment.missing')}</span>
76+
<section id="noSubstationsToAlign" tabindex="0">
77+
<span>${translate('compas.autoAlignment.missing')}</span>
7878
</section>
7979
`}
8080
`;
8181
}
82+
83+
static styles = css`
84+
#noSubstationsToAlign > span {
85+
color: var(--base1)
86+
}
87+
`
8288
}

0 commit comments

Comments
 (0)