diff --git a/lib/src/css_box_widget.dart b/lib/src/css_box_widget.dart index 1926a43cd5..20843fdd8d 100644 --- a/lib/src/css_box_widget.dart +++ b/lib/src/css_box_widget.dart @@ -103,16 +103,15 @@ class CssBoxWidget extends StatelessWidget { } } - return Text.rich( - TextSpan( + return RichText( + text: TextSpan( style: style.generateTextStyle(), children: children, ), - style: style.generateTextStyle(), - textAlign: style.textAlign, + textAlign: style.textAlign ?? TextAlign.start, textDirection: style.direction, maxLines: style.maxLines, - overflow: style.textOverflow, + overflow: style.textOverflow ?? TextOverflow.clip, ); } diff --git a/lib/src/style/fontsize.dart b/lib/src/style/fontsize.dart index d3ed2c13ef..793124fe14 100644 --- a/lib/src/style/fontsize.dart +++ b/lib/src/style/fontsize.dart @@ -5,11 +5,7 @@ class FontSize extends LengthOrPercent { // These values are calculated based off of the default (`medium`) // being 14px. - // - // TODO(Sub6Resources): This seems to override Flutter's accessibility text scaling. - // - // Negative values are computed during parsing to be a percentage of - // the parent style's font size. + // TODO calculate from https://w3c.github.io/csswg-drafts/css-fonts-3/#absolute-size-value static final xxSmall = FontSize(7.875); static final xSmall = FontSize(8.75); static final small = FontSize(11.375);