polish(ux): selected filter chips fill solid for clear contrast
The selected state used a pale tonal container (seedPrimaryContainer) that sat almost on top of the pale canvas, so 'on' barely read. Selected chips now fill solid — seedGreen for the plain attribute/market chips and the swatch's own ink for family/form chips — with white label, icon and checkmark. Idle chips stay light with dark ink, so the on/off jump is unmistakable. White-on-ink AA is locked by a new contrast test.
This commit is contained in:
parent
805f1dc535
commit
4a1e72bc7e
5 changed files with 53 additions and 12 deletions
|
|
@ -35,4 +35,19 @@ void main() {
|
|||
reason: '$type ink on fill');
|
||||
}
|
||||
});
|
||||
|
||||
// A *selected* swatch chip fills solid with its ink and draws white content
|
||||
// (label, icon, checkmark). That pairing must clear AA too.
|
||||
test('white content meets AA on every selected (ink-filled) swatch', () {
|
||||
for (var i = 0; i < 60; i++) {
|
||||
final s = categorySwatch('family-$i');
|
||||
expect(contrast(Colors.white, s.ink), greaterThanOrEqualTo(4.5),
|
||||
reason: 'white on category-$i ink');
|
||||
}
|
||||
for (final type in LotType.values) {
|
||||
final s = lotTypeSwatch(type);
|
||||
expect(contrast(Colors.white, s.ink), greaterThanOrEqualTo(4.5),
|
||||
reason: 'white on $type ink');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue