Skip to content

Commit ce5fdeb

Browse files
committed
fix: fixed regression in list marker positioning
1 parent ed1f5e9 commit ce5fdeb

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lib/src/css_box_widget.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,15 @@ class RenderCSSBox extends RenderBox
616616
RenderBox? markerBox = childParentData.nextSibling;
617617
if (markerBox != null) {
618618
final markerBoxParentData = markerBox.parentData! as CSSBoxParentData;
619-
final distance = (child.getDistanceToBaseline(TextBaseline.alphabetic,
620-
onlyReal: true) ??
621-
0) +
622-
topOffset;
623-
final offsetHeight = distance -
624-
(markerBox.getDistanceToBaseline(TextBaseline.alphabetic) ??
625-
markerBox.size.height);
619+
// final distance = (child.getDistanceToBaseline(TextBaseline.alphabetic,
620+
// onlyReal: true) ??
621+
// 0) +
622+
// topOffset;
623+
// final offsetHeight = distance -
624+
// (markerBox.getDistanceToBaseline(TextBaseline.alphabetic) ??
625+
// markerBox.size.height);
626+
// TODO handle block children better by modifying above approach
627+
final offsetHeight = topOffset;
626628
switch (_textDirection) {
627629
case TextDirection.rtl:
628630
markerBoxParentData.offset = Offset(

lib/src/style.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class Style {
297297

298298
TextStyle generateTextStyle() {
299299
return TextStyle(
300-
backgroundColor: backgroundColor,
300+
backgroundColor: (display?.isBlock ?? false) ? null : backgroundColor,
301301
color: color,
302302
decoration: textDecoration,
303303
decorationColor: textDecorationColor,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy