From fcfb40549acdf9322960244c19559a894d6b857a Mon Sep 17 00:00:00 2001 From: litruv Date: Tue, 3 Nov 2026 09:30:11 +1100 Subject: [PATCH] Raise ContainerColor's specificity so the theme text color beats folds' DefaultReset in any stylesheet order. --- src/app/styles/ContainerColor.css.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/styles/ContainerColor.css.ts b/src/app/styles/ContainerColor.css.ts index cefc5256..7c4ba4f6 100644 --- a/src/app/styles/ContainerColor.css.ts +++ b/src/app/styles/ContainerColor.css.ts @@ -7,9 +7,16 @@ const getVariant = (variant: TContainerColor): ComplexStyleRule => ({ backgroundColor: color[variant].Container, borderColor: color[variant].ContainerLine, outlineColor: color[variant].ContainerLine, - color: color[variant].OnContainer, }, selectors: { + // DefaultReset sets `color: inherit` with the same specificity as this rule, + // so which one wins depends on stylesheet order. In the Android build the + // ContainerColor chunk is emitted before folds' reset, so the theme color + // loses and text falls back to the initial color. Raise specificity so the + // theme color wins regardless of order. + '&[class]': { + color: color[variant].OnContainer, + }, 'button&[aria-pressed=true]': { backgroundColor: color[variant].ContainerActive, },