Unplanned
Last Updated: 29 Apr 2025 10:39 by Kruparao
Kruparao
Created on: 29 Apr 2025 10:39
Category: WordsProcessing
Type: Bug Report
0
WordsProcessing: HtmlFormatProvider: HtmlFormatProvider: Multiple CSS classes on an element are not correctly resolved when converted to inline styles

Multiple CSS classes on an element are not correctly resolved when converted to inline styles.

Before:

.TelerikNormal {font-family: Calibri;font-size: 14.6666666666667px;margin-top: 0px;margin-bottom: 0px;line-height: 100%;color: #000000;}
.TelerikHeading3 {font-family: Calibri Light;font-size: 22.6666666666667px;}
<p class="TelerikNormal TelerikHeading3"><span>Test</span></p>

Due to order priority, the TelerikHeading3 values override the TelerikNormal values. The font-size becomes 22.6666666666667px.

Convert:

provider.ExportSettings.StylesExportMode = StylesExportMode.Inline;
After:
<p style="font-family: Calibri;font-size: 14.6666666666667px;margin-top: 0px;margin-bottom: 0px;line-height: 100%;color: #000000;"><span>Test</span></p>
ResultTelerikHeading3 and its properties are ignored and not applied during the conversion to inline styles. The font-size is now 14.6666666666667px.

 

0 comments