class.active instead of style.background

This commit is contained in:
Edi Cziszter 2022-01-27 20:31:26 +02:00
parent c9c05b920b
commit 53949a0f65
2 changed files with 7 additions and 3 deletions

View File

@ -8,7 +8,7 @@
<iqser-circle-button (action)="annotationReferencesService.hide()" icon="iqser:close"></iqser-circle-button>
</div>
<div class="annotations-container flex">
<div [style.background-color]="isSelected(annotation.id) ? 'var(--iqser-grey-8)' : ''" class="annotation-container">
<div [class.active]="isSelected(annotation.id)" class="annotation-container">
<div class="annotation-card-container flex">
<redaction-annotation-card [annotation]="annotation" [file]="file"></redaction-annotation-card>
<redaction-annotation-references-page-indicator
@ -19,7 +19,7 @@
<div
(click)="referenceClicked.emit(reference)"
*ngFor="let reference of annotationReferences"
[style.background-color]="isSelected(reference.id) ? 'var(--iqser-grey-8)' : ''"
[class.active]="isSelected(reference.id)"
class="annotation-container"
>
<div class="annotation-card-container flex">

View File

@ -1,4 +1,4 @@
@use 'common-mixins' as mixins;
@use 'variables';
.references-dialog {
position: fixed;
@ -22,6 +22,10 @@
width: 100%;
border-top: 1px solid rgba(226, 228, 233, 0.9);
&.active {
background-color: variables.$grey-8;
}
&:not(:first-child) {
cursor: pointer;
}