22 CSS4J RELEASE NOTES
33 ===================
44
5- Release 1.0.4 - April 13 , 2020 [End of Life - Unsupported]
5+ Release 1.0.4 - April 14 , 2020 [End of Life - Unsupported]
66----------------------------------------------------------
77
88Release Highlights
@@ -12,28 +12,26 @@ although users should upgrade to 2.0 or later as soon as possible (1.x is not
1212formally maintained anymore). When upgrading, please keep in mind that 2.x
1313releases require Java 8 or higher.
1414
15- * Adapted from the 2.0.2 Release Notes: *
15+ * The following is adapted from the 2.0.2 Release Notes: *
1616
1717 This library handled font-size values a bit different than the other values.
1818When a font-size was expressed as a percentage, if the value of the parent font
19- size could not be accurately determined the value was left as a precentage. This
20- did not apply to computations that depended on the font size, like 'em' values
21- in 'margin' or 'padding' properties: in that case default values were forced for
22- that font size, and an absolute length was obtained.
23-
24- This procedure left a bit of potential inconsistency between computed values
25- for the font-size and other properties, but was considered a trade-off that gave
26- flexibility; in that way, users could apply their own font-size defaults after
27- the computed style tree was evaluated, for example when applying a XSL sheet
28- later.
29-
30- However, the way that var() values are handled left a code path for an infinite
31- loop when a default font size was not set by the style sheets, and percentages
32- are used inside a var(). The issue was detected and, while a specific fix for
33- var() (and also var-like stuff like env() and attr()) could be rolled, I decided
34- to force font-size percentage resolution in all cases, as the safest and most
35- consistent approach. So the behaviour of the library now changes a bit, but the
36- reasons for it are solid.
19+ size could not be accurately determined the value was left as a precentage in
20+ the serialized style. This did not apply to computations that depended on the
21+ font size, like 'em' values in 'margin' or 'padding' properties: in that case
22+ default values were forced for that font size, and an absolute length was
23+ obtained.
24+
25+ This procedure allows easy inspection of the specified vaues, but is inadequate
26+ when the serialized style is used as the input for other software packages.
27+ Changes to the library were made in the past to address this, but percentages of
28+ font-size values were kept.
29+
30+ Not only the serialization is inadequate: it also introduces a degradation in
31+ performance that can be highly noticeable with heavy documents (thousands of
32+ nodes, several tens of thousand rules). So the serialization of computed font
33+ sizes now avoids percentages: if you had unit tests depending on that, you may
34+ have to change them.
3735
3836 Other than that, this release comes with interesting fixes, including one for a
3937regression introduced in 1.0.3 (triggered by var() values inside gradients). All
0 commit comments