KFX Style Fixes
Bug Fixes
-
sub/sup/small in headings: User CSS for
<sub>,<sup>, and<small>elements was lost inside heading contexts (h1-h6) due to cascade override, missing baseline_style conversion, lack of style propagation to heading descendants, font-family normalization stripping inline styles, and missing paragraph context in title processing. -
Font-size computation for em units in headings: Added
RemToFontSizeMultiplier()to recover the original CSS multiplier from compressed rem values, enabling correct em-unit accumulation through nested inline elements inside headings. -
CSS class/tag name collision: Class-only selectors matching HTML tag names (e.g.,
.h1vsh1) collided inselectorStyleName(). Class selectors that collide are now prefixed with".". -
h1 font-size: Changed h1 default from 2.0rem to 1.5rem to match KP3's HTML5 section-depth-1 behavior (h1 inside a section is 1.5em, not 2.0em).
-
Inline images inside links: Links wrapping inline images (both cross-references and footnotes) incorrectly received an empty style instead of the proper link style (underline, superscript, etc.). Removed the wrong
linkHasImagespecial case — KP3 applies identical styling regardless of link content.
Cleanup
- Spurious DEBUG logs: Eliminated noisy log messages for pseudo-element rules (
::before/::aftercontent) anddisplay: noneby handling them before they reach the ignorable-pattern filter.
Full Changelog: v1.1.10...v1.2.0