Skip to content

Commit

Permalink
Fix colors of list items
Browse files Browse the repository at this point in the history
and remove hardcoded colors
in favor of theme tokens.

Fixes #12425
  • Loading branch information
MisRob committed Jul 8, 2024
1 parent 49b9044 commit 928a09b
Showing 1 changed file with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,14 @@
</h3>
</template>
<template #content>
<div
v-show="isExpanded(index)"
:style="{
backgroundColor: $themePalette.grey.v_100,
}"
>
<div v-show="isExpanded(index)">
<ul class="question-list">
<li v-for="(question, i) in section.questions">
<KButton
tabindex="0"
class="question-button"
appearance="basic-link"
:class="{ selected: isSelected(question) }"
:class="[listItemClass, isSelected(question) ? selectedListItemClass : '']"
:style="accordionStyleOverrides"
@click="handleQuestionChange(i, index)"
>
Expand Down Expand Up @@ -321,6 +316,21 @@
textDecoration: 'none',
};
},
listItemClass() {
return this.$computedClass({
':hover': {
backgroundColor: this.$themePalette.grey.v_100,
},
});
},
selectedListItemClass() {
return this.$computedClass({
backgroundColor: this.$themePalette.grey.v_100,
':hover': {
backgroundColor: this.$themePalette.grey.v_200,
},
});
},
resourceMissingText() {
return this.coreString('resourceNotFoundOnDevice');
},
Expand Down Expand Up @@ -425,14 +435,6 @@
width: 100%;
height: 100%;
padding: 0.5em;
&:hover {
background-color: white;
}
&.selected {
background-color: white;
}
}
</style>

0 comments on commit 928a09b

Please sign in to comment.