From d297c2be563f1f59ea17c3bc7dbf0b46340de8ab Mon Sep 17 00:00:00 2001 From: Chanan Braunstein Date: Fri, 9 Aug 2019 08:39:36 -0600 Subject: [PATCH] #16 --- src/BlazorPrettyCode/PrettyCode.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/BlazorPrettyCode/PrettyCode.cs b/src/BlazorPrettyCode/PrettyCode.cs index 036acac..c52f3b4 100644 --- a/src/BlazorPrettyCode/PrettyCode.cs +++ b/src/BlazorPrettyCode/PrettyCode.cs @@ -267,15 +267,21 @@ private async Task InitThemeCss() private void InitCSS() { _basePreClass = _styled.Css(@" + label: pre; display: table; table-layout: fixed; width: 100%; -webkit-border-radius: 5px; + line-height: 1.5em; @media only screen and (min-width: 320px) and (max-width: 480px) { font-size: 50%; + line-height: 1em; + margin-bottom: 0.25em; } @media (min-width: 481px) and (max-width: 1223px) { font-size: 80%; + line-height: 1.25em; + margin-bottom: 0.5em; } &:before { counter-reset: linenum; @@ -285,11 +291,13 @@ @media only screen and (min-width: 320px) and (max-width: 480px) { //Code Row _baseRowSpan = _styled.Css(@" + label: row; display: table-row; counter-increment: linenum; "); _baseLineNumbersCell = _styled.Css(@" + label: number-cell; display: table-cell; user-select: none; -moz-user-select: none; @@ -306,23 +314,29 @@ @media only screen and (min-width: 320px) and (max-width: 480px) { "); _baseCodeCell = _styled.Css(@" + label: code-cell; display: table-cell; padding-left: 1em; + line-height: 1.5em; @media only screen and (min-width: 320px) and (max-width: 480px) { font-size: 50%; + line-height: 1em; } @media (min-width: 481px) and (max-width: 1223px) { font-size: 80%; + line-height: 1.25em; } "); //Title Row _baseRowSpanTitle = _styled.Css(@" + label: title-row; display: table-row; "); _baseCellSpacer = _styled.Css(@" + label: cell-spacer; display: table-cell; user-select: none; -moz-user-select: none; @@ -334,6 +348,7 @@ @media only screen and (min-width: 320px) and (max-width: 480px) { "); _baseCellTitle = _styled.Css(@" + label: cell-title; display: table-cell; padding: 0.4em 1em 0.4em; font-weight: bold;