@@ -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…
@@ -39,7 +39,7 @@ TextStyle mkBaseKatexTextStyle(TextStyle style, Color baseColor) {
3939
4040 ////// From the .katex class in katex.scss:
4141
42- fontSize: style .fontSize! * 1.21 ,
42+ fontSize: ambientStyle .fontSize! * 1.21 ,
4343 fontFamily: 'KaTeX_Main' ,
4444 height: 1.2 ,
4545 fontWeight: FontWeight .normal,
@@ -54,11 +54,11 @@ TextStyle mkBaseKatexTextStyle(TextStyle style, Color baseColor) {
5454class KatexWidget extends StatelessWidget {
5555 const KatexWidget ({
5656 super .key,
57- required this .textStyle ,
57+ required this .ambientTextStyle ,
5858 required this .nodes,
5959 });
6060
61- final TextStyle textStyle ;
61+ final TextStyle ambientTextStyle ;
6262 final List <KatexNode > nodes;
6363
6464 @override
@@ -68,7 +68,7 @@ class KatexWidget extends StatelessWidget {
6868 return Directionality (
6969 textDirection: TextDirection .ltr,
7070 child: DefaultTextStyle (
71- style: mkBaseKatexTextStyle (textStyle ,
71+ style: mkBaseKatexTextStyle (ambientTextStyle ,
7272 ContentTheme .of (context).textStylePlainParagraph.color! ),
7373 child: widget));
7474 }
0 commit comments