diff --git a/lib/tema/pluriwave_typography.dart b/lib/tema/pluriwave_typography.dart index 8a8d5e3..22b5155 100644 --- a/lib/tema/pluriwave_typography.dart +++ b/lib/tema/pluriwave_typography.dart @@ -52,12 +52,14 @@ class PluriWaveTypography extends ThemeExtension { FontWeight fontWeight, { double? letterSpacing, double? height, + Color? color, }) { return fallback.copyWith( fontSize: fontSize, fontWeight: fontWeight, letterSpacing: letterSpacing, height: height, + color: color, ); } @@ -67,7 +69,16 @@ class PluriWaveTypography extends ThemeExtension { screenTitle: style(19, FontWeight.w800, letterSpacing: -0.4), cardTitle: style(14.5, FontWeight.w700), 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), + ), ); } diff --git a/test/tema/pluriwave_typography_test.dart b/test/tema/pluriwave_typography_test.dart index 7d286b3..aff2587 100644 --- a/test/tema/pluriwave_typography_test.dart +++ b/test/tema/pluriwave_typography_test.dart @@ -65,6 +65,15 @@ void main() { 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', ( tester, ) async {