From 69156c3aa62820985765623c67f86bbb95fec22c Mon Sep 17 00:00:00 2001 From: mark-sil Date: Wed, 3 Sep 2025 11:02:53 -0400 Subject: [PATCH] LT-22185: XHTML: Fix style when there are multiple ws GenerateCssFromWsOptions() was only generating rules for one writing system. Changed this to generate rules for all enabled writing systems. Change-Id: Ib6ae4165366774653c137b876f18447024c5ce0c --- Src/xWorks/CssGenerator.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Src/xWorks/CssGenerator.cs b/Src/xWorks/CssGenerator.cs index 05fcccfb07..5c807fd266 100644 --- a/Src/xWorks/CssGenerator.cs +++ b/Src/xWorks/CssGenerator.cs @@ -689,6 +689,7 @@ private static StyleRule AdjustRuleIfParagraphNumberScheme(StyleRule rule, Confi private static List GenerateCssFromWsOptions(ConfigurableDictionaryNode configNode, DictionaryNodeWritingSystemOptions wsOptions, string baseSelection, ReadOnlyPropertyTable propertyTable) { + var rules = new List(); var cache = propertyTable.GetValue("cache"); foreach(var ws in wsOptions.Options.Where(opt => opt.IsEnabled)) { @@ -700,10 +701,10 @@ private static List GenerateCssFromWsOptions(ConfigurableDictionaryNo if (!string.IsNullOrEmpty(configNode.Style)) wsRule.Declarations.Properties.AddRange(GenerateCssStyleFromLcmStyleSheet(configNode.Style, wsId, propertyTable)); if (!IsEmptyRule(wsRule)) - return new List {wsRule}; + rules.Add(wsRule); } - return new List(); + return rules; } private static List GenerateCssForWritingSystemPrefix(ConfigurableDictionaryNode configNode, string baseSelection, ReadOnlyPropertyTable propertyTable)