@@ -15,9 +15,9 @@ import 'content.dart';
1515/// and applies the CSS styles defined in .katex class in katex.scss :
1616/// https://github.com/KaTeX/KaTeX/blob/613c3da8/src/styles/katex.scss#L13-L15
1717///
18- /// Requires the [style .fontSize] to be non-null.
19- TextStyle mkBaseKatexTextStyle (TextStyle style , Color baseColor) {
20- return style .copyWith (
18+ /// Requires the [ambientStyle .fontSize] to be non-null.
19+ TextStyle mkBaseKatexTextStyle (TextStyle ambientStyle , Color baseColor) {
20+ return ambientStyle .copyWith (
2121 ////// Overrides of our own styles:
2222
2323 // Bold formatting is removed below by setting FontWeight.normal…
@@ -32,7 +32,7 @@ TextStyle mkBaseKatexTextStyle(TextStyle style, Color baseColor) {
3232
3333 ////// From the .katex class in katex.scss:
3434
35- fontSize: style .fontSize! * 1.21 ,
35+ fontSize: ambientStyle .fontSize! * 1.21 ,
3636 fontFamily: 'KaTeX_Main' ,
3737 height: 1.2 ,
3838 fontWeight: FontWeight .normal,
@@ -47,11 +47,11 @@ TextStyle mkBaseKatexTextStyle(TextStyle style, Color baseColor) {
4747class KatexWidget extends StatelessWidget {
4848 const KatexWidget ({
4949 super .key,
50- required this .textStyle ,
50+ required this .ambientTextStyle ,
5151 required this .nodes,
5252 });
5353
54- final TextStyle textStyle ;
54+ final TextStyle ambientTextStyle ;
5555 final List <KatexNode > nodes;
5656
5757 @override
@@ -61,7 +61,7 @@ class KatexWidget extends StatelessWidget {
6161 return Directionality (
6262 textDirection: TextDirection .ltr,
6363 child: DefaultTextStyle (
64- style: mkBaseKatexTextStyle (textStyle ,
64+ style: mkBaseKatexTextStyle (ambientTextStyle ,
6565 ContentTheme .of (context).textStylePlainParagraph.color! ),
6666 child: widget));
6767 }
0 commit comments