Skip to content

Commit 8996de2

Browse files
committed
Fix broken conditional, - fix hover on first option
1 parent 0240804 commit 8996de2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/assets/css/common.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,7 @@ header.vff-header svg.f-logo {
843843
outline: none;
844844
border: none;
845845
position: relative;
846-
margin-right: 8px;
847-
padding: 0;
846+
padding: 0 8px 0 0;
848847
}
849848

850849
.vff .field-iconrate ul.f-radios li .f-icon-wrap {
@@ -876,7 +875,8 @@ header.vff-header svg.f-logo {
876875
background-color: unset;
877876
}
878877

879-
.vff .field-iconrate ul.f-radios li.f-hovered .f-icon-wrap svg {
878+
.vff .field-iconrate ul.f-radios li.f-hovered .f-icon-wrap svg,
879+
.vff .field-iconrate ul.f-radios li:hover .f-icon-wrap svg {
880880
fill: var(--vff-tertiary-text-color);
881881
}
882882

src/components/QuestionTypes/OpinionScaleType.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
v-for="(option, index) in question.options"
66
v-on:click.prevent="toggleAnswer(option)"
77
v-on:mouseover="isIconScale ? onMouseover(index) : null"
8-
v-on:mouseleave="isIconScale ? onMouseleave : null"
8+
v-on:mouseleave="isIconScale ? onMouseleave() : null"
99
v-bind:class="{'f-selected': option.selected, ...iconScaleClasses(index)}"
1010
v-bind:key="'m' + index"
1111
v-bind:aria-label="getLabel(option.value)"
@@ -14,7 +14,7 @@
1414
<div v-if="!isIconScale" class="f-label-wrap">
1515
<span v-if="option.choiceLabel()" class="f-label">{{ option.choiceLabel() }}span>
1616
div>
17-
<div class="f-icon-wrap">
17+
<div v-else class="f-icon-wrap">
1818
<div class="f-icon">
1919
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
2020
<path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z" stroke-width=".5"/>
@@ -181,7 +181,7 @@
181181
182182
if (this.isIconScale) {
183183
if (!this.isMobile) {
184-
classes['f-hovered'] = this.hoveredIndex ? index <= this.hoveredIndex : null
184+
classes['f-hovered'] = this.hoveredIndex ? index < this.hoveredIndex : null
185185
}
186186
187187
classes['f-previous'] = this.activeIndex ? index < this.activeIndex : null
@@ -198,7 +198,7 @@
198198
}
199199
200200
return false
201-
}
201+
},
202202
}
203203
}
204204
</script>

0 commit comments

Comments
 (0)