diff --git a/packages/elements/src/components/app/theme.scss b/packages/elements/src/components/app/theme.scss index 2c79b8e8c..9f2c0b729 100644 --- a/packages/elements/src/components/app/theme.scss +++ b/packages/elements/src/components/app/theme.scss @@ -41,9 +41,6 @@ --prism-selector: #00009f; --prism-tag: var(--prism-selector); --prism-keyword: var(--prism-selector); - - --mut-mutant-polygon-color: black; - } :host([theme='dark']) { // From https://atelierbram.github.io/syntax-highlighting/prism/demo/assets/css/prism-atom-dark.css @@ -95,8 +92,6 @@ --prism-regex: #e9c062; --prism-important: #fd971f; - - --mut-mutant-polygon-color: var(--mut-gray-800); } // File icon theming ================================ diff --git a/packages/elements/src/components/file/file.component.ts b/packages/elements/src/components/file/file.component.ts index d144b7ecc..d53f89322 100644 --- a/packages/elements/src/components/file/file.component.ts +++ b/packages/elements/src/components/file/file.component.ts @@ -134,19 +134,17 @@ export class FileComponent extends RealTimeElement { private renderMutantDots(mutants: MutantModel[] | undefined) { return mutants?.length - ? mutants.map( - (mutant) => - svg` - + ? mutants.map((mutant) => { + const selected = this.selectedMutant?.id === mutant.id; + const selectedClass = selected ? 'selected' : ''; + + return svg` + ${title(mutant)} - ${this.selectedMutant?.id === mutant.id - ? - svg`` - : - svg``} - `, - ) + ${selected ? svg`` : svg``} + `; + }) : nothing; } diff --git a/packages/elements/src/components/file/file.scss b/packages/elements/src/components/file/file.scss index 82b23f796..f97137e15 100644 --- a/packages/elements/src/components/file/file.scss +++ b/packages/elements/src/components/file/file.scss @@ -31,7 +31,7 @@ $mutant-squiggly: 'Survived', 'NoCoverage'; } } -polygon.mutant-dot-polygon.selected { +polygon.mutant-dot-polygon { @apply stroke-gray-800; }