@@ -6,7 +6,6 @@ import 'package:flutter/rendering.dart';
6
6
7
7
import '../model/content.dart' ;
8
8
import '../model/katex.dart' ;
9
- import 'content.dart' ;
10
9
11
10
/// Creates a base text style for rendering KaTeX content.
12
11
///
@@ -16,17 +15,14 @@ import 'content.dart';
16
15
/// https://github.com/KaTeX/KaTeX/blob/613c3da8/src/styles/katex.scss#L13-L15
17
16
///
18
17
/// Requires the [ambientStyle.fontSize] to be non-null.
19
- TextStyle mkBaseKatexTextStyle (TextStyle ambientStyle, Color baseColor ) {
18
+ TextStyle mkBaseKatexTextStyle (TextStyle ambientStyle) {
20
19
return ambientStyle.copyWith (
21
20
////// Overrides of our own styles:
22
21
23
22
// Bold formatting is removed below by setting FontWeight.normal…
24
23
// Just for completeness, remove "wght", but it wouldn't do anything anyway
25
24
// since KaTeX_Main is not a variable-weight font.
26
25
fontVariations: [],
27
- // Remove link color, but
28
- // TODO(#1823) do we want to do that? Web doesn't.
29
- color: baseColor,
30
26
// Italic is removed below.
31
27
32
28
// Strikethrough is removed below, which affects formatting of rendered
@@ -68,8 +64,7 @@ class KatexWidget extends StatelessWidget {
68
64
return Directionality (
69
65
textDirection: TextDirection .ltr,
70
66
child: DefaultTextStyle (
71
- style: mkBaseKatexTextStyle (ambientTextStyle,
72
- ContentTheme .of (context).textStylePlainParagraph.color! ),
67
+ style: mkBaseKatexTextStyle (ambientTextStyle),
73
68
child: widget));
74
69
}
75
70
}
0 commit comments