fix(typography): bake the prototype colour into eyebrowLabel
The prototype's eyebrows are always rgba(242,247,250,.42) (t4 lines 254, 299, 381, 450, 511, 660). eyebrowLabel set size/weight/letter- spacing only, no colour, so every call site (settings group headers, vacation section titles, the ringing screen's snooze label) rendered at whatever full-opacity default the ambient text theme resolved to. One factory-level change fixes every current and future consumer of PluriWaveTypography.eyebrowLabel — no call site needs editing. S9, Tier 1 visual-fidelity pass (audit id 2521).
This commit is contained in:
@@ -52,12 +52,14 @@ class PluriWaveTypography extends ThemeExtension<PluriWaveTypography> {
|
|||||||
FontWeight fontWeight, {
|
FontWeight fontWeight, {
|
||||||
double? letterSpacing,
|
double? letterSpacing,
|
||||||
double? height,
|
double? height,
|
||||||
|
Color? color,
|
||||||
}) {
|
}) {
|
||||||
return fallback.copyWith(
|
return fallback.copyWith(
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
fontWeight: fontWeight,
|
fontWeight: fontWeight,
|
||||||
letterSpacing: letterSpacing,
|
letterSpacing: letterSpacing,
|
||||||
height: height,
|
height: height,
|
||||||
|
color: color,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +69,16 @@ class PluriWaveTypography extends ThemeExtension<PluriWaveTypography> {
|
|||||||
screenTitle: style(19, FontWeight.w800, letterSpacing: -0.4),
|
screenTitle: style(19, FontWeight.w800, letterSpacing: -0.4),
|
||||||
cardTitle: style(14.5, FontWeight.w700),
|
cardTitle: style(14.5, FontWeight.w700),
|
||||||
bodyStrong: style(13, FontWeight.w600),
|
bodyStrong: style(13, FontWeight.w600),
|
||||||
eyebrowLabel: style(11, FontWeight.w800, letterSpacing: 0.8),
|
// S9 (Tier 1 visual fidelity): the prototype's eyebrows are always
|
||||||
|
// rgba(242,247,250,.42) (t4 lines 254, 299, 381, 450, 511, 660) — this
|
||||||
|
// style used to carry no colour at all, so it rendered at whatever
|
||||||
|
// full-opacity default the ambient text theme resolved to.
|
||||||
|
eyebrowLabel: style(
|
||||||
|
11,
|
||||||
|
FontWeight.w800,
|
||||||
|
letterSpacing: 0.8,
|
||||||
|
color: const Color(0xFFF2F7FA).withValues(alpha: 0.42),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,15 @@ void main() {
|
|||||||
expect(type.eyebrowLabel.letterSpacing, 0.8);
|
expect(type.eyebrowLabel.letterSpacing, 0.8);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('S9 (Tier 1 visual fidelity): eyebrowLabel bakes in the prototype '
|
||||||
|
"colour rgba(242,247,250,.42) — it used to carry no colour at all, "
|
||||||
|
'so it rendered at full onSurface opacity', () {
|
||||||
|
expect(
|
||||||
|
type.eyebrowLabel.color,
|
||||||
|
const Color(0xFFF2F7FA).withValues(alpha: 0.42),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
testWidgets('context.pluriType exposes the registered extension', (
|
testWidgets('context.pluriType exposes the registered extension', (
|
||||||
tester,
|
tester,
|
||||||
) async {
|
) async {
|
||||||
|
|||||||
Reference in New Issue
Block a user