Skip to content

Commit 7ef745f

Browse files
chrisbobbegnprice
authored andcommitted
content: Follow web in setting 1.4x line height for code blocks
(And apply the same change to our simplified math blocks, which use this variable too.) This was ~1.29x in the previous commit, and 1.43x before that. (The 1.43x was conveniently very close to 1.4x, but that was basically an accident. It's so close that on my device I can't see a difference in a screenful of code block content...perhaps there's a step that rounds to a physical-pixel count, and the difference might be observable on a device with a higher pixel density than mine.)
1 parent 1795a3d commit 7ef745f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/widgets/content.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,10 @@ final _kInlineCodeStyle = kMonospaceTextStyle
858858
backgroundColor: const HSLColor.fromAHSL(0.04, 0, 0, 0).toColor()));
859859

860860
final _kCodeBlockStyle = kMonospaceTextStyle
861-
.merge(const TextStyle(fontSize: 0.825 * kBaseFontSize));
861+
.merge(const TextStyle(
862+
fontSize: 0.825 * kBaseFontSize,
863+
height: 1.4,
864+
));
862865

863866
// const _kInlineCodeLeftBracket = '⸤';
864867
// const _kInlineCodeRightBracket = '⸣';

0 commit comments

Comments
 (0)