Skip to content

Commit

Permalink
Release Notes: better explanation.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosame committed Apr 14, 2020
1 parent f8c44c4 commit 353ceb4
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
CSS4J RELEASE NOTES
===================

Release 2.0.2 - April 14, 2020
Release 2.0.2 - April 15, 2020
------------------------------

This library handled font-size values a bit different than the other values.
When a font-size was expressed as a percentage, if the value of the parent font
size could not be accurately determined the value was left as a precentage in
the serialized style. This did not apply to computations that depended on the
font size, like 'em' values in 'margin' or 'padding' properties: in that case
default values were forced for that font size, and an absolute length was
obtained.

This procedure allows easy inspection of the specified vaues, but is inadequate
when the serialized style is used as the input for other software packages.
Changes to the library were made in the past to address this, but percentages of
font-size values were kept.

Not only the serialization is inadequate: it also introduces a degradation in
performance that can be highly noticeable with heavy documents (thousands of
nodes, several tens of thousand rules). So the serialization of computed font
sizes now avoids percentages: if you had unit tests depending on that, you may
have to change them.
Font-size values are handled a bit different than the other values. In previous
versions, when a font-size was expressed as a percentage, if the value of the
parent font size could not be accurately determined the value was left as a
percentage in the serialized style. That does not apply to computations that
depend on the font size, like 'em' values in 'margin' or 'padding' properties:
in that case default values are forced for that font size, and an absolute
length is always obtained.

This serialization allows easy inspection of the specified vaues, but is not
adequate when the serialized style is used as the input for other software
packages. Changes to the library were made in the past to address this, but
percentages of font-size values were kept.

Not only the serialization is inadequate: the repeated attempts to obtain an
absolute size also introduce a degradation in performance that can be highly
noticeable with heavy documents (thousands of nodes, several tens of thousand
rules). So the serialization of computed font sizes now avoids percentages: if
you had unit tests depending on the old behaviour, you may have to change them.

Other than that, this release comes with interesting fixes, including one for a
regression introduced in 2.0.1 (triggered by var() values inside gradients). All
Expand Down

0 comments on commit 353ceb4

Please sign in to comment.