Fix: card text contrast, stable grid order, independent highlight/input states, highlight dismiss
- Explicit dark colors on .result-value, .result-label, .result-symbol, .highlighted-value, .highlighted-label - Include from-unit in results grid (stable definition-order); from-unit tile shows Big(inputValue) and gets is-input-unit dashed-border class - Shift+click no longer clears highlightedUnitId — fromUnitId and highlightedUnitId are now fully independent states - Add × dismiss button (aria-label="Remove highlight") to .highlighted-result banner; .highlighted-result gains position:relative Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,12 +12,14 @@
|
||||
value,
|
||||
unit,
|
||||
highlighted,
|
||||
isInputUnit = false,
|
||||
onclick,
|
||||
onshiftclick
|
||||
}: {
|
||||
value: Big;
|
||||
unit: Unit;
|
||||
highlighted: boolean;
|
||||
isInputUnit?: boolean;
|
||||
onclick: () => void;
|
||||
onshiftclick: () => void;
|
||||
} = $props();
|
||||
@@ -39,6 +41,7 @@
|
||||
<div
|
||||
class="result-tile"
|
||||
class:highlighted
|
||||
class:is-input-unit={isInputUnit}
|
||||
onclick={handleClick}
|
||||
role="button"
|
||||
tabindex="0"
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
value={item.convertedValue}
|
||||
unit={item.unit}
|
||||
highlighted={item.unit.id === highlightedUnitId}
|
||||
isInputUnit={item.unit.id === fromUnitId}
|
||||
onclick={() => onhighlight(item.unit.id)}
|
||||
onshiftclick={() => onsetinput(item.unit.id)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user