@@ -92,7 +92,6 @@ public void Initialize(string appDataFolder)
9292
9393 public async Task < ReportGeneratorResult > GenerateAsync ( IEnumerable < string > coverOutputFiles , string reportOutputFolder , bool throwError = false )
9494 {
95- var darkMode = false ;
9695 var title = "ReportGenerator Run" ;
9796
9897 var unifiedHtmlFile = Path . Combine ( reportOutputFolder , "index.html" ) ;
@@ -181,7 +180,7 @@ async Task<bool> run(string outputReportType, string inputReports)
181180
182181 }
183182
184- private void SetInitialStyle (HtmlAgilityPack.HtmlDocument document)
183+ private void SetInitialTheme (HtmlAgilityPack.HtmlDocument document)
185184 {
186185
187186 var backgroundColor = ToJsColour(reportColours.BackgroundColour);
@@ -277,7 +276,7 @@ public string ProcessUnifiedHtml(string htmlForProcessing, string reportOutputFo
277276
278277
279278 doc.LoadHtml(htmlForProcessing);
280- SetInitialStyle (doc);
279+ SetInitialTheme (doc);
281280 htmlForProcessing = null;
282281
283282 doc.DocumentNode.QuerySelectorAll(".footer").ToList().ForEach(x => x.SetAttributeValue("style", "display:none"));
@@ -374,8 +373,8 @@ public string ProcessUnifiedHtml(string htmlForProcessing, string reportOutputFo
374373 table,tr,th,td {{ font-size: small; }}
375374 body {{ -webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none }}
376375 table.overview th, table.overview td {{ font-size: small; white-space: nowrap; word-break: normal; padding-left:10px;padding-right:10px; }}
377- coverage-info div.customizebox div:nth-child(2) {{ opacity:0 ;font-size:1px;height:1px;padding:0;border:0;margin:0 }} */
378- coverage-info div.customizebox div:nth-child(2) * {{ opacity:0 ;font-size:1px;height:1px;padding:0;border:0;margin:0 }} */
376+ coverage-info div.customizebox div:nth-child(2) {{ visibility:hidden ;font-size:1px;height:1px;padding:0;border:0;margin:0 }}
377+ coverage-info div.customizebox div:nth-child(2) * {{ visibility:hidden ;font-size:1px;height:1px;padding:0;border:0;margin:0 }}
379378 table,tr,th,td {{ border: 1px solid; font-size: small; }}
380379 input[type=text] {{ color:{ToJsColour(reportColours.TextBoxTextColour)}; background-color:{ToJsColour(reportColours.TextBoxColour)};border-color:{ToJsColour(reportColours.TextBoxBorderColour)} }}
381380 select {{ color:{ToJsColour(reportColours.ComboBoxTextColour)}; background-color:{ToJsColour(reportColours.ComboBoxColour)};border-color:{ToJsColour(reportColours.ComboBoxBorderColour)} }}
@@ -405,79 +404,79 @@ function getStyleSheetById(id){{
405404 }}
406405 }}
407406 }}
408- function {ThemeChangedJSFunctionName}(colours ){{
407+ function {ThemeChangedJSFunctionName}(theme ){{
409408 var fccMediaStylesheet = getStyleSheetById('fccMediaStyle');
410409 var highContrastRule = fccMediaStylesheet.cssRules[1]
411410 var highContrastRules = highContrastRule.cssRules
412- getStyleBySelector(highContrastRules,'table.coverage > td.gray').setProperty('background-color',colours .{nameof(JsThemeStyling.GrayCoverage)});
411+ getStyleBySelector(highContrastRules,'table.coverage > td.gray').setProperty('background-color',theme .{nameof(JsThemeStyling.GrayCoverage)});
413412
414413 var fccStyleSheet1Rules = getStyleSheetById('fccStyle1').cssRules;
415414
416415 var scrollBarStyle = getStyleBySelector(fccStyleSheet1Rules,'body, html');
417- scrollBarStyle.setProperty('scrollbar-arrow-color',colours .{nameof(JsThemeStyling.ScrollBarArrow)});
418- scrollBarStyle.setProperty('scrollbar-track-color',colours .{nameof(JsThemeStyling.ScrollBarTrack)});
419- scrollBarStyle.setProperty('scrollbar-face-color',colours .{nameof(JsThemeStyling.ScrollBarThumb)});
420- scrollBarStyle.setProperty('scrollbar-shadow-color',colours .{nameof(JsThemeStyling.ScrollBarThumb)});
421- scrollBarStyle.setProperty('scrollbar-highlight-color',colours .{nameof(JsThemeStyling.ScrollBarThumb)});
422- scrollBarStyle.setProperty('scrollbar-3dlight-color',colours .{nameof(JsThemeStyling.ScrollBarThumb)});
423- scrollBarStyle.setProperty('scrollbar-darkshadow-color',colours .{nameof(JsThemeStyling.ScrollBarThumb)});
424-
425- getStyleBySelector(fccStyleSheet1Rules,'*, body').setProperty('color',colours .{nameof(JsThemeStyling.FontColour)});
416+ scrollBarStyle.setProperty('scrollbar-arrow-color',theme .{nameof(JsThemeStyling.ScrollBarArrow)});
417+ scrollBarStyle.setProperty('scrollbar-track-color',theme .{nameof(JsThemeStyling.ScrollBarTrack)});
418+ scrollBarStyle.setProperty('scrollbar-face-color',theme .{nameof(JsThemeStyling.ScrollBarThumb)});
419+ scrollBarStyle.setProperty('scrollbar-shadow-color',theme .{nameof(JsThemeStyling.ScrollBarThumb)});
420+ scrollBarStyle.setProperty('scrollbar-highlight-color',theme .{nameof(JsThemeStyling.ScrollBarThumb)});
421+ scrollBarStyle.setProperty('scrollbar-3dlight-color',theme .{nameof(JsThemeStyling.ScrollBarThumb)});
422+ scrollBarStyle.setProperty('scrollbar-darkshadow-color',theme .{nameof(JsThemeStyling.ScrollBarThumb)});
423+
424+ getStyleBySelector(fccStyleSheet1Rules,'*, body').setProperty('color',theme .{nameof(JsThemeStyling.FontColour)});
426425 var textStyle = getStyleBySelector(fccStyleSheet1Rules,'input[type=text]');
427- textStyle.setProperty('color',colours .{nameof(JsThemeStyling.TextBoxTextColour)});
428- textStyle.setProperty('background-color',colours .{nameof(JsThemeStyling.TextBoxColour)});
429- textStyle.setProperty('border-color',colours .{nameof(JsThemeStyling.TextBoxBorderColour)});
426+ textStyle.setProperty('color',theme .{nameof(JsThemeStyling.TextBoxTextColour)});
427+ textStyle.setProperty('background-color',theme .{nameof(JsThemeStyling.TextBoxColour)});
428+ textStyle.setProperty('border-color',theme .{nameof(JsThemeStyling.TextBoxBorderColour)});
430429
431430 var comboStyle = getStyleBySelector(fccStyleSheet1Rules,'select');
432- comboStyle.setProperty('color',colours .{nameof(JsThemeStyling.ComboBoxText)});
433- comboStyle.setProperty('background-color',colours .{nameof(JsThemeStyling.ComboBox)});
434- comboStyle.setProperty('border-color',colours .{nameof(JsThemeStyling.ComboBoxBorder)});
431+ comboStyle.setProperty('color',theme .{nameof(JsThemeStyling.ComboBoxText)});
432+ comboStyle.setProperty('background-color',theme .{nameof(JsThemeStyling.ComboBox)});
433+ comboStyle.setProperty('border-color',theme .{nameof(JsThemeStyling.ComboBoxBorder)});
435434
436435 var fccStyleSheet2Rules = getStyleSheetById('fccStyle2').cssRules;
437- getStyleBySelector(fccStyleSheet2Rules,'#divHeader').setProperty('background-color',colours .{nameof(JsThemeStyling.DivHeaderBackgroundColour)});
436+ getStyleBySelector(fccStyleSheet2Rules,'#divHeader').setProperty('background-color',theme .{nameof(JsThemeStyling.DivHeaderBackgroundColour)});
438437 var headerTabsStyle = getStyleBySelector(fccStyleSheet2Rules,'table#headerTabs td');
439- headerTabsStyle.setProperty('color',colours .{nameof(JsThemeStyling.HeaderFontColour)});
440- headerTabsStyle.setProperty('border-color',colours .{nameof(JsThemeStyling.HeaderBorderColour)});
441- getStyleBySelector(fccStyleSheet2Rules,'table#headerTabs td.tab').setProperty('background-color',colours .{nameof(JsThemeStyling.TabBackgroundColour)});
438+ headerTabsStyle.setProperty('color',theme .{nameof(JsThemeStyling.HeaderFontColour)});
439+ headerTabsStyle.setProperty('border-color',theme .{nameof(JsThemeStyling.HeaderBorderColour)});
440+ getStyleBySelector(fccStyleSheet2Rules,'table#headerTabs td.tab').setProperty('background-color',theme .{nameof(JsThemeStyling.TabBackgroundColour)});
442441
443442 var mainStyle = document.styleSheets[0];
444443 var mainRules = mainStyle.cssRules;
445444
446- getStyleBySelector(mainRules,'.gray').setProperty('background-color',colours .{nameof(JsThemeStyling.GrayCoverage)});
445+ getStyleBySelector(mainRules,'.gray').setProperty('background-color',theme .{nameof(JsThemeStyling.GrayCoverage)});
447446
448- getStyleBySelector(mainRules,'html').setProperty('background-color',colours .{nameof(JsThemeStyling.BackgroundColour)});
449- getStyleBySelector(mainRules,'.container').setProperty('background-color',colours .{nameof(JsThemeStyling.BackgroundColour)});
447+ getStyleBySelector(mainRules,'html').setProperty('background-color',theme .{nameof(JsThemeStyling.BackgroundColour)});
448+ getStyleBySelector(mainRules,'.container').setProperty('background-color',theme .{nameof(JsThemeStyling.BackgroundColour)});
450449
451- var overviewTableBorder = '1px solid ' + colours .{nameof(JsThemeStyling.TableBorderColour)};
450+ var overviewTableBorder = '1px solid ' + theme .{nameof(JsThemeStyling.TableBorderColour)};
452451 var overviewStyle = getStyleBySelector(mainRules,'.overview');
453452 overviewStyle.setProperty('border',overviewTableBorder);
454453 var overviewThStyle = getStyleBySelector(mainRules,'.overview th');
455- overviewThStyle.setProperty('background-color',colours .{nameof(JsThemeStyling.BackgroundColour)});
454+ overviewThStyle.setProperty('background-color',theme .{nameof(JsThemeStyling.BackgroundColour)});
456455 overviewThStyle.setProperty('border',overviewTableBorder);
457456 var overviewTdStyle = getStyleBySelector(mainRules,'.overview td');
458457 overviewTdStyle.setProperty('border',overviewTableBorder);
459458
460459 var overviewHeaderLinksStyle = getStyleBySelector(mainRules,'.overview th a');
461- overviewHeaderLinksStyle.setProperty('color',colours .{nameof(JsThemeStyling.CoverageTableHeaderFontColour)});
460+ overviewHeaderLinksStyle.setProperty('color',theme .{nameof(JsThemeStyling.CoverageTableHeaderFontColour)});
462461
463462 var overviewTrHoverStyle = getStyleBySelector(mainRules,'.overview tr:hover');
464- overviewTrHoverStyle.setProperty('background',colours .{nameof(JsThemeStyling.CoverageTableRowHoverBackgroundColour)});
463+ overviewTrHoverStyle.setProperty('background',theme .{nameof(JsThemeStyling.CoverageTableRowHoverBackgroundColour)});
465464
466465 var linkStyle = getStyleBySelector(mainRules,'a');
467466 var linkHoverStyle = getStyleBySelector(mainRules,'a:hover');
468- linkStyle.setProperty('color',colours .{nameof(JsThemeStyling.LinkColour)});
469- linkHoverStyle.setProperty('color',colours .{nameof(JsThemeStyling.LinkColour)});
467+ linkStyle.setProperty('color',theme .{nameof(JsThemeStyling.LinkColour)});
468+ linkHoverStyle.setProperty('color',theme .{nameof(JsThemeStyling.LinkColour)});
470469
471470 var iconPlusStyle = getStyleBySelector(mainRules,'.icon-plus');
472- iconPlusStyle.setProperty('background-image',colours .{nameof(JsThemeStyling.PlusBase64)});
471+ iconPlusStyle.setProperty('background-image',theme .{nameof(JsThemeStyling.PlusBase64)});
473472 var iconMinusStyle = getStyleBySelector(mainRules,'.icon-minus');
474- iconMinusStyle.setProperty('background-image',colours .{nameof(JsThemeStyling.MinusBase64)});
473+ iconMinusStyle.setProperty('background-image',theme .{nameof(JsThemeStyling.MinusBase64)});
475474 var iconDownActiveStyle = getStyleBySelector(mainRules,'.icon-down-dir_active');
476- iconDownActiveStyle.setProperty('background-image',colours .{nameof(JsThemeStyling.DownActiveBase64)});
475+ iconDownActiveStyle.setProperty('background-image',theme .{nameof(JsThemeStyling.DownActiveBase64)});
477476 var iconDownInactiveStyle = getStyleBySelector(mainRules,'.icon-down-dir');
478- iconDownInactiveStyle.setProperty('background-image',colours .{nameof(JsThemeStyling.DownInactiveBase64)});
477+ iconDownInactiveStyle.setProperty('background-image',theme .{nameof(JsThemeStyling.DownInactiveBase64)});
479478 var iconUpActiveStyle = getStyleBySelector(mainRules,'.icon-up-dir_active');
480- iconUpActiveStyle.setProperty('background-image',colours .{nameof(JsThemeStyling.UpActiveBase64)});
479+ iconUpActiveStyle.setProperty('background-image',theme .{nameof(JsThemeStyling.UpActiveBase64)});
481480 }}
482481 var htmlExtension = '.html';
483482
@@ -528,7 +527,6 @@ function getStyleSheetById(id){{
528527
529528 htmlSb.Replace("</head>", $@"
530529 <style type=""text/css"" id='fccMediaStyle'>
531- table.overview.table-fixed.stripped > thead > tr > th:nth-of-type(4) > a:nth-of-type(2) {{ display: none; }}
532530 @media screen and (-ms-high-contrast:active){{
533531 table.coverage > td.green{{ background-color: windowText }}
534532 table.coverage > td.gray{{
0 commit comments