diff --git a/lib/src/css_box_widget.dart b/lib/src/css_box_widget.dart index c6870a3929..77d545d022 100644 --- a/lib/src/css_box_widget.dart +++ b/lib/src/css_box_widget.dart @@ -616,13 +616,15 @@ class RenderCSSBox extends RenderBox RenderBox? markerBox = childParentData.nextSibling; if (markerBox != null) { final markerBoxParentData = markerBox.parentData! as CSSBoxParentData; - final distance = (child.getDistanceToBaseline(TextBaseline.alphabetic, - onlyReal: true) ?? - 0) + - topOffset; - final offsetHeight = distance - - (markerBox.getDistanceToBaseline(TextBaseline.alphabetic) ?? - markerBox.size.height); + // final distance = (child.getDistanceToBaseline(TextBaseline.alphabetic, + // onlyReal: true) ?? + // 0) + + // topOffset; + // final offsetHeight = distance - + // (markerBox.getDistanceToBaseline(TextBaseline.alphabetic) ?? + // markerBox.size.height); + // TODO handle block children better by modifying above approach + final offsetHeight = topOffset; switch (_textDirection) { case TextDirection.rtl: markerBoxParentData.offset = Offset( diff --git a/lib/src/style.dart b/lib/src/style.dart index 3d293de8b0..e605ee43fa 100644 --- a/lib/src/style.dart +++ b/lib/src/style.dart @@ -297,7 +297,7 @@ class Style { TextStyle generateTextStyle() { return TextStyle( - backgroundColor: backgroundColor, + backgroundColor: (display?.isBlock ?? false) ? null : backgroundColor, color: color, decoration: textDecoration, decorationColor: textDecorationColor,