From 3b915e7ac8e6e59ace594b6b2420461abd709da3 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Thu, 3 Dec 2026 23:51:31 -0600 Subject: [PATCH] high contrast buttons --- .../website/src/components/BaseStyles.astro | 2 +- .../src/components/Button/index.module.css | 5 +++ .../src/components/LoadoutAugments/index.tsx | 6 ++- .../LoadoutConsumables/index.module.css | 2 + .../components/LoadoutConsumables/index.tsx | 38 +++++++++---------- .../src/components/LoadoutEquipment/index.tsx | 3 +- .../src/components/LoadoutModules/index.tsx | 3 +- .../components/LoadoutProvisions/index.tsx | 3 +- .../src/components/LoadoutShells/index.tsx | 3 +- .../src/components/LoadoutSkills/index.tsx | 3 +- .../src/components/LoadoutStatus/index.tsx | 3 +- 11 files changed, 43 insertions(+), 28 deletions(-) diff --git a/packages/website/src/components/BaseStyles.astro b/packages/website/src/components/BaseStyles.astro index 1e097e179..f0167e503 100644 --- a/packages/website/src/components/BaseStyles.astro +++ b/packages/website/src/components/BaseStyles.astro @@ -60,7 +60,7 @@ styles += "}"; --shadow-aggressive: var(--space-1) var(--space-1) var(--space-4) var(--black-a11); --shadow-subtle: 0 var(--space-1) var(--space-3) var(--black-a5); - --shadow-icon: 0 0 var(--space-1) var(--black-a11); + --shadow-icon: 0 0 var(--space-1) var(--black-a8); --shadow-none: 0 0 0 transparent; &.light { diff --git a/packages/website/src/components/Button/index.module.css b/packages/website/src/components/Button/index.module.css index bacf9692d..a158950e9 100644 --- a/packages/website/src/components/Button/index.module.css +++ b/packages/website/src/components/Button/index.module.css @@ -100,6 +100,11 @@ &[data-high-contrast="true"] { color: var(--accent-1); background-color: var(--accent-12); + + svg, + img { + filter: drop-shadow(var(--shadow-icon)); + } } } diff --git a/packages/website/src/components/LoadoutAugments/index.tsx b/packages/website/src/components/LoadoutAugments/index.tsx index 5f9c73c6f..1d72c3467 100644 --- a/packages/website/src/components/LoadoutAugments/index.tsx +++ b/packages/website/src/components/LoadoutAugments/index.tsx @@ -78,7 +78,8 @@ function AugmentButton({ node, isSelected, onToggle }: AugmentButtonProps) { b.category - a.category, +); + interface ContentProps { tank: TankDefinition; gun: GunDefinition; @@ -33,7 +36,7 @@ function Content({ tank, gun, selected, onToggle }: ContentProps) { return (
- {Object.values(consumables.consumables).map((consumable) => { + {sortedConsumables.map((consumable) => { if ( consumable.game_mode_exclusive || !isCompatible(consumable.include, consumable.exclude) @@ -52,7 +55,8 @@ function Content({ tank, gun, selected, onToggle }: ContentProps) { diff --git a/packages/website/src/components/LoadoutEquipment/index.tsx b/packages/website/src/components/LoadoutEquipment/index.tsx index 59a8d484b..af7f2925c 100644 --- a/packages/website/src/components/LoadoutEquipment/index.tsx +++ b/packages/website/src/components/LoadoutEquipment/index.tsx @@ -66,7 +66,8 @@ function Slot({ slot, slotIndex, selected, onToggle }: SlotProps) { onToggle(slotIndex, optionIndex)} diff --git a/packages/website/src/components/LoadoutModules/index.tsx b/packages/website/src/components/LoadoutModules/index.tsx index 5f306f8fb..5d232502f 100644 --- a/packages/website/src/components/LoadoutModules/index.tsx +++ b/packages/website/src/components/LoadoutModules/index.tsx @@ -213,7 +213,8 @@ function ModuleNode({ onToggle(provision.id)} diff --git a/packages/website/src/components/LoadoutShells/index.tsx b/packages/website/src/components/LoadoutShells/index.tsx index bc2c030a5..81c85ea44 100644 --- a/packages/website/src/components/LoadoutShells/index.tsx +++ b/packages/website/src/components/LoadoutShells/index.tsx @@ -31,7 +31,8 @@ export function LoadoutShells({ gun, selected, onSelect }: LoadoutShellsProps) { size="major" radius="1" color={isSelected ? undefined : "gray"} - variant={isSelected ? "surface" : "soft"} + variant={isSelected ? "solid" : "soft"} + highContrast={isSelected} parentListChild="horizontal" onClick={() => onSelect(candidate.id)} > diff --git a/packages/website/src/components/LoadoutSkills/index.tsx b/packages/website/src/components/LoadoutSkills/index.tsx index 50ef659c5..5f243eb02 100644 --- a/packages/website/src/components/LoadoutSkills/index.tsx +++ b/packages/website/src/components/LoadoutSkills/index.tsx @@ -41,7 +41,8 @@ function Content({ selected, onChange }: ContentProps) { ? undefined : "amber" } - variant={level === 0 ? "soft" : "surface"} + variant={level === 0 ? "soft" : "solid"} + highContrast={level !== 0} onClick={(event) => { if (event.shiftKey) { onChange(skill, level === 0 ? MAX_SKILL_LEVEL : 0); diff --git a/packages/website/src/components/LoadoutStatus/index.tsx b/packages/website/src/components/LoadoutStatus/index.tsx index 35b62842e..31886a369 100644 --- a/packages/website/src/components/LoadoutStatus/index.tsx +++ b/packages/website/src/components/LoadoutStatus/index.tsx @@ -46,7 +46,8 @@ export function LoadoutStatus({ radius="1" className={styles.state} color={status[key] ? "amber" : "gray"} - variant={status[key] ? "surface" : "soft"} + variant={status[key] ? "solid" : "soft"} + highContrast={status[key]} onClick={() => onToggle(key)} >